0
$\begingroup$

R code:

I got an error by using vif function.

library(forecast)
library(tseries)
library(faraway) 
library(car)
library(HH)
set.seed(182)
y <- arima.sim(n=500,list(ar=0.2,ma=0.6),mean = 10)
auto.arima(y)
qa <- arima(y,order=c(1,0,1))
qa
vif(qa)
vif(auto.arima(y))

R output:

> vif(qa)
Error in xx[, i] : incorrect number of dimensions
> vif(auto.arima(y))
Error in xx[, i] : incorrect number of dimensions

Would you please help me to fix the errors

$\endgroup$
  • $\begingroup$ Why are you trying to apply the vif() function to a time series model for a univariate time series? It doesn't make any sense. The vif() function is applicable to linear regression models fitted with lm() or generalized linear models fitted with glm(). For these types of models, vif() checks for the presence of collinearity among the predictor variables included in the model. $\endgroup$ – Isabella Ghement Jan 18 at 3:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.