Announcement

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

  • Coefplot with xtpqml

    Hi all,

    I am incurring in an apparently simple but annoying problem with coefplot when running regressions with xtpqml. To illustrate my problem, I would show you first what I would do with a simple OLS regression, which works perfectly with coefplot. Assume that I have a regression of the following type:

    Yit = alphai + beta-2 Treati,-2 + beta-1 Treati,-1 + beta0 Treati,0 + beta Treati,+1 + beta Treati,+2 + epsiloni,t

    The variable Treat are simple leads and lags of the treatment dummy which happen at time 0. Running a fixed effect regression in stata would imply the following code, assuming Treati,0 as baseline:

    Code:
    xtset i t
    gen zero = 0 
    
    eststo regression : xtreg y 1.treat_m2 1.treat_m1 1.treat_p1 1.treat_p2 zero , fe 
    
    
    coefplot regression ,  keep( 1.treat_m2 1.treat_m1 1.treat_p1 1.treat_p2 zero ) yline(0) ///
                         vertical  byopts(yrescale) xline(6.5 9.5) omitted  ///
                         order( 1.treat_m2 1.treat_m1 zero 1.treat_p1 1.treat_p2)
    This works perfectly, zero is dropped from the regression since it is always zero, but it appears on the coefplot as baseline (i.e. dot at zero without confindence interval), as I wanted.
    Unfortunately, I can't manage to do the same with xtpqml (I have to use xtpqml, so unfortunately xtpoisson is not a solution). Indeed, the variable zero get dropped from the regression but not stored for using it in coefplot. Could you suggest me any other way in which I can show the baseline (i.e. a dot at zero without confidence interval) in the coefplot when using xtpqml?

    Thanks a lot

    Andrea




Working...
X