Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Difference between two codes to control for country-year fixed effects

    I was wondering whether someone could explain me the differences between the two codes listed below. I am looking for a code to absorb the time-varying variables (ln_gdp, ln_pop) via including destination-year fixed effects.
    In the first one, the output doesn't omit ln_gdp, ln_dist and ln_pop whereas in the 2nd code the output does omit them.

    Moreover, if I want to include product fixed effects, which are listed in the variable HS1992, how can I do this? If I just include i.HS1992 after destringing them, I get a notification saying

    maxvar too small
    You have attempted to use an interaction with too many levels or attempted to fit a model with too many variables. You need to increase maxvar; it is
    currently 2048. Use set maxvar; see help maxvar.

    If you are using factor variables and included an interaction that has lots of missing cells, try set emptycells drop to reduce the required matrix size; see
    help set emptycells.

    If you are using factor variables, you might have accidentally treated a continuous variable as a categorical, resulting in lots of categories. Use the c.
    operator on such variables.



    Code:
    use Regression_JPN, clear 
    egen idcode = group(Destination HS1992)
    egen Destid = group(Destination year)
    xtset idcode year 
    xtreg ln_trade ln_dist ln_pop ln_gdp ln_tariff ln_Tech ln_NonTech rta comlang_off comrelig contig i.Destid, fe robust
    Code:
    use Regression_JPN, clear 
    egen idcode = group(Destination HS1992)
    egen Destid = group(Destination year)
    xtset Destid 
    xtreg ln_trade ln_dist ln_pop ln_gdp ln_tariff ln_Tech ln_NonTech rta comlang_off comrelig contig i.Destid, fe robust

    Sample data for two product codes:

    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input int year str9 Origin str32 Destination str6 HS1992 float(ln_trade ln_dist ln_pop ln_gdp ln_tariff ln_Tech ln_NonTech) byte contig float(comlang_off comrelig) byte rta
    2004 "JPN" "ARE" "010111"          . 8.979669  19.96277 41.07291         .  .6931472 0 0 0 .000051 0
    2005 "JPN" "ARE" "010111"    2.68198 8.979669 20.088606 41.25508         0 1.0986123 0 0 0 .000051 0
    2007 "JPN" "ARE" "010111"          0 8.979669  20.42315 41.56305         0 1.0986123 0 0 0 .000051 0
    2008 "JPN" "ARE" "010111"          0 8.979669  20.58195 41.87167         0 1.0986123 0 0 0 .000051 0
    2009 "JPN" "ARE" "010111"          0 8.979669  20.70768 41.69077         0 1.0986123 0 0 0 .000051 0
    2011 "JPN" "ARE" "010111"          0 8.979669  20.85498 42.16531         0 1.0986123 0 0 0 .000051 0
    2013 "JPN" "ARE" "010111"          0 8.979669  20.89732  42.1293         0 1.3862944 0 0 0 .000051 0
    2014 "JPN" "ARE" "010111"          0 8.979669 20.866936 42.11692         0 1.3862944 0 0 0 .000051 0
    2015 "JPN" "ARE" "010111"   3.213582 8.979669  20.87503 41.89692         0 1.3862944 0 0 0 .000051 0
    2016 "JPN" "ARE" "010111"  .06015392 8.979669 20.886396 41.99035         0 1.3862944 0 0 0 .000051 0
    2017 "JPN" "ARE" "010111"   .9555115 8.979669 20.907953  42.0891         0 1.3862944 0 0 0 .000051 0
    2018 "JPN" "ARE" "010111"          0 8.979669 20.920967 42.20108         0 1.3862944 0 0 0 .000051 0
    2019 "JPN" "ARE" "010111"          0 8.979669 20.933264 42.21114         0 1.3862944 0 0 0 .000051 0
    2020 "JPN" "ARE" "010111"          0 8.979669 20.942055 42.04266         0 1.3862944 0 0 0 .000051 0
    2021 "JPN" "ARE" "010111"          0 8.979669  20.88626 42.16465         0 1.3862944 0 0 0 .000051 0
    1997 "JPN" "AUS" "010111"          0 8.960981 21.571203 42.07983         0         0 0 0 0 .003891 0
    1998 "JPN" "AUS" "010111"   6.792021 8.960981  21.58415 41.89326         0  .6931472 0 0 0 .003891 0
    1999 "JPN" "AUS" "010111"    8.24438 8.960981 21.597475 41.99055         0 1.0986123 0 0 0 .003891 0
    2000 "JPN" "AUS" "010111"   7.444451 8.960981 21.611134  42.1212         0 1.0986123 0 0 0 .003891 0
    2001 "JPN" "AUS" "010111"    6.65124 8.960981 21.626814 41.90044         0 1.0986123 0 0 0 .003891 0
    2002 "JPN" "AUS" "010111"   5.547499 8.960981 21.641344 41.89725         0 1.0986123 0 0 0 .003891 0
    2003 "JPN" "AUS" "010111"   7.964765 8.960981 21.655825 42.14323         0 1.0986123 0 0 0 .003891 0
    2004 "JPN" "AUS" "010111"   3.889716 8.960981 21.667753 42.49504         0 1.0986123 0 0 0 .003891 0
    2005 "JPN" "AUS" "010111"   7.661951 8.960981 21.681046 42.60022         0 1.0986123 0 0 0 .003891 0
    2006 "JPN" "AUS" "010111"   7.902208 8.960981 21.695665 42.62684         0 1.0986123 0 0 0 .003891 0
    2007 "JPN" "AUS" "010111"   7.876872 8.960981 21.702026 42.75969         0 1.0986123 0 0 0 .003891 0
    2008 "JPN" "AUS" "010111"          0 8.960981 21.721546 43.07891         0 1.3862944 0 0 0 .003891 0
    2009 "JPN" "AUS" "010111"          0 8.960981  21.74101  42.9864         0  1.609438 0 0 0 .003891 0
    2010 "JPN" "AUS" "010111"          0 8.960981 21.755726 43.28258         0  1.609438 0 0 0 .003891 0
    2011 "JPN" "AUS" "010111"          0 8.960981  21.77249 43.55035         0  1.609438 0 0 0 .003891 0
    2012 "JPN" "AUS" "010111"          0 8.960981 21.787527 43.65883         0  1.609438 0 0 0 .003891 0
    2013 "JPN" "AUS" "010111"          0 8.960981  21.80353 43.48468         0  1.609438 0 0 0 .003891 0
    2014 "JPN" "AUS" "010111"          0 8.960981 21.817194 43.40341         0  1.609438 0 0 0 .003891 0
    2015 "JPN" "AUS" "010111"   6.581553 8.960981 21.830044 43.22096         0  1.609438 0 0 0 .003891 1
    2016 "JPN" "AUS" "010111"   7.106945 8.960981  21.84299 43.22993         0  1.609438 0 0 0 .003891 1
    2017 "JPN" "AUS" "010111"   9.136545 8.960981  21.86083 43.32487         0 1.7917595 0 0 0 .003891 1
    2018 "JPN" "AUS" "010111"   9.291677 8.960981 21.874166 43.41997         0 1.7917595 0 0 0 .003891 1
    2019 "JPN" "AUS" "010111"   9.591511 8.960981 21.887293   43.416         0 1.7917595 0 0 0 .003891 1
    2020 "JPN" "AUS" "010111"   6.343467 8.960981 21.896477 43.35101         . 1.7917595 0 0 0 .003891 1
    2021 "JPN" "AUS" "010111"   9.272713 8.960981  21.89529 43.48405         0   1.94591 0 0 0 .003891 1
    1997 "JPN" "BRA" "010111"          0 9.827147  23.77006 42.77289         0         0 0 0 0 .005628 0
    1998 "JPN" "BRA" "010111"          0 9.827147  23.78773 42.64143         0         0 0 0 0 .005628 0
    1999 "JPN" "BRA" "010111"          0 9.827147  23.80447 42.40255         0         0 0 0 0 .005628 0
    2000 "JPN" "BRA" "010111"          0 9.827147  23.82063 42.56174         0         0 0 0 0 .005628 0
    2001 "JPN" "BRA" "010111"          0 9.827147  23.83684 42.28067         0         0 0 0 0 .005628 0
    2002 "JPN" "BRA" "010111"          0 9.827147  23.85278 42.14328  1.321756         0 0 0 0 .005628 0
    2003 "JPN" "BRA" "010111"          0 9.827147 23.867983 42.31247  1.321756         0 0 0 0 .005628 0
    2004 "JPN" "BRA" "010111"          0 9.827147 23.880663 42.57481 1.0986123         0 0 0 0 .005628 0
    2005 "JPN" "BRA" "010111"          0 9.827147  23.89228  42.8411  .8960881  .6931472 0 0 0 .005628 0
    2006 "JPN" "BRA" "010111"          0 9.827147  23.90279 43.00344  .8197798 1.0986123 0 0 0 .005628 0
    2007 "JPN" "BRA" "010111"  4.4587793 9.827147 23.912756 43.23066  .8878912 1.3862944 0 0 0 .005628 0
    2008 "JPN" "BRA" "010111"          0 9.827147   23.9215 43.52824  .8878912  1.609438 0 0 0 .005628 0
    2009 "JPN" "BRA" "010111"          0 9.827147  23.92931 43.54552  .8458683 1.7917595 0 0 0 .005628 0
    2010 "JPN" "BRA" "010111"          0 9.827147 23.937315 43.91268  .8671005 1.7917595 0 0 0 .005628 0
    2011 "JPN" "BRA" "010111"          0 9.827147 23.948986 44.12936  .8878912   1.94591 0 0 0 .005628 0
    2012 "JPN" "BRA" "010111"          0 9.827147 23.955685 44.04106  .9707789   1.94591 0 0 0 .005628 0
    2013 "JPN" "BRA" "010111"          0 9.827147 23.962486 43.84875         0 2.0794415 0 0 0 .005628 0
    2014 "JPN" "BRA" "010111"          0 9.827147 23.981033 43.92378         0 2.0794415 0 0 0 .005628 0
    2015 "JPN" "BRA" "010111"          0 9.827147   23.9885  43.5141         0 2.1972246 0 0 0 .005628 0
    2016 "JPN" "BRA" "010111"          0 9.827147  23.99552 43.62944         0 2.1972246 0 0 0 .005628 0
    2017 "JPN" "BRA" "010111"          0 9.827147  23.99475 43.76645         0 2.3025851 0 0 0 .005628 0
    2018 "JPN" "BRA" "010111"          0 9.827147  24.00056 43.71405         0  2.397895 0 0 0 .005628 0
    2019 "JPN" "BRA" "010111"          0 9.827147 24.005985  43.7154         0  2.397895 0 0 0 .005628 0
    2020 "JPN" "BRA" "010111"          0 9.827147  24.00971 43.43538         0  2.397895 0 0 0 .005628 0
    2021 "JPN" "BRA" "010111"          0 9.827147  24.01676 43.51968         0  2.397895 0 0 0 .005628 0
    1997 "JPN" "CAN" "010111"   3.107095 9.246383 22.053286 42.48153         0         0 0 0 0  .00546 0
    1998 "JPN" "CAN" "010111"   1.485008 9.246383  22.06447 42.35147         0         0 0 0 0  .00546 0
    1999 "JPN" "CAN" "010111"   .4427609 9.246383  22.07464 42.54147         0         0 0 0 0  .00546 0
    2000 "JPN" "CAN" "010111"          0 9.246383 22.085203 42.69887         0  .6931472 0 0 0  .00546 0
    2001 "JPN" "CAN" "010111"  1.3352642 9.246383 22.097496 42.56102         0  .6931472 0 0 0  .00546 0
    2002 "JPN" "CAN" "010111"  .26159474 9.246383 22.108793 42.54371         0  .6931472 0 0 0  .00546 0
    2003 "JPN" "CAN" "010111"  .02566775 9.246383 22.120895 42.78677         0  .6931472 0 0 0  .00546 0
    2004 "JPN" "CAN" "010111" .016857117 9.246383  22.13125 43.00286         0  .6931472 0 0 0  .00546 0
    2005 "JPN" "CAN" "010111"   .3082197 9.246383 22.141205 43.11847         0  .6931472 0 0 0  .00546 0
    2006 "JPN" "CAN" "010111"  1.1281711 9.246383  22.14904 43.18889         0  .6931472 0 0 0  .00546 0
    2007 "JPN" "CAN" "010111"    .567584 9.246383 22.158854 43.29514         0  .6931472 0 0 0  .00546 0
    2008 "JPN" "CAN" "010111"          0 9.246383 22.169153 43.45879         0 1.0986123 0 0 0  .00546 0
    2009 "JPN" "CAN" "010111"          0 9.246383 22.179457  43.3784         0 1.0986123 0 0 0  .00546 0
    2010 "JPN" "CAN" "010111"          0 9.246383 22.189754  43.6292         0 1.0986123 0 0 0  .00546 0
    2011 "JPN" "CAN" "010111"  .26390153 9.246383 22.202503 43.79828         0 1.0986123 0 0 0  .00546 0
    2012 "JPN" "CAN" "010111"   4.995021 9.246383  22.21241 43.83031         0 1.0986123 0 0 0  .00546 0
    2013 "JPN" "CAN" "010111"   .1061602 9.246383  22.22222  43.6423         0 1.0986123 0 0 0  .00546 0
    2014 "JPN" "CAN" "010111"  .29565024 9.246383 22.232656 43.60907         0 1.0986123 0 0 0  .00546 0
    2015 "JPN" "CAN" "010111"          0 9.246383  22.24011 43.36435         0 1.0986123 0 0 0  .00546 0
    2016 "JPN" "CAN" "010111"   .0834216 9.246383   22.2511 43.46888         0 1.0986123 0 0 0  .00546 0
    2017 "JPN" "CAN" "010111"   .6243328 9.246383  22.25656 43.54237         0 1.0986123 0 0 0  .00546 0
    2018 "JPN" "CAN" "010111"          0 9.246383  22.26866 43.60874         0 1.0986123 0 0 0  .00546 1
    2019 "JPN" "CAN" "010111"   .7236764 9.246383  22.28072 43.64034         0 1.0986123 0 0 0  .00546 1
    2020 "JPN" "CAN" "010111"          0 9.246383 22.288214 43.56545         0 1.0986123 0 0 0  .00546 1
    2021 "JPN" "CAN" "010111"          0 9.246383 22.293304 43.73138         0 1.0986123 0 0 0  .00546 1
    1997 "JPN" "CHE" "010111"          0 9.170039 20.611046 41.66112         0         0 0 0 0 .007056 0
    1998 "JPN" "CHE" "010111"          0 9.170039  20.61654 41.59038         0  .6931472 0 0 0 .007056 0
    1999 "JPN" "CHE" "010111"          0 9.170039  20.62321 41.69724         0  .6931472 0 0 0 .007056 0
    2000 "JPN" "CHE" "010111"          0 9.170039 20.630564 41.69751         0 1.0986123 0 0 0 .007056 0
    2001 "JPN" "CHE" "010111"          0 9.170039  20.63909 41.59414         0 1.0986123 0 0 0 .007056 0
    2002 "JPN" "CHE" "010111"   5.966349 9.170039  20.64898  41.6278         0 1.0986123 0 0 0 .007056 0
    2003 "JPN" "CHE" "010111"          0 9.170039  20.65854 41.86166         0 1.0986123 0 0 0 .007056 0
    2004 "JPN" "CHE" "010111"          0 9.170039  20.66575 42.05208         0 1.0986123 0 0 0 .007056 0
    2005 "JPN" "CHE" "010111"          0 9.170039  20.67225 42.06884         0 1.0986123 0 0 0 .007056 0
    2006 "JPN" "CHE" "010111"          0 9.170039  20.67839 42.07238         0 1.3862944 0 0 0 .007056 0
    end
    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input int year str9 Origin str32 Destination str6 HS1992 float(ln_trade ln_dist ln_pop ln_gdp ln_tariff ln_Tech ln_NonTech) byte contig float(comlang_off comrelig) byte rta
    2004 "JPN" "ARE" "010119"         . 8.979669  19.96277 41.07291         .  .6931472 0 0 0 .000051 0
    2005 "JPN" "ARE" "010119"  3.410124 8.979669 20.088606 41.25508         0 1.0986123 0 0 0 .000051 0
    2007 "JPN" "ARE" "010119"         0 8.979669  20.42315 41.56305         0 1.0986123 0 0 0 .000051 0
    2008 "JPN" "ARE" "010119" 4.6997347 8.979669  20.58195 41.87167         0 1.0986123 0 0 0 .000051 0
    2009 "JPN" "ARE" "010119"         0 8.979669  20.70768 41.69077         0 1.0986123 0 0 0 .000051 0
    2010 "JPN" "ARE" "010119"  9.609387 8.979669   20.7964 41.89885         . 1.0986123 0 0 0 .000051 0
    2011 "JPN" "ARE" "010119"         0 8.979669  20.85498 42.16531         0 1.0986123 0 0 0 .000051 0
    2012 "JPN" "ARE" "010119"         0 8.979669 20.883926 42.24266         0 1.0986123 0 0 0 .000051 0
    2013 "JPN" "ARE" "010119"         0 8.979669  20.89732  42.1293         0 1.3862944 0 0 0 .000051 0
    2014 "JPN" "ARE" "010119"         0 8.979669 20.866936 42.11692         0 1.3862944 0 0 0 .000051 0
    2015 "JPN" "ARE" "010119"         0 8.979669  20.87503 41.89692         0 1.3862944 0 0 0 .000051 0
    2016 "JPN" "ARE" "010119"  5.610548 8.979669 20.886396 41.99035         0 1.3862944 0 0 0 .000051 0
    2017 "JPN" "ARE" "010119"  5.473446 8.979669 20.907953  42.0891         0 1.3862944 0 0 0 .000051 0
    2018 "JPN" "ARE" "010119"         0 8.979669 20.920967 42.20108         0 1.3862944 0 0 0 .000051 0
    2019 "JPN" "ARE" "010119" 2.2973716 8.979669 20.933264 42.21114         0 1.3862944 0 0 0 .000051 0
    2020 "JPN" "ARE" "010119"  3.780364 8.979669 20.942055 42.04266         0 1.3862944 0 0 0 .000051 0
    2021 "JPN" "ARE" "010119"         0 8.979669  20.88626 42.16465         0 1.3862944 0 0 0 .000051 0
    1997 "JPN" "AUS" "010119"         0 8.960981 21.571203 42.07983         0         0 0 0 0 .003891 0
    1998 "JPN" "AUS" "010119"  6.822485 8.960981  21.58415 41.89326         0  .6931472 0 0 0 .003891 0
    1999 "JPN" "AUS" "010119"  5.307277 8.960981 21.597475 41.99055         0 1.0986123 0 0 0 .003891 0
    2000 "JPN" "AUS" "010119"  6.287604 8.960981 21.611134  42.1212         0 1.0986123 0 0 0 .003891 0
    2001 "JPN" "AUS" "010119"  5.216359 8.960981 21.626814 41.90044         0 1.0986123 0 0 0 .003891 0
    2002 "JPN" "AUS" "010119"         0 8.960981 21.641344 41.89725         0 1.0986123 0 0 0 .003891 0
    2003 "JPN" "AUS" "010119"         0 8.960981 21.655825 42.14323         0 1.0986123 0 0 0 .003891 0
    2004 "JPN" "AUS" "010119" .55100745 8.960981 21.667753 42.49504         0 1.0986123 0 0 0 .003891 0
    2005 "JPN" "AUS" "010119"  4.384486 8.960981 21.681046 42.60022         0 1.0986123 0 0 0 .003891 0
    2006 "JPN" "AUS" "010119"  5.580009 8.960981 21.695665 42.62684         0 1.0986123 0 0 0 .003891 0
    2007 "JPN" "AUS" "010119"  5.732473 8.960981 21.702026 42.75969         0 1.0986123 0 0 0 .003891 0
    2008 "JPN" "AUS" "010119"         0 8.960981 21.721546 43.07891         0 1.3862944 0 0 0 .003891 0
    2009 "JPN" "AUS" "010119"         0 8.960981  21.74101  42.9864         0  1.609438 0 0 0 .003891 0
    2010 "JPN" "AUS" "010119"   5.14933 8.960981 21.755726 43.28258         0  1.609438 0 0 0 .003891 0
    2011 "JPN" "AUS" "010119"         0 8.960981  21.77249 43.55035         0  1.609438 0 0 0 .003891 0
    2012 "JPN" "AUS" "010119"         0 8.960981 21.787527 43.65883         0  1.609438 0 0 0 .003891 0
    2013 "JPN" "AUS" "010119"         0 8.960981  21.80353 43.48468         0  1.609438 0 0 0 .003891 0
    2014 "JPN" "AUS" "010119"  2.779378 8.960981 21.817194 43.40341         0  1.609438 0 0 0 .003891 0
    2015 "JPN" "AUS" "010119"  8.188037 8.960981 21.830044 43.22096         0  1.609438 0 0 0 .003891 1
    2016 "JPN" "AUS" "010119"  7.286732 8.960981  21.84299 43.22993         0  1.609438 0 0 0 .003891 1
    2017 "JPN" "AUS" "010119"  8.460649 8.960981  21.86083 43.32487         0 1.7917595 0 0 0 .003891 1
    2018 "JPN" "AUS" "010119"  8.031148 8.960981 21.874166 43.41997         0 1.7917595 0 0 0 .003891 1
    2019 "JPN" "AUS" "010119"  7.817092 8.960981 21.887293   43.416         0 1.7917595 0 0 0 .003891 1
    2020 "JPN" "AUS" "010119"  6.068285 8.960981 21.896477 43.35101         0 1.7917595 0 0 0 .003891 1
    2021 "JPN" "AUS" "010119"  6.857221 8.960981  21.89529 43.48405         0   1.94591 0 0 0 .003891 1
    1997 "JPN" "BRA" "010119"         0 9.827147  23.77006 42.77289 1.0986123         0 0 0 0 .005628 0
    1998 "JPN" "BRA" "010119"         0 9.827147  23.78773 42.64143 1.7917595         0 0 0 0 .005628 0
    1999 "JPN" "BRA" "010119"         0 9.827147  23.80447 42.40255 1.5871923         0 0 0 0 .005628 0
    2000 "JPN" "BRA" "010119"         0 9.827147  23.82063 42.56174 1.7917595         0 0 0 0 .005628 0
    2001 "JPN" "BRA" "010119"         0 9.827147  23.83684 42.28067  1.704748         0 0 0 0 .005628 0
    2002 "JPN" "BRA" "010119"         0 9.827147  23.85278 42.14328  1.704748         0 0 0 0 .005628 0
    2003 "JPN" "BRA" "010119"         0 9.827147 23.867983 42.31247  1.704748         0 0 0 0 .005628 0
    2004 "JPN" "BRA" "010119"         0 9.827147 23.880663 42.57481 1.4374627         0 0 0 0 .005628 0
    2005 "JPN" "BRA" "010119"         0 9.827147  23.89228  42.8411 1.2892327  .6931472 0 0 0 .005628 0
    2006 "JPN" "BRA" "010119"         0 9.827147  23.90279 43.00344 1.1568812 1.0986123 0 0 0 .005628 0
    2007 "JPN" "BRA" "010119"         0 9.827147 23.912756 43.23066  1.178655 1.3862944 0 0 0 .005628 0
    2008 "JPN" "BRA" "010119"         0 9.827147   23.9215 43.52824  1.178655  1.609438 0 0 0 .005628 0
    2009 "JPN" "BRA" "010119"         0 9.827147  23.92931 43.54552 1.1568812 1.7917595 0 0 0 .005628 0
    2010 "JPN" "BRA" "010119"         0 9.827147 23.937315 43.91268 1.1568812 1.7917595 0 0 0 .005628 0
    2011 "JPN" "BRA" "010119"         0 9.827147 23.948986 44.12936  1.196948   1.94591 0 0 0 .005628 0
    2012 "JPN" "BRA" "010119"         0 9.827147 23.955685 44.04106 1.2892327   1.94591 0 0 0 .005628 0
    2013 "JPN" "BRA" "010119"         0 9.827147 23.962486 43.84875 1.0986123 2.0794415 0 0 0 .005628 0
    2014 "JPN" "BRA" "010119"         0 9.827147 23.981033 43.92378   1.89762 2.0794415 0 0 0 .005628 0
    2015 "JPN" "BRA" "010119"         0 9.827147   23.9885  43.5141  .9895412 2.1972246 0 0 0 .005628 0
    2016 "JPN" "BRA" "010119"         0 9.827147  23.99552 43.62944 1.0296195 2.1972246 0 0 0 .005628 0
    2017 "JPN" "BRA" "010119"         0 9.827147  23.99475 43.76645  .7466879 2.3025851 0 0 0 .005628 0
    2018 "JPN" "BRA" "010119"         0 9.827147  24.00056 43.71405  .8458683  2.397895 0 0 0 .005628 0
    2019 "JPN" "BRA" "010119"         0 9.827147 24.005985  43.7154  .9321641  2.397895 0 0 0 .005628 0
    2020 "JPN" "BRA" "010119"         0 9.827147  24.00971 43.43538  .9555115  2.397895 0 0 0 .005628 0
    2021 "JPN" "BRA" "010119"         0 9.827147  24.01676 43.51968  .8754687  2.397895 0 0 0 .005628 0
    1997 "JPN" "CAN" "010119"         0 9.246383 22.053286 42.48153         0         0 0 0 0  .00546 0
    1998 "JPN" "CAN" "010119"         0 9.246383  22.06447 42.35147         0         0 0 0 0  .00546 0
    1999 "JPN" "CAN" "010119"         0 9.246383  22.07464 42.54147         0         0 0 0 0  .00546 0
    2000 "JPN" "CAN" "010119"         0 9.246383 22.085203 42.69887         0  .6931472 0 0 0  .00546 0
    2001 "JPN" "CAN" "010119"         0 9.246383 22.097496 42.56102         0  .6931472 0 0 0  .00546 0
    2002 "JPN" "CAN" "010119"         0 9.246383 22.108793 42.54371         0  .6931472 0 0 0  .00546 0
    2003 "JPN" "CAN" "010119"         0 9.246383 22.120895 42.78677         0  .6931472 0 0 0  .00546 0
    2004 "JPN" "CAN" "010119"         0 9.246383  22.13125 43.00286         0  .6931472 0 0 0  .00546 0
    2005 "JPN" "CAN" "010119"  .1283932 9.246383 22.141205 43.11847         0  .6931472 0 0 0  .00546 0
    2006 "JPN" "CAN" "010119"         0 9.246383  22.14904 43.18889         0  .6931472 0 0 0  .00546 0
    2007 "JPN" "CAN" "010119"         0 9.246383 22.158854 43.29514         0  .6931472 0 0 0  .00546 0
    2008 "JPN" "CAN" "010119" .52650213 9.246383 22.169153 43.45879         0 1.0986123 0 0 0  .00546 0
    2009 "JPN" "CAN" "010119"         0 9.246383 22.179457  43.3784         0 1.0986123 0 0 0  .00546 0
    2010 "JPN" "CAN" "010119"         0 9.246383 22.189754  43.6292         0 1.0986123 0 0 0  .00546 0
    2011 "JPN" "CAN" "010119"         0 9.246383 22.202503 43.79828         0 1.0986123 0 0 0  .00546 0
    2012 "JPN" "CAN" "010119"         0 9.246383  22.21241 43.83031         0 1.0986123 0 0 0  .00546 0
    2013 "JPN" "CAN" "010119"         0 9.246383  22.22222  43.6423         0 1.0986123 0 0 0  .00546 0
    2014 "JPN" "CAN" "010119"         0 9.246383 22.232656 43.60907         0 1.0986123 0 0 0  .00546 0
    2015 "JPN" "CAN" "010119"         0 9.246383  22.24011 43.36435         0 1.0986123 0 0 0  .00546 0
    2016 "JPN" "CAN" "010119"         0 9.246383   22.2511 43.46888         0 1.0986123 0 0 0  .00546 0
    2017 "JPN" "CAN" "010119" .12221763 9.246383  22.25656 43.54237         0 1.0986123 0 0 0  .00546 0
    2018 "JPN" "CAN" "010119"         0 9.246383  22.26866 43.60874         0 1.0986123 0 0 0  .00546 1
    2019 "JPN" "CAN" "010119"         0 9.246383  22.28072 43.64034         0 1.0986123 0 0 0  .00546 1
    2020 "JPN" "CAN" "010119"         0 9.246383 22.288214 43.56545         0 1.0986123 0 0 0  .00546 1
    2021 "JPN" "CAN" "010119" .12044616 9.246383 22.293304 43.73138         0 1.0986123 0 0 0  .00546 1
    1997 "JPN" "CHE" "010119"         0 9.170039 20.611046 41.66112         0         0 0 0 0 .007056 0
    1998 "JPN" "CHE" "010119"         0 9.170039  20.61654 41.59038         0  .6931472 0 0 0 .007056 0
    1999 "JPN" "CHE" "010119"         0 9.170039  20.62321 41.69724         0  .6931472 0 0 0 .007056 0
    2000 "JPN" "CHE" "010119"         0 9.170039 20.630564 41.69751         0 1.0986123 0 0 0 .007056 0
    2001 "JPN" "CHE" "010119"         0 9.170039  20.63909 41.59414         0 1.0986123 0 0 0 .007056 0
    2002 "JPN" "CHE" "010119"         0 9.170039  20.64898  41.6278         0 1.0986123 0 0 0 .007056 0
    2003 "JPN" "CHE" "010119"         0 9.170039  20.65854 41.86166         0 1.0986123 0 0 0 .007056 0
    2004 "JPN" "CHE" "010119"         0 9.170039  20.66575 42.05208         0 1.0986123 0 0 0 .007056 0
    end

  • #2
    Try the command by Correia et al. (2017) "reghdfe". This might solve the problem.

    Comment


    • #3
      reghdfe is the best option.

      sometimes the order in which things appear in the variable list determines what gets dropped. that may explain your situation.

      Comment


      • #4
        For me, the second model estimates no coefficients except for the constant. The first model provides very small coefficient with prop==1 in every case.

        Move i.Destid to the front the line, and you get no coefficients in Model 1.

        reghdfe will still give you coefficients on the Xs that are not time invariant.

        If they don't interest you, then leave them out. Not sure why you would do that, (though they are not significant; nothing is). Basically what you are doing is taking the average of gdp, which is then time invariant.

        Comment

        Working...
        X