stata Questions
1
Solved
This question has two parts, one more general and the other a specific case:
Is there a theme or template in R for producing plots that have similar appearance to the charts published in "The Eco...
4
Solved
A newbie question: does anyone know how to run a logistic regression with clustered standard errors in R? In Stata it's just logit Y X1 X2 X3, vce(cluster Z), but unfortunately I haven't figured ou...
Coquelicot asked 11/5, 2013 at 15:39
4
Solved
When I import a Stata dataset in R (using the foreign package), the import sometimes contains characters that are not valid UTF-8. This is unpleasant enough by itself, but it breaks everything as s...
3
Solved
So I currently face a problem in R that I exactly know how to deal with in Stata, but have wasted over two hours to accomplish in R.
Using the data.frame below, the result I want is to obtain exac...
2
Solved
The following command removes all variables, scalars and programs that I add:
clear all
However, global and local macros stick around.
I would like to know how to clear these out:
interactiv...
Sawmill asked 23/9, 2014 at 19:59
3
Solved
Just came across a .do file that I need to translate into R because I don't have a Stata license; my Stata is rusty, so can someone confirm that the code is doing what I think it is?
For reproduci...
Archenemy asked 22/6, 2015 at 19:13
3
Solved
I am working with a set of dta files representing surveys from different years.
Conveniently, each year uses different values for the country variable, so I am trying to set the country value lab...
Pollinosis asked 31/3, 2014 at 17:8
5
Solved
I have a bunch of Stata .dta files that I would like to use in R.
My problem is that the variable names are not helpful to me as they are like "q0100," "q0565," "q0500," and "q0202." However, they...
3
Solved
I have 10000 descriptions and I want to use regular expressions to extract the number associated with the phrase ``arrested''.
For example:
"police arrests 4 people"
"7 people were arrested".
...
5
I am working with a Stata .dta file that is around 3.3 gigabytes, so it is large but not excessively large. I am interested in using IPython and tried to import the .dta file using Pandas but somet...
3
I am trying to replicate a Stata Output in R. I am using the dataset affairs. I am having trouble replicating the probit function with robust standard errors.
The Stata code looks like that:
pr...
1
Solved
I'm switching from Stata to R, and I find inconsistent results when I use prediction to compute marginal pred and the results from the Stata command margins fixing the values of a variable to x. He...
Urial asked 1/8, 2017 at 7:49
2
Solved
Is there a reason why there are two different commands to generate a new variable?
Is there a simple way to remember when to use gen and when to use egen?
Monosymmetric asked 20/10, 2012 at 23:30
5
Solved
Does someone know an easy way to get Stata to display more than just three digits for the p-value when running a Tobit regression?
Normally Stata reports that the p-value is .001 or .065, but I w...
Manella asked 27/10, 2010 at 17:11
5
Solved
In Stata, I have a set of variables that all begin with pkg. In their current state, their endings are numeric: pkg1, pkg2, pkg3, pkg4 and so on.
I need to change all of these variables' endings ...
Downey asked 3/12, 2012 at 2:3
6
Solved
Is there a way to read a Stata version 13 dataset file in R?
I have tried to do the following:
> library(foreign)
> data = read.dta("TEAdataSTATA.dta")
However, I got an error:
Error ...
9
Solved
I am used to R-studio for R, which has some features such as guessing what function you are trying to type, by pressing TAB .
However, I can't find any integrated development environments (I...
Ungainly asked 2/8, 2011 at 15:12
5
My internet connection is extremely slow and therefore I execute batch files on the server without GUI, i.e. directly from the terminal. However, oftentimes I need to make a few changes in th...
Alesha asked 21/8, 2013 at 15:32
3
Solved
I am writing a .do to check the existence of some variables in a number of .dta files as well as to check the existence of certain values for those variables. However, my code stops executing as it...
6
Solved
The statistical software Stata allows short text snippets to be saved within a dataset. This is accomplished either using notes and/or characteristics.
This is a feature of great value to me as it...
3
Solved
I would like to find the R implementation that most closely resembles Stata output for fitting a least squares regression function with Heteroskedastic Corrected Standard Errors.
Specifically, I wo...
1
Solved
I am trying to build multinomial logit model using python and stata. My data is as follows:
ses_type prog_type read write math prog ses
0 low Diploma 39.2 40.2 46.2 0 0
1 middle general 39.2 38....
Chloramine asked 3/3, 2018 at 16:54
3
Solved
Use esttab to generate summary statistics by group with columns for mean difference and significance
I would like to use esttab (ssc install estout) to generate summary statistics by group with columns for the mean difference and significance. It is easy enough to generate these as two separate ta...
Preindicate asked 21/3, 2013 at 19:7
1
I am looking to install the user-written 'esttab' of stata package 'st0085_2.pkg'. Normally I would type the following to do this:
net install st0085_2.pkg
In this case it outputs:
checking st0...
Picaroon asked 7/4, 2017 at 21:45
3
Solved
df = pd.read_stata('file.dta')
for cols in df.columns.values:
name = cols.lower()
type = df[cols].dtype
#label = ...
I need to get the labels/descriptions in python for each column.
© 2022 - 2024 — McMap. All rights reserved.