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]

From |
Robert A Yaffee <bob.yaffee@nyu.edu> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Disabling Kalman filter in arima |

Date |
Sat, 18 Sep 2010 05:58:28 -0400 |

Kristian, Andrew Harvey has a parameterization for the model. Whenever you do nonlinear estimation with ML you will need some starting values. You can begin with a diffuse prior if you wish. The process if properly specified should iterate to a solution, although it will take a little longer to do so as long as the augmented Kalman filter is being used. The nice thing about the Kalman filter is that it can handle missing observations, which arima by itself cannot. Also the expected value of the error term is = 0 and the first lag of it might not be far off at the start of the iterations. As for the starting value of the variance with diffuse prior, that can be very large without causing any difficulty. Thanks to the duality between an MA(1) model and an infinite lagged AR model, the Kalman filter, which uses a first order Markov process to optimize flexibility in the state equation should be able to handle the DGP unless your series is intrinsically nonlinear. You could always try loading cubic spliines into the state vector if faced with that kind of situation. However, if your series is really nonGaussian and nonlinear, you will probably need to use MCM to estimate it. Cheers, Robert Robert A. Yaffee, Ph.D. Research Professor Silver School of Social Work New York University Biosketch: http://homepages.nyu.edu/~ray1/Biosketch2009.pdf CV: http://homepages.nyu.edu/~ray1/vita.pdf ----- Original Message ----- From: kristian@hefting.dk Date: Friday, September 17, 2010 4:06 am Subject: Re: st: Disabling Kalman filter in arima To: statalist@hsphsun2.harvard.edu > Hi Robert and everybody else > > Thanks for your answer. As I wrote to Maarten I should have been more > specific. My problem is in the start of the dataset with e.g. a > MA(1)-model: > > Y(t)=B0+B1*u(t-1)+u(t), where u(t)=Y(t)-predicted Y(t) > > If I estimate this model I obtain some estimates for B0 and B1. If I want > to obtain a predicted value for the first value of Y in my dataset - Y(0) > - I need some value for u(0-1). I would prefer to put u(0-1)=0 (both when > I estimate the equation and when I later use it for predictions) but Stata > does it different. It assigns some value to u(0-1) (even though Y(0-1) > and > predicted Y(0-1) is unobserved) and my guess is that it uses the Kalman > filter to obtain this value. Because of this I want to turn of the Kalman > filter (or anything that would make Stata set u(0-1)=0 during estimation > and prediction). > > > > Kristian, > > You would do better to temporarily recode your missing values as > zero > > yourself, > > while maintaining a missing value vector to tell you which ones are > > actually missing. > > -Regards, > > Robert > > > > Robert A. Yaffee, Ph.D. > > Research Professor > > Silver School of Social Work > > New York University > > > > Biosketch: http://homepages.nyu.edu/~ray1/Biosketch2009.pdf > > > > CV: http://homepages.nyu.edu/~ray1/vita.pdf > > > > ----- Original Message ----- > > From: kristian@hefting.dk > > Date: Thursday, September 16, 2010 6:13 am > > Subject: st: Disabling Kalman filter in arima > > To: statalist@hsphsun2.harvard.edu > > > > > >> Hi all > >> > >> Stata uses a Kalman filter to replace missing/unobserved data when > >> fitting > >> an arima model. Is there any way to disable this filter so the > >> missing/unobserved data is treated as zeros? > >> > >> Regards > >> Kristian Hefting > >> > >> * > >> * 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/ > > * > > * 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/ > > > > > * > * 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/ * * 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/

**References**:**st: Disabling Kalman filter in arima***From:*kristian@hefting.dk

**Re: st: Disabling Kalman filter in arima***From:*Robert A Yaffee <bob.yaffee@nyu.edu>

**Re: st: Disabling Kalman filter in arima***From:*kristian@hefting.dk

- Prev by Date:
**RE: st: a loop error of -foreach-** - Next by Date:
**Re: st: saving coefficients for "absorb" variable for areg command** - Previous by thread:
**Re: st: Disabling Kalman filter in arima** - Next by thread:
**st: Boostrap QUAIDS elasticities** - Index(es):