What does "+" give you? It works for me -- simulate the model, simulate
the trend and add them.
x <- arima.sim(list(ar=0.3), 100) + 1:100
is an AR(1) with a linear trend.
> arima(x, c(1,0,0), xreg=1:100)
Call:
arima(x = x, order = c(1, 0, 0), xreg = 1:100)
Coefficients:
ar1 intercept 1:100
0.4510 -0.1704 1.0031
s.e. 0.0915 0.3528 0.0060
...
On Thu, 4 Mar 2004, Samuel Kemp wrote:
> Does anyone know a method for adding a linear/polynominal trend to a
> simulated arima model using the arima.sim function?
--
Brian D. Ripley, [EMAIL PROTECTED]
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
______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html