Displaying 20 results from an estimated 9000 matches similar to: "predict.Arima fails when x is not a time-series"
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
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
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,
2009 Jun 14
1
time function behavior for ts class objects
Hi all-
I am trying to use the time function for ts class objects and do not
understand the return value. I want to use it to set up a time trend in
arima fits. It does not seem to return a correct linear sequence that
matches the underlying time series. I am running:
R version 2.8.1 (2008-12-22).
For example:
R> ## create a time series
R> x <- rnorm(24)
R> (xts <-
2014 Apr 19
1
lag() not returning a time series object
Dear all,
Before I file this as a bug, I wanted to check if I didn't miss something.
The help page of lag() says that the function returns a time series object.
It actually does return something that looks like a ts object (the
attribute tsp is set). But when using a vector, the class "ts" is not added
to the result:
> avec <- 1:10
> lag(avec)
[1] 1 2 3 4 5 6 7 8
2005 Oct 12
1
arima with R
Hi,
I'm using R for some arima models. In the past I used for arima models Rats and Tsp. Using the R arima function, I get only the statistics sigma^2 and log likelihood; with Rats and Tsp it is possible to obtain more statistics, such as R, R square, Durbin Watson, standard error, etc.
Is it possible using R to have the statistics mentioned?
My best regards,
2002 Mar 08
4
ARMA and ARIMA modeling
I'd like to play with ARIMA models of stock prices, but I am a complete novice.
Could some kind soul explain the relationship among packages "ts", "tseries",
"dse", "dse2", and "fracdiff"? Are they 'competing' products or does one
depend on another? Where would be the best place for a novice to begin?
Thanks for any advice.
PS. I
2009 Mar 06
0
modifying a built in function from the stats package (fixing arima) (CONCLUSIONS)
Thanks a lot to everybody that helped me out with this.
Conclusions:
(1)
In order to edit arima in R:
>fix(arima)
or alternatively:
>arima<-edit(arima)
(2)
This is not contained in the "Introduction to R" manual.
(3)
A "productive" fix of arima is attached (arma coefficients printed out and
error catched so that it doesn't halt parent loops to search for
2000 Aug 21
2
diff.default / diff.ts in wrong package bug (PR#640)
{all recent versions of R}
Problem / design bug :
diff.default() doesn't deal with "ts" objects properly,
diff.ts() does, but that is only available from package "ts"
where as the constructor function ts() is in base.
It's not sufficient to just move diff.ts() to package base,
since it relies itself on lag & lag.default which are also only in package
ts.
1997 Aug 25
0
R-alpha: ts problems
This message is in MIME format
--_=XFMail.1.1.p0.Linux:970825095458:252=_
Content-Type: text/plain; charset=us-ascii
Here is a patch which fixes some problems with time series functions.
Some examples of what goes wrong...
> x <- ts(rnorm(100),start=1,deltat=2)
> start(x)
Error in ts[1] : object is not subsettable
> end(x)
Error in ts[2] : object is not subsettable
> y <-
2006 Oct 19
1
predict.Arima question
Hi,
I am trying to forecast a model using predict.Arima
I found arima model for a data set: x={x1,x2,x3,...,x(t)}
arima_model = arima(x,order=c(1,0,1))
I am forecasting the next N lags using predict:
arima_pred = predict(arima_model,n.ahead = N, se.fit=T)
If I have one more point in my series, let's say x(t+1). I do not want to
recalibrate themodel, I just want to forecast the next N-1
2012 Apr 26
1
Using the R predict function to forecast a model fit with auto.arima function
Hello R users,
Hope everyone is doing great.
I have a dataset that is in .csv format and consists of two columns: one
named Period (which contains dates in the format yyyy_mm) and goes from
1995_10 to 2007_09 and the second column named pcumsdry which is a
volumetric measure and has been formatted as numeric without any commas or
decimals.
I imported the dataset as pauldataset and made use of
2007 Sep 08
1
predict.arima
Hi *,
Firstly, thank you so much for your time to read my email.
I am currently interested in how to use R to predict time series from
models fitted by ARIMA. The package I used is basic stats package, and the
method I used is predict.Arima.
What I know is that ARIMA parameters are estimated by Kalman Filter, but I
have difficulty in understanding how exactly maximum likelihood (ML)
estimator
1999 Jul 02
1
Bug in "[.ts" for multivariate ts {Problem with plot.ts, "["} (PR#216)
>>>>> On Fri, 02 Jul 1999, Adrian Trapletti <Adrian.Trapletti@wu-wien.ac.at> said:
Adrian> There seems to be a problem with plot.ts (R Version 0.64.2)
> x<-cbind(1:10,2:11)
> x<-as.ts(x)
> plot(x)
Adrian> Error: subscript (20) out of bounds, should be at most 10
This is definitely a bug
--> CC: R-bugs
ALL NOTE : This is *not* new
2000 Aug 24
1
Method dispatch fails for autoloaded methods (PR#642)
(As mentioned before, on R-devel)
This code snippet shows what the Subject above says :
> autoload("diff.ts", file="ts")
> diff(ts(1:10,freq=2))
Error in tsp<-(*tmp*, value = c(xtsp[1] + lag * differences * xtsp[3], :
invalid time series parameters specified
> traceback()
[1] "tsp<-(*tmp*, value = c(xtsp[1] + lag * differences * xtsp[3], "
[2]
1999 Jul 02
0
Bug in "[.ts" for multivariate ts {Problem with plot.ts, "[" (PR#217)
This message is in MIME format
--_=XFMail.1.3.p0.Linux:990702182137:16900=_
Content-Type: text/plain; charset=us-ascii
There was some discussion a while back on R-devel between Ross Ihaka,
Paul Gilbert and myself about row subsetting in time series. I think
the consensus was that "[.ts" should not try to coerce its result
back to a time series object (which is underlying the problem
2009 Mar 05
3
Time Series - ARIMA differencing problem
Hi,
I have been using this website (
http://www.stat.pitt.edu/stoffer/tsa2/Rissues.htm
http://www.stat.pitt.edu/stoffer/tsa2/Rissues.htm ) to help me to fit ARIMA
models to my data. At the moment I have two possible methods to use.
Method 1
If I use
arima(ts.data, order=c(1,2,0), xreg=1:length(ts.data))
then the wrong value for the intercept/mean is given (checked on SPSS and
Minitab) and
2006 Nov 25
2
predict and arima
Hi all,
Forecasting from an arima model is easy with predict.
But I can't manage to backcast : invent data from the model before the
begining of the sample.
The theory is easy : take your parameters, reverse your data, forecast, and
then reverse the forecast
I've tried to adapt the predict function to do that (i'm not sure that the
statistical procedure is fine (with the residuals),
2004 Aug 29
1
predict(arima)
Dear All,
R 1.9.1, Windows
When copying and pasting a few lines from the 'predict.Arima' help, I
get an error message:
> data(lh)
> predict(arima(lh, order = c(3,0,0)), n.ahead = 12)
Error in eval(expr, envir, enclos) : Object "xreg" not found
On the other hand, the following is OK:
> data(lh)
> predict(arima0(lh, order = c(3,0,0)), n.ahead = 12)
$pred
Time
2012 Sep 10
2
predict arima
Hello, I have a question regarding the predict command for ARIMA models. Why do I not have to give any input except the number of steps for the forecast? Which input value is used (in my case for “y(t)”)? Will the last parameter of the estimate vector be used (in my example “6”)? x <- c(1,2,3,4,5,6)model <- arima(x, order=c(1,0,0), method="ML")predict(model, n.ahead = 1) ->