Hi everyone,
I have a dataset of yearly social capital index based on county codes (FIPS). Based on dataex, here is the example generated
* Example generated by -dataex-. To install: ssc install dataex
clear
input int year long FIPS str36 areaname double SINDEX_PCA
1997 1001 "Autauga, AL" -.6846493073423503
1998 1001 "Autauga, AL" -.6846493073423503
1999 1001 "Autauga, AL" -.6846493073423503
2000 1001 "Autauga, AL" -.6846493073423503
2001 1001 "Autauga, AL" -.6846493073423503
2002 1001 "Autauga, AL" -.6846493073423503
2003 1001 "Autauga, AL" -.6846493073423503
2004 1001 "Autauga, AL" -.6846493073423503
2005 1001 "Autauga, AL" -.7180734636141869
2006 1001 "Autauga, AL" -.7180734636141869
2007 1001 "Autauga, AL" -.7180734636141869
2008 1001 "Autauga, AL" -.7180734636141869
2009 1001 "Autauga, AL" -.32672973295185126
2010 1001 "Autauga, AL" -.32672973295185126
2011 1001 "Autauga, AL" -.32672973295185126
2012 1001 "Autauga, AL" -.32672973295185126
2013 1001 "Autauga, AL" -.32672973295185126
2014 1001 "Autauga County, AL" -.631003349820884
1997 1003 "Baldwin, AL" -.7399664059449524
1998 1003 "Baldwin, AL" -.7399664059449524
1999 1003 "Baldwin, AL" -.7399664059449524
2000 1003 "Baldwin, AL" -.7399664059449524
2001 1003 "Baldwin, AL" -.7399664059449524
2002 1003 "Baldwin, AL" -.7399664059449524
2003 1003 "Baldwin, AL" -.7399664059449524
2004 1003 "Baldwin, AL" -.7399664059449524
2005 1003 "Baldwin, AL" -.8686748170640813
2006 1003 "Baldwin, AL" -.8686748170640813
2007 1003 "Baldwin, AL" -.8686748170640813
2008 1003 "Baldwin, AL" -.8686748170640813
end
[/CODE]
As you can see, the time period ends at 2014. I want to expand (carry forward) it to 2019 based on 2014's SINDEX value for each FIPS.
Can anyone help me with the code (very basic, I know) to expand the time frame to 2019, so that I can carryforward it?
Thanks in advance!
Related Posts with Expanding dataset based on additional end years
Time lag for Multi_level fixed effect panel data.Hi all, I have some douts about time lagging for my independent variables in multi-way FE panel data…
Add Text to Graph CombineI am combining three graphs using 'graph combine'. By default they appear in a 2 x 2 arrangement wit…
Lasso regress questionsHi, I am college student from Barcelona. It is hard to learn Stata by myself because the teacher doe…
Obtaining mean and SD from survey dataHello, I am trying to get the differences in the length of stay(LOS) in subpopulation of myocarditi…
-sreshape-i just installed -sreshape- onto stata mp.. does anyone know if it has a max variable limit? i have …
Subscribe to:
Post Comments (Atom)
0 Response to Expanding dataset based on additional end years
Post a Comment