Announcement

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

  • Different coefficients with XTREG and REGHDFE

    Dear all.

    My name is Carlos and I am working in a gravity model with 133 countries in a time period of 14 years. I am writing you after reading many statalist post to find an answer to my question but I could not find it. The question is about why I got different results with XTREG and REGHDFE estimation. I have tried what some people recommended in the statalist forums but results are still differents.

    My intention is to apply Time invariant fixed effects to my estimation. I typed it and I got the following results:

    xtreg log_x log_distw log_gdp_o log_gdp_d log_gdpcap_o log_gdpcap_d contig colony comlang_ethno sibling fta_wto log_exchange_rate_o log_exchange_rate_d _Iexp_TIFE* _Iimp_TIFE*


    [ATTACH=CONFIG]n1520965[/ATTACH]

    reghdfe log_x log_distw log_gdp_o log_gdp_d log_gdpcap_o log_gdpcap_d contig colony comlang_ethno sibling fta_wto log_exchange_rate_o log_exchange_rate_d, absorb(exp_TIFE imp_TIFE)

    [ATTACH=CONFIG]n1520966[/ATTACH]

    I want to know what I am not doing correctly in order to get the same results. Specially because after that estimation I want to estimate it with Time variant fixed effects and Country pair fixed effects and I will need REGHDFE.

    I will really appreciate your help.

    Kind regards.

    Carlos A.

  • #2
    Carlos:
    it seems to me that your -xtreg-code does not include the -fe- clause.
    Please note that without the -fe- clause, -xtreg-adopts the -re- specification by default.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Dear Carlo.

      Thank you for the quick answer.

      Actually, I want to estimate it with TIME INVARIANT FIXED EFFECTS no with FIXED EFFECTS. That's why I didn't typed fe at the end of the command.

      I am attaching the results again because I see it did not attached correctly.

      xtreg log_x log_distw log_gdp_o log_gdp_d log_gdpcap_o log_gdpcap_d contig colony comlang_ethno sibling fta_wto log_exchange_rate_o log_exchange_rate_d _Iexp_TIFE* _Iimp_TIFE*
      Click image for larger version

Name:	xtreg.png
Views:	2
Size:	110.7 KB
ID:	1521444


      reghdfe log_x log_distw log_gdp_o log_gdp_d log_gdpcap_o log_gdpcap_d contig colony comlang_ethno sibling fta_wto log_exchange_rate_o log_exchange_rate_d, absorb(exp_TIFE imp_TIFE)

      Click image for larger version

Name:	reghdfe.png
Views:	2
Size:	36.3 KB
ID:	1521445


      I hope you can help me.

      Regards.

      Carlos A.

      Comment


      • #4
        Please start by reading the documentation. As you should know from the xtreg documentation, xtreg defaults to random effects and can provide fixed effects if you include the option fe. Unless you manipulate the panel identifier to allow for time, fixed effects are Time invariant fixed effects.

        reghdfe as you can readily see from the name uses fixed effects.

        If you don't want any panel effects, regress is the right estimator.

        Comment

        Working...
        X