[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
"F. Gao" <[email protected]> |

To |
[email protected] |

Subject |
Re: st: RE: How to let Arch give out of sample prediction?? |

Date |
Sun, 8 May 2005 07:12:48 -0500 |

Thanks, scott. I tried the command several times later, the error of not predicting did not happen again. That has me wondering why I see it in the first place. Now every time I try, the prediction would be for both in and out of sample. As I could not reproduce the mistake, I could not figure out what went wrong that time. Next time, I would try more times before surrending and ask for help! Thanks, all! Faye On 5/5/05, Scott Merryman <[email protected]> wrote: > Do you have observations for variable x beyond 1990? If so then -predict- > should give you out of sample predictions. In general, -predict- calculates > the requested statistic for all possible observations, whether they were > used in the model or not. > > In the example below, the model is estimated on data up to 1980q1, but the > predicted values go to 1990q4. > > . use http://www.stata-press.com/data/r9/wpi1.dta, clear > > . arch ln_wpi if tin(,1980q1), arch(1) garch(1) nolog > BFGS stepping has contracted, resetting BFGS Hessian (0) > > ARCH family regression > > Sample: 1960q1 to 1980q1 Number of obs = 81 > Wald chi2(.) = . > Log likelihood = 85.18144 Prob > chi2 = . > > ---------------------------------------------------------------------------- > | OPG > ln_wpi | Coef. Std. Err. z P>|z| [95% Conf. > Interval] > -------------+-------------------------------------------------------------- > ln_wpi | > _cons | 3.423398 .0011066 3093.53 0.000 3.421229 > 3.425567 > -------------+-------------------------------------------------------------- > ARCH | > arch | > L1. | 1.137414 .630359 1.80 0.071 -.0980673 > 2.372895 > garch | > L1. | .0000419 .1747459 0.00 1.000 -.3424538 > .3425376 > _cons | 7.66e-06 3.41e-06 2.25 0.025 9.76e-07 > .0000144 > ---------------------------------------------------------------------------- > > . predict y, y > > . l in -5/l > > +--------------------------------------+ > | wpi t ln_wpi y | > |--------------------------------------| > 120. | 109.4 1989q4 4.695011 3.423398 | > 121. | 111 1990q1 4.70953 3.423398 | > 122. | 110.8 1990q2 4.707727 3.423398 | > 123. | 112.8 1990q3 4.725616 3.423398 | > 124. | 116.2 1990q4 4.755313 3.423398 | > +--------------------------------------+ > > Scott > > > -----Original Message----- > > From: [email protected] [mailto:owner- > > [email protected]] On Behalf Of F. Gao > > Sent: Wednesday, May 04, 2005 10:20 PM > > To: [email protected] > > Subject: st: How to let Arch give out of sample prediction?? > > > > Dear all, > > > > I am using arch command to estimate a time series for a subset of > > years, and hoping to get predicted values for fitted values as well as > > the conditional variance out of sample (after 1990). I only get the > > in-sample predictions somehow. Here is what I did > > > > arch y x if year<1990, archm arch(1) garch(1) > > > > predict yhat > > > > predict cond_var, variance > > > > Can anyone tell me why the last two commands would not give out of > > sample predicitons? Thanks! > > > > Faye Gao > > > > * > * For searches and help try: > * http://www.stata.com/support/faqs/res/findit.html > * http://www.stata.com/support/statalist/faq > * http://www.ats.ucla.edu/stat/stata/ > * * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**References**:**st: How to let Arch give out of sample prediction??***From:*"F. Gao" <[email protected]>

**st: RE: How to let Arch give out of sample prediction??***From:*"Scott Merryman" <[email protected]>

- Prev by Date:
**st: [Stata 9]: Bug in ivprobit, twostep?** - Next by Date:
**st: RE: is stata web site down?** - Previous by thread:
**st: RE: How to let Arch give out of sample prediction??** - Next by thread:
**st: RE: How to let Arch give out of sample prediction??** - Index(es):

© Copyright 1996–2024 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |