stata Questions
6
Solved
I have some data in Stata which look like the first two columns of:
group_id var_to_rank desired_rank
____________________________________
1 10 1
1 20 2
1 30 3
1 40 4
2 10 1
2 20 2
2 20 2
2 30 3
...
Frontality asked 18/5, 2011 at 10:42
3
Solved
Being familiar with R, I'm wondering what is the Stata equivalent of vectors (e.g. var<-c(1,2,3,4) )?
I know that Stata uses macros, but I don't get how you can store multiple values in one ma...
Weber asked 2/11, 2013 at 22:16
1
Solved
I would like for a colleague to replicate a first-difference linear panel data model that I am estimating with Stata with the plm package in R (or some other package).
In Stata, xtreg does not hav...
Bat asked 26/9, 2013 at 1:25
3
Solved
I am a Stata user trying to learn R.
I have a couple of lengthy folder paths which, in my Stata code, I stored as local macros. I have multiple files in both those folders to use in my analysis. ...
Appomattox asked 28/3, 2013 at 20:19
2
I have a dictionary of Stata keywords and reasonable knowledge of Stata syntax. I would like to devote a few hours to turn it into a Stata lexer for Pygments.
However, I cannot find enough d...
3
Solved
I'm using Stata, and I'm trying to compute the average price of firms' rivals in a market. I have data that looks like:
Market Firm Price
----------------------
1 1 100
1 2 150
1 3 125
2 1 50
2 2 ...
Spaceless asked 6/3, 2012 at 4:16
3
Solved
I'm trying to analyze data from the University of Minnesota IPUMS dataset for the 1990 US census in R. I'm using the survey package because the data is weighted. Just taking the household data (and...
1
Solved
Could anyone help me replicate these relative risk calculations (and its confidence interval) in R?
A similar procedure used in Stata is described here. Could anyone show me how to do this in R (m...
1
Solved
Stata's inlist allows us to refer to the real or string values of a variable. I was wondering whether R has such a function.
Examples:
I want to choose eight states from the variable state (you ...
2
Solved
I need to read a .dat file using a .dct file. Has anyone done that using R?
The format is:
dictionary {
# how many lines per record
_lines(1)
# start defining the first line
_line(1)
# star...
Silt asked 8/1, 2013 at 21:26
3
I'm having a looping issue. It should be simple to solve, but "R for Stata Users" (I've coded in Stata for a couple of years), Roger Peng's videos, and Google don't seem to be helping me. Can one o...
1
Solved
In Stata, is it possible to plot quantile regression lines? I know a standard OLS regression line can be added to a scatter plot but it isn't clear to me how to add other types of regression lines....
Hann asked 10/12, 2012 at 19:10
2
Solved
I am using the book "Generalized Linear Models and Extension" by Hardin and Hilbe (second edition, 2007) at the moment. The authors suggest that instead of OLS models, "the log link is generally us...
1
Solved
I'm trying to get a 2 way table in R similar to this one from Stata. I was trying to use CrossTable from gmodels package, but the table is not the same. Do you known how can this be done in R?
I ...
1
Solved
I have been using "plm" package of R to do the analysis of panel data. One of the important test in this package for choosing between "fixed effect" or "random effect" model is called Hausman type....
Grassland asked 20/10, 2012 at 15:32
2
I am attempting to create a simple loop in R, where I have a large dataset and I want to create multiple smaller samples from this dataset and export them to excel:
I thought it would work like th...
4
Solved
10
Solved
In recent conversations with fellow students, I have been advocating for avoiding globals except to store constants. This is a sort of typical applied statistics-type program where everyone writes ...
Livorno asked 2/4, 2011 at 22:29
2
Solved
… similar to the StatET plugin that allows you to run R code from Eclipse?
I tried googling it but nothing useful has turned up.
Policlinic asked 3/6, 2011 at 8:59
6
Solved
Many surveys have codes for different kinds of missingness. For instance, a codebook might indicate:
0-99 Data
-1 Question not asked
-5 Do not know
-7 Refused to respond
-9 Module not asked
Stata...
Intervention asked 17/3, 2011 at 6:43
4
Solved
I have a number of variables whose name begins with the prefix indoor. What comes after indoor is not numeric (that would make everything simpler).
I would like a tabulation for each of these var...
Ides asked 13/9, 2010 at 15:24
1
I have a rails app that is hosted on Heroku for which I want to incorporate some live data analysis. Ideally, I'd love to figure out a way to run a generalized boosted regression model, which I kno...
Aeromechanic asked 25/9, 2011 at 16:6
3
Solved
Is there an equivalent function of "%in%" from R for Stata?
3
Solved
Using Stata my text editor is gVim. Using scripts from here and here to send code from Vim to Stata keeps me from switching to Linux. The scripts are in AutoIt I cannot use in Linux. They are indep...
1
Solved
I have used R quite a bit and I know I can use head(data[,"column"]) or head(data) to see the first few rows/cells of data.
How can I do that in Stata?
Foggia asked 2/8, 2011 at 8:6
© 2022 - 2024 — McMap. All rights reserved.