stata

Creating "GDP in 1960" variable from GDP variables for different years

Hi all, I'm pretty new to stata... I have a set of observations of the form "Country GDP Year". I want to create a new variable GDP1960, which gives the GDP in 1960 of each country for each year: USA $100m 1960 USA $100m 1960 $100m USA $200m 1965 --> USA $200m 1965 $100m Canada $60m 1960 C...

is there an R function for Stata's xtnbreg?

Have been using STATA to run negative binomial regressions in a replication. Not sure what is under the hood on how STATA does this, but wanted to know if there is an R function/package that does the same thing? The R will give me a better idea of how this works, since I can see the code. ...

In Stata how do you assign a long list of variable names to a local macro?

I have many variables whose name begins with the prefix "indoor". What comes after "indoor" is not numeric (that would make everything simpler). I want a tabulation for each of these variables. So I wrote this code: local indoor indoor* foreach i of local indoor { tab `i' group, col freq exact chi2 } The problem is that "indoor" in the...

Using textmate with applications accessed through ssh

I like using textmate to edit scripts for my analysis using R, Stata and SQL. Recently, I've had to use our grid server environment because the datasets are too large for my computer, and the ram allocations on the grid using R and STATA are much larger than what my computer has too offer. My current workflow is to open up these progra...

Migrating from Stata to Python

Some coworkers who have been struggling with STATA 11 are asking for my help to try to automate their laborious work. they mainly use 3 commands in stata: tsset (sets a time series analysis) as in: tsset year_column, yeary varsoc (Obtain lag-order selection statistics for VARs) as in: varsoc column_a column_b vec (vecto...