I have a dataset put together from the Penn World Tables, and I'm working to understand the relationship between growth in GDP per capita, and the standard deviation of the growth rate of GDP per capita. I would like to get panel data and run a time fixed effects regression, where the dependent variable is the growth rate of GDP per capita over each 10-year period (I suppose my final period, 2010-2017, would have to be 8 years). However, I am completely at a loss for how to make my dataset into decade intervals of averages and standard deviations of annual data.... My data looks like this currently:
country | year | decade | growth_gdppc |
Argentina | 1970 | 1 | |
Argentina | 1971 | 1 | 0.0135 |
Argentina | 1972 | 1 | 0.0003 |
... | ... | ... | ... |
Argentina | 1983 | 2 | 0.0328 |
... | ... | ... | ... |
Argentina | 2017 | 5 | 0.0237 |
Australia | 1970 | 1 | |
Australia | 1971 | 1 | 0.0190 |
... | ... | ... | ... |
Australia | 2017 | 5 | 0.0136 |
country | decade | avg_growth_gdppc_by_decade | st_dev_gdppc_by_decade |
Argentina | 1 | 0.012 | 0.03 |
Argentina | 2 | ||
Argentina | 3 | ... | ... |
Argentina | 4 | ||
Argentina | 5 | ||
Australia | 1 | ||
... | ... | ... | ... |
Apologies if anything is unclear here, this is my first time working with time variant stuff on Stata and I am very confused. I have tried to simplify things as much as possible.
0 Response to How to collapse annual data into decade observations for panel data
Post a Comment