Displaying 20 results from an estimated 90000 matches similar to: "I need detail information how to use "arima" code."
2005 Oct 04
2
Need help on ARIMA (time series analysis)
Hi,
I am so novice in using R. I have some problems in my R script below
which fits time series data and predict it one-step ahead. Here is a
brief explanation on what I try to achieve
Th16k is time series data (500 data points). The size of window for
fitting and predicting is 50 (data points). As you can easily discover
from my code, (fixed) window is moving/sliding to get next one-step
2007 Jul 02
0
ARIMA prediction
Hi
This is my first post to this group, so apologies in advance if I get it wrong.
I would like to know how the prediction for arima models works in R. I
have a time series to which I fit an arima model, of varying AR and MA
orders. I then use the predict function to project it forward. I have
also written my own function to perform the prediction, but it gives
different answers to Arima.predict
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
2003 Apr 21
2
Anyone Familiar with Using arima function with exogenous variables?
I've posted this before but have not been able to locate what I'm doing
wrong. I cannot determine how the forecast is made using the estimated
coefficients from a simple AR(2) model when there is an exogenous
variable. Does anyone know what the problem is? The help file for arima
doesn't show the model with any exogenous variables. I haven't been able
to locate any documents
2011 Jul 07
3
AR vs ARIMA question
Dear R People:
Here is some output from AR and ARIMA functions:
> xb <- arima.sim(n=120,model=list(ar=0.85))
> xb.ar <- ar(xb)
> xb.ar
Call:
ar(x = xb)
Coefficients:
1
0.6642
Order selected 1 sigma^2 estimated as 1.094
> xb.arima <- arima(xb,order=c(1,0,0),include.mean=FALSE)
> xb.arima
Call:
arima(x = xb, order = c(1, 0, 0), include.mean = FALSE)
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
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,
2010 May 02
0
how to plot forecast together with historical series in OLS or special ARIMA model
Dear R users,
Please let me know how to plot the forecast in such a model:
First I do it simple with ARIMA model that works ok with the codes provided to me at the lecture:
arima<-arima(HCPIlong, order=c(1,1,0))
arima.predict<-predict(arima, n.ahead= 5 )
ts.plot(HCPIlong,arima.predict$pred,lty=1:2, main="Forecast of HCPI")
But I need to include the additional variable in my
2007 Jan 16
2
ARIMA xreg and factors
I am using arima to develop a time series regression model, I am using arima
b/c I have autocorrelated errors. Several of my independent variables are
categorical and I have coded them as factors . When I run ARIMA I don't
get any warning or error message, but I do not seem to get estimates for all
the levels of the factor. Can/how does ARIMA handle factors in xreg?
here is some example
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
2008 May 08
1
ARIMA, AR, STEP
Here is my problem:
Autoregressive models are very interesting in forecasting consumptions (eg water, gas etc).
Generally time series of this type have a long history with relatively simple patterns and can be useful to add external regressors for calendar events (holydays, vacations etc).
arima() is a very powerful function but kalman filter is very slow (and I foun difficulties of estimation)
2003 May 25
0
Fitting an ARIMA model to a time series
R 1.6.2 on windows XP (and windows 2000)
Dear Readers,
I have to fit an ARIMA model to a blood pressure series to make predictions
with it. But since I don't have a blood pressure data set yet I have to
work with self made data. So I have created an AR( 2 ) series with the
following code:
series <- list()
series$series <- arima.sim(n=2100, model=list(ar = c(0.6, 0.1)), sd=1) + 120
2008 Jul 12
1
Help with arima.sim
Hey,
as a bloddy beginner in R I want to simulate a Arima (2,1,0) process with R.
My problem is, that I don't know how to specify the AR.
For a ARIMA(1,1,0) I use the following syntax: S <-
arima.sim(list(order=c(1,1,0), ar=0.9), n=100).
I think it is a stupid question with an easy answer. But when I google
the only results are arima.sim for an ARIMA (1,1,0).
Regards,
Chris
--
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)
>
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
2005 Oct 13
1
arima: warning when fixing MA parameters.
I am puzzled by the warning message in the output below. It appears
whether or not I fit the seasonal term (but the precise point of doing
this was to fit what is effectively a second seasonal term). Is there
some deep reason why AR parameters
("Warning message: some AR parameters were fixed: ...")
should somehow intrude into the fitting of a model that has only MA
terms?
>
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
2010 Sep 28
0
the arima()-function and AICc
Hi
I'm trying to fit arima models with the arima() function and I have two
questions.
######
##1. ##
######
I have n observations for my time series. Now, no matter what
arima(p,d,q)- model I fit, I always get n residuals. How is that possible?
For example: If I try this out myself on an AR(1) and calculate the
fitted values from the estimated coefficients I can calculate n-1
residuals.
2006 Apr 03
0
Problems with arima function (PR#8743)
I have written before, but to no avail. I have found two minor
problems with fitting time series models with R. The thing is, they
may be solved with MINOR adjustments to the code.
I have posted these problems with detailed examples here:
http://www.stat.pitt.edu/stoffer/tsa2/Rissues.htm
Briefly, the problems are
(1) When fitting time series models when there is an AR term present,
the
2011 Jul 20
0
The C function getQ0 returns a non-positive covariance matrix and causes errors in arima()
Hi,
the function makeARIMA(), designed to construct some state space
representation of an ARIMA model, uses a C function called getQ0,
which can be found at the end of arima.c in R source files (library
stats). getQ0 takes two arguments, phi and theta, and returns the
covariance matrix of the state prediction error at time zero. The
reference for getQ0 (cited by help(arima)) is: