Statalist The Stata Listserver


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

Re: st: SARIMA modeling with 9.0


From   "Brian P. Poi" <[email protected]>
To   [email protected]
Subject   Re: st: SARIMA modeling with 9.0
Date   Mon, 18 Dec 2006 08:29:07 -0600 (CST)

On Sun, 17 Dec 2006, Joe Egger wrote:

I am new to STATA's ARIMA/SARIMA commands and am trying to fit a SARIMA
model to a time series of weekly infectious disease incidence, which
displays a strong 52-week periodicity.

I am using the code:

.arima DS52.incidence, ar(1 3) mar(1/2,52) mma(1/1,52)

which I assume is fitting an AR parameter at lags 1 and 3, seasonal AR
parameter at lags 1 and 2 and a seasonal MA parameter at lag 1, with the
series being differenced 2x (1 non-seasonal, 1 seasonal)

When I run this command, STATA has a hard time converging on an
estimate. I have let it run for 45 minutes but it does not converge.
Does this model look correct? if so, is the model sufficiently complex
that estimation just takes this long?

I have aggregated the data to monthly incidence, which makes the command
the same, except substituting the '52' for '12. when I do this, STATA
converges on estimates quite quickly (i.e., 20 seconds). Therefore, it
seems to me the '52' is the problem. any thoughts?

Thanks,
Joe
Joe,

To carry out the Kalman filter recursions which are used to evaluate the likelihood function, -arima- must invert a matrix whose size depends on the square of the longest AR or MA term in the model. With even just one period-52 seasonal AR term, that matrix will have about 3000 columns, and inverting a 3000x3000 matrix is slow. During the optimization process, -arima- must invert a matrix of that size many times. If you add a second seasonal AR or MA term, the matrix has well over 10,000 columns.

What you can do is try the "diffuse" option. That avoids the need to invert such a large matrix. If your series is reasonably long and doesn't have a long memory, then the results will be very similar to those you would obtain without using the diffuse prior for starting the Kalman recursions.

Hope this helps.

-- Brian Poi
-- [email protected]
*
* 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/




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