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
using gravity equation to control for the impact of antidumping duties on trade flowsHello Statalist members, I'm currently working on my bachelor thesis and therefore I'm analyzing th…
Sequence effect with repeated measuresDear team, I have a crossover design with following repeated data structure: Two methods for measuri…
What is the syntax to retrieve r-class stored results in multiple equation models, like bivariate poisson, var, or sure?I can retrieve coefficient estimates by: gen Cf = [equationname]_b[varname] ,no problem! But I am ha…
Creating a Dummy variable for every first duplicate observation (using -Duplicates Drop- without deleting duplicate observations)Hey all, I was wondering if there is a formula to create a dummy variable for the first observatio…
Replicating fitted values graph Hi all, I am hoping to replicate a graph from this paper in Political Analysis. The graph, attach…
Subscribe to:
Post Comments (Atom)
0 Response to Expanding dataset based on additional end years
Post a Comment