Quantcast

something went wrong when I used R-studio

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

something went wrong when I used R-studio

Karel.Li
This post has NOT been accepted by the mailing list yet.
I followed all steps on book R In Action,but something went wrong.
I used the dataset which is provided in the packages.

> plot(Nile)
> dNile <- diff(Nile)
> adf.test(dNile)
> Acf(dNile)
> fit <- arima(Nile,order = c(0,1,1))
> fit

Call:
arima(x = Nile, order = c(0, 1, 1))

Coefficients:
          ma1
      -0.7329
s.e.   0.1143

sigma^2 estimated as 20600:  log likelihood = -632.55,  aic = 1267.09
> accuracy(fit)
              ME RMSE MAE MPE MAPE
Training set NaN  NaN NaN NaN  NaN

Warning message:
In trainingaccuracy(f, test, d, D) : test elements must be within sample

> forecast(fit,3)

Error in ts(x) : 'ts' object must have one or more observations

IT REALLY TROUBLES ME A LOT.
could you guys help me ?
Loading...