Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: postestimation/prediction with -spatreg-


From   Andrew Hovel <[email protected]>
To   [email protected]
Subject   st: postestimation/prediction with -spatreg-
Date   Wed, 22 Jan 2014 18:27:44 -0600

Dear Statalisters:

Are there alternative ways to do postestimation and prediction after a
spatial lag using -spatreg- ?
Since many of the -estat- subcommands are not valid and the
-residuals- option is not valid on predict, I'm stuck trying to figure
out how to do an omitted-variable test, VIF test, Breusch-Pagan test,
and predict the residuals.

Here is the code:

spatwmat using CHIspw.dta , name(wtCHI) eigenval(eigCHI)
//unweighted log-log regress
regress ln_T_VIOLRT ln_T_POP00 ln_T_DENSITY ln_GINI ln_T_POVRTY ///
 ln_T_HSGRAD ln_T_HSVALU ln_T_NEWIMM ln_T_RACEHHI ln_T_FEMHED , robust
 //this regression rejected H0 in BP test
spatdiag, weights wt(CHI)
spatgsa T_VIOLRT, weights(wtCHI) moran

//SPATIAL REGRESS
spatreg ln_T_VIOLRT ln_T_POP00 ln_T_DENSITY ln_GINI ln_T_POVRTY ///
 ln_T_HSGRAD ln_T_HSVALU ln_T_NEWIMM ln_T_RACEHHI ln_T_FEMHED , ///
 weights(wtCHI) eigenval(eigCHI) model(lag) level(99)

  estat hettest //BP test for htskdy *invalid
  estat vif  //vif test for multicollinearity *invalid
  rvfplot //residual plot *invalid
  estat sum //sample summary *valid
  estat ovtest //omitted var *invalid
  predict double residCHInew, residuals //recalls residuals and
creates new var. *resid option not allowed

Is it valid to use the -estat- test results from the Regression that
is not spatially weighted? And is there a better way to predict the
residuals?

-Andrew Hovel
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index