stata Questions

2

Solved

For long and repeating models I want to create a "macro" (so called in Stata and there accomplished with global var1 var2 ...) which contains the regressors of the model formula. For example from...
Breeden asked 7/10, 2017 at 0:58

3

Stata automatically creates a variable called "_merge" indicating the matched variables in both datasets after merge. Is there a way to get such variable generated by R's merge() function?
Spirit asked 20/5, 2015 at 19:9

3

Solved

Would it be possible, when I launch a do-file to recover the path of the do-file as a variable? I'm sharing a project with a co-author (via Dropbox). The structure of the folders (data, logs, etc....
Calebcaledonia asked 12/2, 2013 at 14:46

2

Solved

Lately I have been trying to fit a lot of random effects models to relatively big datasets. Let’s say about 50,000 people (or more) observed at up to 25 time points. With such a large sample size, ...
Donte asked 21/6, 2017 at 13:25

1

My advisor wants me to add dollar signs to my table of summary statistics. I generate this table and export it to Latex using Stata's esttab command. I need to 1) Add dollar signs to some of the r...
Gleason asked 9/4, 2017 at 19:35

2

Solved

aaa<- data.frame(sex=c(1,1,2,2,1,1), group1=c(1,2,1,2,2,2),group2=c("A","B","A","B","A","B")) stata command: count if sex==1 & group1==2 count if sex==1 & group2=="A" count counts t...
Knitwear asked 18/5, 2014 at 22:54

3

Solved

I have a Python script that cleans up and performs basic statistical calculations on a large panel dataset (2,000,000+ observations). I find that some of these tasks are better suited to Stata, a...
Sihon asked 21/1, 2014 at 16:24

2

Solved

When working on a hierarchical/multilevel/panel dataset, it may be very useful to adopt a package which returns the within- and between-group standard deviations of the available variables. This ...
Wink asked 4/1, 2013 at 22:5

1

Solved

I am trying to get robust standard errors for a clogit regression from the survival package in R. In doing so, I am trying to replicate the standard errors reported by the Stata clogit command with...
Footgear asked 10/8, 2016 at 11:20

4

Solved

These are some newbie questions about statistical programming for R for which I haven't been able to find an answer online. My dataframe is labeled "eitc" in the code below. 1) Once I've loaded in...
Bludge asked 29/1, 2011 at 8:11

0

I am using odbc insert command in the statistics package Stata (v14.2) on an Ubuntu 14.04.2 LTS server to insert some data into a Teradata DB (v14.10). This Stata command has a block option, whic...
Impropriate asked 8/9, 2016 at 1:57

2

Solved

I love the Rstudio IDE and the easy point click git(hub) integration. Can I use Rstudio as an IDE for other programming languages? In particular, besides R/Rstudio, I use Stata a lot. Stata is ...
Ingurgitate asked 26/7, 2016 at 19:6

1

Solved

I'm trying to replicate in R a bit of code someone else wrote in Stata, and have hit a wall trying to predict the behavior of their p-RNG. Their code has this snippet: set seed 123456 Unfortuna...
Longdistance asked 23/3, 2016 at 17:33

3

Solved

Is it possible to call Stata functions from R?
Jacquelinejacquelyn asked 12/11, 2010 at 16:45

2

Solved

I'm trying to run a regression in R's plm package with fixed effects and model = 'within', while having clustered standard errors. Using the Cigar dataset from plm, I'm running: require(plm) requ...
Ralphralston asked 15/10, 2015 at 18:13

2

I have a data frame with variables, of which some contain the same information x1 = runif(1000) x2 = runif(1000) x3 = x1 + x2 x4 = runif(1000) x5 = runif(1000)*0.00000001 +x4 x6 = x5 + x3 x = data...
Pluckless asked 15/2, 2016 at 13:35

2

Solved

I need to generate a new variable that is a standardized value of another variable but by a group (SAT scores by year). I calculated it using the following code: egen mean_sat = mean(sat), by(year...
Laminous asked 14/1, 2015 at 17:48

3

Solved

I have a data frame, which looks something like this: CASENO Var1 Var2 Resp1 Resp2 1 1 0 1 1 2 0 0 0 0 3 1 1 1 1 4 1 1 0 1 5 1 0 1 0 There are over 400 variables in the dataset. This is just an ...
Mcmichael asked 18/12, 2015 at 20:48

1

Solved

I am using the coefplot package in Stata to plot how a coefficient changes depending on the model employed. In particular, I want to see how the coefficient of interest changes over time. I am plot...
Nilotic asked 11/10, 2015 at 18:14

2

When I export a dataset to Stata format using PROC EXPORT, SAS 9.4 automatically expands adds an extra (empty) byte to every observation of every string variable. For example, in this data set: da...
Distinctly asked 10/6, 2015 at 20:48

3

Solved

I'm looking for a way to replicate the encode behaviour in Stata, which will convert a categorical string column into a number column. x = pd.DataFrame({'cat':['A','A','B'], 'val':[10,20,30]}) x =...
Cornice asked 16/12, 2013 at 20:3

2

Solved

I have multiple sets of regressions that need to be presented in different tables. I wonder if there is a way to export multiple set of regressions into one Excel workbook using either outreg2 or e...
Gal asked 16/9, 2015 at 19:33

2

Solved

Does anyone have any experience using Stata and Hadoop? Stata 13 now has a Java Plugin API, so I think it should be straightforward to get them to play nice. I am particularly interested in being ...
Tieback asked 3/10, 2013 at 17:41

3

Solved

In Stata the lookfor command offers a quick way to search for variables in a dataset (and it searches both the variable names and labels). So lookfor education quickly finds you variables related t...
Avouch asked 8/10, 2012 at 12:49

4

Solved

I'm new to R, so I apologize if this is a straightforward question, however I've done quite a bit of searching this evening and can't seem to figure it out. I've got a data frame with a whole slew ...
Koerlin asked 21/11, 2012 at 3:42

© 2022 - 2024 — McMap. All rights reserved.