A totally different question.
If it helps here is the documentation
auto.arima
I have a data set called mydata. It has three columns in it. Month is a date the other two are numbers.
when I do str(mydata) it says there are 84 observations. There actually are 85 including the variable label row. Does it just ignore the label row?
I assumed so since I wanted all data except the last 12 points to be a training data set recommended in auto.arima I did
train=mydata[1:71,] #training data set
mydata$month=NULL #not sure why you do this
valid=mydata[1:83,] #all data points to be used later
fit=auto.arima(train [,"rehab.rate"],approximation = FALSE, stepwise = FALSE,xreg=train$unemployment.rate)
to run the regression with ARIMA error. I expected based on other examples to see an arima model and coefficients generated. I get no error, but no results either. Does anyone know why? I looked at the auto-arima documentation but I did not see anything.
I am expecting to see something like this
ARIMA(1,0,1)(1,1,0)[52] . I might be missing a function I have to run, but I have not found any.
Coefficients:
ar1 ma1 sar1
0.7520 -0.1921 -0.5759
s.e. 0.0696 0.0958 0.0603
As an aside it looks like [,"rehab.rate"], is interchangeable with train$rehab.rate
My titles are actually rehabrate and unemploymentrate. Not sure why R adds the period in rehab.rate for example.