Displaying 20 results from an estimated 8000 matches similar to: "ARIMA prediction"
2005 Oct 10
1
using innov in arima.sim
Hello,
I have used the arima.sim function to generate a lot of time series, but to day I got som results that I didn't quite understand. Generating two time series z0 and z1 as
eps <- rnorm(n, sd=0.03)
z0 <- arima.sim(list(ar=c(0.9)), n=n, innov=eps)
and
z1 <- arima.sim(list(ar=c(0.9)), n=n, sd=0.03),
I would expect z0 and z1 to be qualitatively similar. However, with n=10 the
2009 Jan 20
0
arima.sim help
I am trying to simulate time series data for an ar(1) and ma(1) process. I want the error term to have either a t distribution with 1 degree of freedom or a normal distribution with mean=0 and sd=1. Here is my code:
error.model=function(n){rnorm(n,mean=0, sd=1)}
data<-arima.sim(model=list(ar=c(0.1)), n=1000,
n.start=200, start.innov=rnorm(200,mean=0, sd=1),
rand.gen=error.model )
data
2005 Oct 02
2
arima.sim bug?
Hi,
I am using the arima.sim function to generate some AR time series. However, the function does not seem to produce exactly the same time series when I specify the innov parameter. For example
> r <- rnorm(300)
> x <- arima.sim(300, model=list(order=c(1,0,0),ar=c(.96)), innov=r, n.start=10)
> y <- arima.sim(300, model=list(order=c(1,0,0),ar=c(.96)), innov=r, n.start=10)
>
2012 Oct 08
1
arima.sim
Hi,
I have been using arima.sim from the stats package recently, and I'm
wondering why I get different results when using what seem to be the
same parameters. For example, I've given examples of three different
ways to run arima.sim with what I believe are the same parameters.
It's my understanding from the R documentation that rnorm is the
default function for rand.gen if not
2009 Jul 21
0
Specifying initial values for arima.sim
Hi Everyone,
I'm having a problem with arima.sim. Namely specifying inital values
for the series.
If I generate a random walk
> vs = rnorm(100,0,1)
> xs = cumsum(vs)
and fit an ARIMA(1,0,0) to it
> xarima = arima(xs,order=c(1,0,0))
> xarima
Call:
arima(x = xs, order = c(1, 0, 0))
Coefficients:
ar1 intercept
0.9895 8.6341
s.e. 0.0106 6.1869
I should
2009 Sep 29
0
Incoherence between arima.sim and auto.arima
Hello,
I have a question about function arima.sim
I tried to somulate a AR(1) process, with no innovation, no error term.
I used this code:
library(forecast)
e=rnorm(100,mean=0,sd=0)
series=arima.sim(model=list(ar=0.75),n=100,innov=e)+20
Then I tried to applicate ti this series auto.arima function:
mod1<-auto.arima(series,stepwise=FALSE,trace=TRUE,ic='aicc')
The best model returned
2013 Mar 22
0
predict.Arima error "'xreg' and 'newxreg' have different numbers of columns"
Hello all,
I use arima to fit the model with
fit <- arima(y, order = c(1,0,1), xreg = list.indep, include.mean = TRUE)
and would like to use predict() to forecast:
chn.forecast <- rep(0,times=num.record)
chn.forecast[1] <- y[1]
for (j in 2:num.record){
indep <- c(aa=chn.forecast[j-1], list.indep[j,2:num.indep]) # this is the newxreg in the
2009 Feb 17
0
What's the predict procedure of ARIMA in R?
Hello,guys:
Recently, I am working on a seasonal ARIMA model. And I met some problem in the forecasting.
Now I just want to know that How does R perform the predict procedure(the predict formula, the initial setting of errors,etc.)?
I run the following commands and get the original code of the "predict" command, but I can't read it.
Can anybody explain it to me?
Thanks!
saji from
2011 Jun 21
2
function to undo the DIFF command in ARIMA command
Hi users.
I'm new user in R.
I'm workiing with Time series and I would like to know how can I do to undo
the command DIFF(X), for exemple:
If I have the model: m=arima(X, order=c(0,1,1),
seasonal=list(order=c(0,0,1))) (note that have d=1 one difference), to find,
in the same scale, the original numbers (like one "unDiff"), after the
forecast, I need to develop some function or in
2009 Jun 05
1
Bug in print.Arima and patch
Dear List,
A posting to R-Help exposed this problem with the print method for
objects of class Arima:
> set.seed(1)
> x <- arima.sim(n = 100, list(ar = 0.8897, ma = -0.2279))
> mod <- arima(x, order = c(1,0,1))
> coefs <- coef(mod)
> mod2 <- arima(x, order = c(1,0,1), fixed = coefs)
> mod2
Call:
arima(x = x, order = c(1, 0, 1), fixed = coefs)
Coefficients:
Error
2011 Nov 22
1
arima.sim: innov querry
Apologies for thickness - I'm sure that this operates as documented and with good reason. However...
My understanding of arima.sim() is obviously imperfect. In the example below I assume that x1 and x2 are similar white noise processes with a mean of 5 and a standard deviation of 1. I thought x3 should be an AR1 process but still have a mean of 5 and a sd of 1. Why does x3 have a mean of ~7?
2002 Nov 18
1
Prediction from arima() object (library ts) (PR#2305)
Full_Name: Allan McRae
Version: 1.6.0
OS: Win 2000 P
Submission from: (NULL) (129.215.190.229)
When using predict.Arima in library ts(), it appears differencing is only
accounted for in the first step of prediction and so any trend is not apparent
in the predictions. The example shows the difference between the predictions of
an arima(1,1,1) model and the backtransformed predictions of an
2011 Jan 03
1
ARIMA simulation including a constant
Hi,
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?
Thanks
Paolo
[[alternative HTML version deleted]]
2010 Aug 19
1
How to include trend (drift term) in arima.sim
I have been trying to simulate from a time series with trend but I don't see
how to include the trend in the arima.sim() call. The following code
illustrates the problem:
# Begin demonstration program
x <- c(0.168766559, 0.186874000, 0.156710548, 0.151809531, 0.144638812,
0.142106888, 0.140961714, 0.134054659, 0.138722419, 0.134037018,
0.122829846, 0.120188714,
2008 Oct 24
0
unstable MA results in ARIMA?
Dear colleagues,
I am relatively new to R and time series and so I am experiencing
difficulties in interpreting the output of "arima" in MA models (but not
in AR models). I cannot make sense of the 1st innovations returned by
"arima".
In an AR(1) model I expect data[t]=phi1*data[t-1]+a[t] and in a MA(1)
model data[t]=a[t]+theta1*a[t-1]. My interpretation from R-help is
2010 Dec 08
1
Question on ARIMA Prediction
Dear all,
I'm new to R and time series analysis. I'd appreciate if you could shed
light on my problem.
Here is what I have been trying to do:
1. I fit the model ARIMA(1,0,0) with the training dataset xdata[1:100]
fitit = arima(xdata, order=c(1,0,0)
2. I have some current observations in the buffer. Say that
buf = xdata_new[1:20]
3. I'm trying to forecast the xdata_new[21] based on
2010 Mar 31
1
predict.Arima: warnings from xreg magic
When I run predict.Arima in my code, I get warnings like:
Warning message:
In cbind(intercept = rep(1, n), xreg) :
number of rows of result is not a multiple of vector length (arg 1)
I think this is because I'm not running predict.Arima in the same
environment that I did the fit, so the data object used in the fit is no
longer present. Looking at the predict.Arima source,
2004 May 24
1
Null model for arima.sim().
In some time series simulations I'm doing, I occasionally want the
model to be ``white noise'', i.e. no model at all. I thought it
would be nice if I could fit this into the arima.sim() context,
without making an exceptional case. I.e. one ***could*** do
something to the effect
if(length(model)==0) x <- rnorm(n) else x <- arima.sim(model,n)
but it would be more suave if one
2007 Aug 23
1
Estimate Intercept in ARIMA model
Hi, All,
This is my program
ts1.sim <- arima.sim(list(order = c(1,1,0), ar = c(0.7)), n = 200)
ts2.sim <- arima.sim(list(order = c(1,1,0), ar = c(0.5)), n = 200)
tdata<-ts(c(ts1.sim[-1],ts2.sim[-1]))
tre<-c(rep(0,200),rep(1,200))
gender<-rbinom(400,1,.5)
x<-matrix(0,2,400)
x[1,]<-tre
x[2,]<-gender
fit <- arima(tdata, c(1, 1, 0), method = "CSS",xreg=t(x))
2007 Jul 14
0
ts model challenge (transfer function)
Dear useRs,
I am trying to model a time series with a transfer function. I think
it can be put into the ARMA framework, and estimated with the 'arima'
function (and others have made similar comments on this list). I have
tried to do that, but the results have so far been disappointing.
Maybe I am trying to make 'arima' do something it can't...
The data are time series of