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: How to add Q stats from -wntestq- to -esttab- table (hopefully with -estadd-)


From   Richard Herron <[email protected]>
To   [email protected]
Subject   st: How to add Q stats from -wntestq- to -esttab- table (hopefully with -estadd-)
Date   Wed, 14 Sep 2011 20:32:15 -0400

I have an -esttab- table with multiple -arima- models to which I would
like to add Q stats made with -wntestq-. I can't use -estadd scalar-
because Q stats are not part of -arima- objects. Is there a way that I
can chain together -predict, residuals- and -wntestq- to add Q stats
to my -esttab- table? Thanks!

Here is some code (including how I would find Q stats "manually"):

* ----- begin code -----
* I know how to combine regressions with -eststo-
webuse friedman2, clear
generate ln_m1 = ln(m1)
eststo clear
eststo: quietly arima DS4.ln_m1, ar(1) ma(2)
eststo: quietly arima DS4.ln_m1, ar(1) ma(1/2)
eststo: quietly arima DS4.ln_m1, ar(1/2) ma(2)
eststo: quietly arima DS4.ln_m1, ar(1/2) ma(1/2)

* and create tables with -esttab-
esttab, aic bic noobslast nomtitles

* I would like to add Q stats to each model with -estadd-, but I can't
figure out how

* here's how I find Q stats "manually"
quietly arima DS4.ln_m1, ar(1/2) ma(1/2)
predict res, residuals
wntestq res, lags(8)
* ----- end code -----
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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