Converting a Panel Page to a Cross-Section Page
Posted: Thu Jan 12, 2017 4:05 pm
Hello
I have a panel page with multiple variables that is annual from 1990 2015 and 250 cross-sections.
I have an undated page with 250 observations.
I want to create variables in the undated page that corresponds to the averages of the same variables in the panel page, possibly changing the sample along the way (averaged not over the full 1990 2015 sample but a narrower sample that may include an if command -- so let's just say I have a sample object sample_use I want to apply to the averaging). Obviously the 250 cross-sections in the panel exactly will correspond to the 250 observations in the undated page.
What's the code I need to run for this? I tried a few obvious things but they didn't work.
Many thanks
I have a panel page with multiple variables that is annual from 1990 2015 and 250 cross-sections.
I have an undated page with 250 observations.
I want to create variables in the undated page that corresponds to the averages of the same variables in the panel page, possibly changing the sample along the way (averaged not over the full 1990 2015 sample but a narrower sample that may include an if command -- so let's just say I have a sample object sample_use I want to apply to the averaging). Obviously the 250 cross-sections in the panel exactly will correspond to the 250 observations in the undated page.
What's the code I need to run for this? I tried a few obvious things but they didn't work.
Many thanks