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