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