Dear Stata forum colleagues,
I have learnt a lot by following older threads before, but this is my first personal post.
I have a panel data set of Indian state level data(the panel unit being each State) between 1990-2015 . I currently have one of my variables as GDP per capita over this time frame for each state. However, I would like to create a variable 'Initial GDP per capita' that gives me the 1990 value of GDP per capita for each state, but the variable needs to remain the same (i,e the 1990 value) throughout the time period (for each state).
Additionally, if in case the 1990 value of GDP per capita is missing, I would like STATA to use the 1991 value(or the next available value).
Can someone help me write a command for this?
Many thanks,
Nishanth
Related Posts with new variable for each panel unit
STATA SE 13, how to get marginsplot for all categories of dependent variable: multiply-imputed mlogit, using mimrgns commandDear STATA users, I would much appreciate your help with my analysis which goes as follows: I run …
zipfile sub-option 'saving(... , replace)' not working with quoted target file name?Dear Statalist community, I just encountered a behavior with the zipfile command in Stata (I tested…
Confusion about MDSHello, I am trying to learn how to use MDS, and would like to know if there is a way to assign diff…
Margins with subpop option vs Regression with if optionA. Code: logistic y x covariates [pweight=perwtf], vce(cl f00011) margins, subpop(b) dydx(x covari…
Bootstrapping a user-written program that has regressions with different samplesHello, My question is, if you write a program with regressions that are ran on different samples, d…
Subscribe to:
Post Comments (Atom)
0 Response to new variable for each panel unit
Post a Comment