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
XTDATA and MISSINGHi all, is there a way to prevent xtdata command not to ignore missing values, or better, to avoid …
Graph barDear All, I want to create a bar graph that compares change in the outcome variable at the level of…
estimating coefficient of variation in a cluster randomised trialHi, I'm trying to estimate the coefficient of variation of a proportion between clusters in a cluste…
Geometric interpolation of Return variableHi , Thanks to the post replied on the various issues at Statalist, I am able to understand things …
help with intervalplotHi, For a network meta-analysis I want to generate an intervalplot showing the forest plot but also …
Subscribe to:
Post Comments (Atom)
0 Response to Expanding dataset based on additional end years
Post a Comment