sort country_a neighbor_a year
reg F.manu_pc ny_gdp_totl_rt_zs nb_ny_gdp_totl_rt_zs
or
bysort country_a year neighbor_a : reg F.manu_pc ny_gdp_totl_rt_zs nb_ny_gdp_totl_rt_zs
What am I doing wrong, please?
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input long(country_aa neighbor_aa) int year float manu_pc double(ny_gdp_totl_rt_zs nb_ny_gdp_totl_rt_zs) 47 20 1996 . . . 47 12 1996 . . 37.7621783106709 20 47 1996 . . . 47 9 1996 . . 7.94340249688005 48 47 1996 77.68823 .168458779650815 . 52 47 1996 13.384378 12.0422551725059 . 47 48 1996 . . .168458779650815 47 52 1996 . . 12.0422551725059 9 47 1996 . 7.94340249688005 . 47 26 1996 . . 4.52832385442244 12 47 1996 279.69852 37.7621783106709 . 48 47 1997 47.09065 .00110285976658886 . 47 52 1997 . . 14.3710414453306 47 9 1997 . . 10.7686925346104 47 20 1997 . . . 47 12 1997 . . . 52 47 1997 14.78843 14.3710414453306 . 20 47 1997 . . . 47 26 1997 . . . 9 47 1997 . 10.7686925346104 . 47 48 1997 . . .00110285976658886 12 47 1997 . . . 48 47 1998 73.36557 0 . 47 26 1998 78.98443 . 4.12050021800339 9 47 1998 . 10.0161330915123 . 52 47 1998 5.140973 13.3573025593913 . 47 52 1998 78.98443 . 13.3573025593913 20 47 1998 9.819602 . . 47 9 1998 78.98443 . 10.0161330915123 47 20 1998 78.98443 . . 47 48 1998 78.98443 . 0 12 47 1998 175.9033 10.5527217315912 . 47 12 1998 78.98443 . 10.5527217315912 9 47 1999 . 9.21127663740654 . 47 26 1999 . . 2.8619646885156 47 48 1999 . . . 47 9 1999 . . 9.21127663740654 47 12 1999 . . 6.72560250739514 20 47 1999 110.95158 31.6313618038599 . 48 47 1999 8.153259 . . 52 47 1999 17.125616 12.459792694739 . 47 52 1999 . . 12.459792694739 12 47 1999 . 6.72560250739514 . 47 20 1999 . . 31.6313618038599 47 12 2000 . 36.5175863901134 17.6864480170047 47 20 2000 . 36.5175863901134 . 52 47 2000 135.63635 . 36.5175863901134 48 47 2000 42.94725 0 36.5175863901134 47 26 2000 . 36.5175863901134 . 47 48 2000 . 36.5175863901134 0 47 9 2000 . 36.5175863901134 . 12 47 2000 . 17.6864480170047 36.5175863901134 9 47 2000 . . 36.5175863901134 47 52 2000 . 36.5175863901134 . 20 47 2000 . . 36.5175863901134 48 47 2001 53.64817 12.057854706049 . 9 47 2001 . 12.9636234796805 . 47 52 2001 . . 7.16171062839588 47 9 2001 . . 12.9636234796805 47 20 2001 . . 12.5192073767766 52 47 2001 508.2706 7.16171062839588 . 47 26 2001 . . . 47 48 2001 . . 12.057854706049 47 12 2001 . . 7.43382630864952 12 47 2001 . 7.43382630864952 . 20 47 2001 8.356758 12.5192073767766 . 47 52 2002 52.62327 . . 52 47 2002 5.360959 . . 9 47 2002 . 6.87088478357729 . 20 47 2002 36.49562 21.9944655131802 . 47 26 2002 52.62327 . 3.30414443954597 48 47 2002 177.85097 . . 12 47 2002 44.08522 29.1270470489371 . 47 20 2002 52.62327 . 21.9944655131802 47 48 2002 52.62327 . . 47 12 2002 52.62327 . 29.1270470489371 47 9 2002 52.62327 . 6.87088478357729 47 26 2003 . . 5.19874652321157 52 47 2003 30.24151 9.2324782172425 . 12 47 2003 228.6589 . . 47 20 2003 . . 14.4108160774123 20 47 2003 100.67827 14.4108160774123 . 47 12 2003 . . . 47 52 2003 . . 9.2324782172425 9 47 2003 165.0732 13.4576521096668 . 47 9 2003 . . 13.4576521096668 48 47 2003 160.2715 .123883750247631 . 47 48 2003 . . .123883750247631 52 47 2004 728.3743 15.6936079046794 . 48 47 2004 54.56564 7.26590982073566 . 12 47 2004 . 32.3167409500178 . 47 12 2004 . . 32.3167409500178 47 20 2004 . . 18.9035621146269 9 47 2004 . 6.3621830473943 . 20 47 2004 . 18.9035621146269 . 47 9 2004 . . 6.3621830473943 47 52 2004 . . 15.6936079046794 47 48 2004 . . 7.26590982073566 47 26 2004 . . 2.97168353810198 52 47 2005 1.3103304 14.1507408463472 . end label values country_aa country label values neighbor_aa country label def country 9 "Central African Republic", modify label def country 12 "Congo, Dem. Rep.", modify label def country 20 "Ethiopia", modify label def country 47 "South Sudan", modify label def country 48 "Sudan", modify label def country 52 "Uganda", modify label def country 26 "Kenya", modify
0 Response to lag regression: Not sorted error
Post a Comment