[R] ARIMA simulation including a constant
Prof Brian Ripley
ripley at stats.ox.ac.uk
Tue Jan 4 14:05:06 CET 2011
That output is not from arima(), which is the function paired with
arima.sim(). Nor is it from arima0(), so I don't believe it is
'ouptut from R' (perhaps from a contributed package you have not
With arima(), the intercept is 'm' in the notation on the help page
and not 'a' in your personal re-definition. You can easily go from
one to the other by some trivial algebra ( a = m*(1-sum(ar)) ), but
you do need to be sure what the unstated function you use is using.
On Mon, 3 Jan 2011, Paolo Rossi wrote:
> Sorry I am not really sure I have been taht clear.
> I meant ARMA which is not bound to have zero mean. More precisely, suppose I
> estimate y(t) = a + by(t-1) + e(t) + ce(t-1) , i.e. and ARMA(1,1). My
> question is how do I simulate values for yt given the values for a, b and c?
> My problem with arima.sim is that I cannot find a way to pass the value for
> the constant a.
> Output from R is:
> Estimate Std. Error t value Pr(>|t|)
> ar1 0.82978 0.01033 80.297 < 2e-16 ***
> ma1 0.46347 0.01548 29.942 < 2e-16 ***
> intercept -0.02666 0.01012 -2.635 0.00841 **
> Intercept is significant and I suppose it should be used if I want simulate
> values from this ARMA(1,1)
> Thanks and Apologies for not being clear
> On 3 January 2011 16:46, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:
> On Mon, 3 Jan 2011, Paolo Rossi wrote:
> I have been looking at arima.sim to simulate the output
> from an ARMA model
> fed with a normal and uncorrelated input series but I
> cannot find a way to
> pass an intercept / constant into the model. In other
> words, the model input
> in the function allows only for the AR and MA components
> but I need to pass
> a constant.
> Can anyone help?
> Well, an ARIMA model by definition has zero mean (as the link on the
> help page for arima.sim to the exact definition tells you). Perhaps
> you mean that (X-m) = Z follows an ARIMA model, in which case simulate
> Z and add m. For a differenced ARIMA model it is not clear if you
> meant that you wanted an intercept for the original or differenced
> series: for the latter simply simulate the differenced series, add the
> intercept and use diffinv().
> [[alternative HTML version deleted]]
> Please do as we asked in the posting guide and not send HTML.
> Brian D. Ripley, ripley at stats.ox.ac.uk
> Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
> University of Oxford, Tel: +44 1865 272861 (self)
> 1 South Parks Road, +44 1865 272866 (PA)
> Oxford OX1 3TG, UK Fax: +44 1865 272595
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help