Error In Solve.defaultres$hessian * N.used
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up The curious case of ARIMA modelling using R up vote 1 down vote favorite 1 I observed something strange while fitting an ARMA model using the function arma{tseries} and arima{stats} in R. There is a radical difference in the estimation procedures adopted by the two functions, Kalman filter in arima{stats} as opposed to ML estimation in arma{tseries}. Given the difference in the estimation procedures between the two functions, one would not expect the results to be radically different for the two function if we use the same timeseries. Well seems that they can! Generate the below timeseries and add 2 outliers. set.seed(1010) ts.sim <- abs(arima.sim(list(order = c(1,0,0), ar = 0.7), n = 50)) ts.sim[8] <- ts.sim[12]*8 ts.sim[35] <- ts.sim[32]*8 Fit an ARMA model using the two function. # Works perfectly fine arima(ts.sim, order = c(1,0,0)) # Works perfectly fine arma(ts.sim, order = c(1,0)) Change the level of the timeseries by a factor of 1 billion # Introduce a multiplicative shift ts.sim.1 <- ts.sim*1000000000 options(scipen = 999) summary(ts.sim.1) Fit an ARMA model using the 2 functions: # Works perfectly fine arma(ts.sim.1, order = c(1,0)) # Does not work arima(ts.sim.1, order = c(1,0,0)) ## Error in solve.default(res$hessian * n.used, A): system is computationally singular: reciprocal condition number = 1.90892e-19 Where I figured out this problem was when SAS software was successfully able to run the proc x12 procedure to conduct the seasonality test but the same function on R gave me the error above. That made me really wonder and look at the SAS results with skepticism but it turn out, it might just be something to do with the arima{stats}. Can anyone try to elaborate the reason for the above error which limits us to fit a model using arima{stats}? r time-series kalman-filter hessian-matrix share|im
Threaded Open this post in threaded view ♦ ♦ | Report Content as Inappropriate ♦ ♦ Error message when trying to fti an AR(1) model to a time series This post has NOT been accepted by the mailing list yet. This error message only pops up when I fit an ARIMA(p,d,q) model with d=0. The other combinations work fine but I'm just interested in the AR(1). I'm relatively new at this so please bear with me. Here's what I get: > data.volume0501<-read.table(file="H:\\Monthly Volumes\\data ts volume0501.txt", header=FALSE, col.names=c("volume0501")) > attach(data.volume0501) > library(TSA) Loading required package: leaps Loading required package: locfit . . . The following http://stackoverflow.com/questions/29522841/the-curious-case-of-arima-modelling-using-r object(s) are masked from 'package:utils': tar > vol<-ts(volume0501, freq=1, start=1) > acf(vol) > pacf(vol) > eacf(vol) AR/MA 0 1 2 3 4 5 6 7 8 9 10 11 12 13 0 x x x x x x x x x x x x x x 1 o o o o o o o o o o o o o o 2 o o o o o o o http://r.789695.n4.nabble.com/Error-message-when-trying-to-fti-an-AR-1-model-to-a-time-series-td3520184.html o o o o o o o 3 x x o o o o o o o o o o o o 4 x o x o o o o o o o o o o o 5 x x o o o o o o o o o o o o 6 o x x o o o o o o o o o o o 7 o x o o o o o o o o o o o o > m1<-arima(vol,order=c(1,0,0)) Error in solve.default(res$hessian * n.used) : system is computationally singular: reciprocal condition number = 5.50286e-24 > traceback() 4: .Call("La_dgesv", a, b, tol, PACKAGE = "base") 3: solve.default(res$hessian * n.used) 2: solve(res$hessian * n.used) 1: arima(vol, order = c(1, 0, 0)) Thanks, Nick PS, Bonus question: Another thing that's been popping up repeatedly for me is that, in a different case from this one, the response variable is correlated with the residuals from a regression fit. At first I thought it suggested a nonlinear model but that didn't seem to change anything, although there is now slightly less correlation. Would this negatively impact the explanatory power of the model? Is there a general reason for why this sort of thing can happen or is it pretty case specific? Thanks again. nick0722 Threade
Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta http://stats.stackexchange.com/questions/114016/how-to-fit-an-armax-model-with-more-than-one-exogenous-time-series Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Cross Validated Questions Tags Users Badges Unanswered Ask Question _ Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, error in and data visualization. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top How to fit an ARMAX model with more than one exogenous time series? up vote 1 down vote favorite I am trying to error in solve.defaultres$hessian fit an ARMAX with two exogenous time series with the following code but it gives me an "computationally singular" error. I know it is about defining more than 2 time series for xreg because when I include only one exogenous it works! This is link for data library(forecast) data<-read.csv("DATA.csv") Y1=ts(data[,1], start=1978, frequency=12) #exogenous time series Y2<-matrix(0,360,2) Y2[,1]<-cbind(data[,2]) Y2[,2]<-cbind(data[,3]) model<- arima (Y1, order=c(1, 0, 0), xreg=as.ts(Y2, start=1978, frequency=12)) predict (model, 10, newxreg=0) I get this Error: in solve.default(res$hessian * n.used, A) : system is computationally singular: reciprocal condition number = 5.67866e-34 time-series share|improve this question edited Sep 19 '14 at 20:47 asked Sep 2 '14 at 1:52 Fred 314421 1 What do the values of data[,2] and data[,3] look like? Do the values of either data[,2] or data[,3] tend to be close to zero? Are the values of data[,2] - data[,3] close to zero? –Blue Marker Sep 19 '14 at 20:35 @BlueMarker Thank you for your comment I looked at my data again and I found out problem was there
be down. Please try the request again. Your cache administrator is webmaster. Generated Tue, 11 Oct 2016 19:53:59 GMT by s_wx1131 (squid/3.5.20)