Hi all,
Assume we have a panel dataset with the following variables: (i) FIPS code identifying counties, (ii) year, and (iii) broadband. The panel data covers the years 2008, 2009, and 2010. I would like to expand the dataset by adding the years 2011 and 2012, where the broadband variable takes the value from the most recent available year.
I am providing a minimal example below.
What I want to achieve is something that looks like this:
Assume we have a panel dataset with the following variables: (i) FIPS code identifying counties, (ii) year, and (iii) broadband. The panel data covers the years 2008, 2009, and 2010. I would like to expand the dataset by adding the years 2011 and 2012, where the broadband variable takes the value from the most recent available year.
I am providing a minimal example below.
Code:
input int(fips year) float broadband 1001 2008 7.333333 1001 2009 6.25 1001 2010 5.916667 1003 2008 5.806229 1003 2009 5.741742 1003 2010 6.031991 end
|

Comment