stata Questions
4
Solved
I'm a Stata user that's transitioning to R and there's one Stata crutch that I find hard to give up. This is because I don't know how to do the equivalent with R's "apply" functions.
In Stata, I ...
Christo asked 10/11, 2014 at 2:16
2
Solved
I'm very new to R, and have been struggling for a couple of days to do something that Stata makes quite straightforward. A friend has given me a relatively complicated answer to this question, but ...
2
Being a R user, I am learning Stata now using this resource, and am puzzled about the merge command.
In R, I don't have to worry about merging data wrongly, because it merges everything anyway. I ...
1
Solved
I am using Stata to process some data, export the data in a csv file and load it in Python using the pandas read_csv function.
The problem is that everything is so slow. Exporting from Stata to a ...
1
Solved
I am rewriting (and parallelising) some Stata simulations in C++.
For testing purposes I would like to use Stata's random numbers.
So far my approach has been to generate the numbers in Stata, du...
Wept asked 2/4, 2015 at 17:41
1
Solved
I am trying to run multiple regressions where, on each iteration, another independent variable is added to the regression on each loop?
local vlist0 foo bar dar
local vlist1
foreach item in `vlis...
2
Solved
In Stata, if I have these variables: var1, var2, var3, var4, var5, and var6, I can select all of them with the command var*. Does R have a similar functionality?
2
I have a dataset in R to which I applied variable labels using the {Hmisc} package. However, when I export the dataset to Stata (using the write.dta function in the {foreign} package), the variable...
3
I'm having trouble with the user-written outreg2 package used in Stata. When I build the output with the tex(frag) option, the resulting tables have three backslashes at the end of each line rather...
2
I have a data frame (df) with variables such as CA, VT, NC, AZ, CAvalue, VTvalue, NCvalue, AZvalue etc.
In Stata, I can use the foreach command and generate new variables:
foreach x in CA VT NC ...
1
Solved
I am trying to replicate a logit regression from Stata to R. In Stata I use the option "robust" to have the robust standard error (heteroscedasticity-consistent standard error). I am able to replic...
Scarlet asked 8/12, 2014 at 22:13
2
Solved
I would like to make a Oaxaca Decomposition in R. It is used in e.g. labor economics to distinguish explained variance versus unexplained variance, I believe. I have not been able to find a s...
1
Solved
I'm a completely new Sublime Text user. I'm trying to make the Stata (Enhanced) plugin work for Sublime Text 3. I'm on a W7 machine.
I've installed the plugin and edited the Stata Enhanced (windo...
Tolbutamide asked 15/8, 2014 at 12:17
6
I have a data set that looks like this.
bankname bankid year totass cash bond loans
Bank A 1 1881 244789 7250 20218 29513
Bank B 2 1881 195755 10243 185151 2800
Bank C 3 1881 107736 13357 177612 NA...
2
Solved
I have a variable state that takes integer values from 11 to 99. It is labeled.
How can I create a string variable stateString that would have string values without all those numeric values?
gen...
1
Solved
I currently am trying to run a logistic regression model. My data has two variables, one response variable and one predictor variable. The catch is that I have 200 million observations. I am trying...
2
I'd like to split a sample according to a specific variable, creating 4 sub-samples each one related to a quartile of the variable's distribution. The aim is to demonstrate that the presence of dif...
1
Solved
This SO question led me to try Sublime Text 3 as a replacement for Stata's do file editor on Linux (full instructions here).
Syntax highlighting works and a Ctrl+B shortcut sends the whole do file...
Andryc asked 23/8, 2013 at 20:43
2
I am trying to learn R after using Stata and I must say that I love it. But now I am having some trouble. I am about to do some multiple regressions with Panel Data so I am using the plm package.
...
Timer asked 13/12, 2010 at 21:6
2
Solved
I want to run the keep command in a do-file in Stata 12:
keep a1 a2 a3 a4 a5 b1 b2 b3 b4 b5 c1 c2 c3 c4
What I want is to do the following:
keep {a1 a2 a3 a4 a5
b1 b2 b3 b4 b5
c1 c2 c3 c4}
...
Maremma asked 14/8, 2014 at 2:48
1
Solved
Stata has a very nice command, egen, which makes it easy to compute statistics over group of observation. For instance, it is possible to compute the max, the mean and the min for each group ...
2
Solved
3
Solved
I'm wondering if anyone knows a Python package that allows you to save numpy arrays/recarrays in the .dta format of the statistical data analysis software Stata. This would really speed up a few st...
2
Solved
Following up from my question here, I am trying to replicate in R the functionality of the Stata command duplicates tag, which allows me to tag all the rows of a dataset that are duplicates in term...
Anesthesia asked 6/4, 2014 at 10:53
1
Solved
Using historical Lynx Pelt data (https://www.dropbox.com/s/v0h9oywa4pdjblu/Lynxpelt.csv), here are two tables of AIC values from R and Stata for ARIMA(p,q) models for 0<=p<=5 and 0<=q<=...
Dodecagon asked 16/3, 2014 at 21:39
© 2022 - 2024 — McMap. All rights reserved.