I have a panel data for 50 countries from 1990-2013. I want to calculate 3 year or 5 year time interval average of all data variables from this panel data. Is there some stata command to do this ?
When I do average 3-year stata was calculated the previous year. for example, my data starting from 1996 to 2019. When I use the command [gen period = 3 * floor(year/3)] and look at the data editor ( Browse) I found that years start from 1995. Why it starts from 1995 while the period of my study is 1996-2019?