Hello,
I have panel data for arrivals in 116 municipalities from 1960-2018.
I want to generate the additional change of arrivals in each year to the base year 1960 for each municipality. I want the value in 1960 set to a baseline of 1 or 100 for each municipality so that each have the same initial baseline level.
Which should be: g = nt / nt=1960 t= 1960,....,2018
I used:
. gen arr_n=(arrivals[_n]/arrivals[_cons])
For the municipality m_id 1, the value is set to 1 for 1960 and it calculates right from there but it doesn't set to 1 for 1960 in the m_id 2.
How can I tell Stata to always start the calculation new when the year is 1960?
And second issue, some observations are missing in 1960. Should I rather drop this year and start from 1961 or is there another possibility to account for this.
Thank you very much!
Luis
Related Posts with Setting panel data observations to same baseline
What diagnostic tests should be conducted after beta regression?Hello, I estimated a beta regression with dependent variable that falls strictly within the range of…
converting long to wide - creating a j variableHello everyone. Thanks for looking at my post. I hope you can help a PhD candidate... I have a data…
LPM interpretation. Dummy dependent variable and Log independent variableHi everyone. I have a confusion on how to interpret a LPM where we have a dummy dependent variable …
Cronbach's alpha for confirmatory factor analysis in SEMHello everyone, I am trying to figure out how to get Cronbach's alpha for confirmatory factor analy…
3SLS for panel dataHi! I have been trying to estimate the relationship between an endogenous variable (say X) and Y, an…
Subscribe to:
Post Comments (Atom)
0 Response to Setting panel data observations to same baseline
Post a Comment