Announcement

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

  • spxtregress prediction accuracy is very very poor

    Hi all,

    I am not sure this is a Stata question or a stats question, but here goes. I have a panel dataset and am trying different model specifications for estimation. If I try to predict after a standard FE model:

    "xtreg pm25 pdsi c.crp i.month i.year pop fire_acres , fe" results look good, and I can use the predict command to get reasonable y-hat estimates.

    If I run the model as spatially correlated using a contiguity matrix:

    "spxtregress pm25 pdsi c.crp i.month i.year pop fire_acres , fe dvarlag(W)"

    and try to predict the y-hat estimates, they are way off (an order of magnitude many cases).

    W was created with "spmatrix create contiguity W if year==2001 & month==1"

    Both models solve/converge and the spatial matrix looks good for the ~2,200 counties.

    I realize this isn't a lot of information. Does anyone have an explanation for what might be going on?

    Thanks,
    Alex

  • #2
    I think you need to use the rform option of predict, not the xb option, after spxtregress.

    See help spxtregress postestimation and the link therein to the Methods and Formulas section of the manual.
    https://www.kripfganz.de/stata/

    Comment


    • #3
      I appreciate the the thought, but I am already using the rform. Moreover, if I predict the same model with the old xsmle command, I get much more accurate predictions...curious.

      Comment

      Working...
      X