Announcement

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

  • How to show Fixed Effects on GLS estimator for panel data

    Hi everyone,

    I'm estimating a gravity model with fixed effects using panel data. My database is i = 4556 and t = 14.
    I have heteroskedasticity and autocorrelation then use a gls estimator to solve these problems and I created a varivale and I created the variables z, where z1 are the variables that change in i and in t and z2 are variables that change only in i. Like this:

    xi: xtgls imp $z1 $z2 ano02 ano03 ano04 ano05 ano06 ano07 ano08 ano09 ano10 ano11 ano12 ano13 ano14, panels(heteroskedastic) corr(ar1)


    However, to estimate the potential trade flows, I need the fixed effects for each i, so which command I use on stata to show me this?

    Tkank you.

  • #2
    I suspect xtgls is estimating random effects. xtregar with fixed effects and robust standard errors is probably what you want. The post estimation will then predict the fixed effects.

    Comment


    • #3
      Leandra,

      Why you do not try -ppml- and -xtpoisson- commands?
      You might find this discussion useful.
      http://www.statalist.org/forums/foru...-gravity-model

      Best

      Comment


      • #4
        Leandra:
        if you're using a recent Stata release, there's no need to include -xi-; -fvvarlist- is much better suited for dealing with categorical variables and interactions.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment

        Working...
        X