[R] simulate arima model

Rolf Turner r.turner at auckland.ac.nz
Sun Apr 26 22:18:41 CEST 2009


On 26/04/2009, at 3:56 PM, Rebecca1117 wrote:

>
> I am new in R.
>
> I can simulate Arma, using Arima.sim
>
> However, I want to simulate an Arima Model. Say (1-B)Zt=5+(1-B)at.  
> I do not
> know how to deal with 5 in this model.
>
> Can any one could help me?
> Thank you very much!

If this is a homework problem your instructor needs to learn some  
time series!

The specific model that you have stated is ill-defined.  First of all  
note that
Z_t cannot be stationary in mean, otherwise you'd have mu - mu = 5,  
or 0 = 5,
which is not true!

If you assume that E(Z_t) = mu_t you get mu_t = 5 + mu_{t-1} so mu_t  
= 5t + mu_0.

So you ``could'' (but wait a bit, you can't!) generate say W_t  
according to
(1-B)W_t = (1-B)a_t and then set Z_t = W_t + 5t + mu_0 (for any mu_0  
that you like).

But the problem is that the (1-B) ``cancels'' in the W_t model so the  
W_t are
not well-defined.  You need to get it clearer what you want to do.

Note that in general having (1-B) terms in the coefficient of a_t is  
to be
avoided.  This makes the model non-invertible which implies problems  
with
forecasting.

For a ***stationary*** ARMA model phi(B)Z_t = phi_0 + theta(B)a_t you  
could
generate W_t according to phi(B)W_t = theta(B)a_t and then set

	Z_t = W_t + mu

where mu = phi_0/phi(1).

HTH

	cheers,

		Rolf Turner

######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}




More information about the R-help mailing list