It appears that running auto.arima
from the forecast
package in a knitr
script always generates a warning - and I don't get this warning when I run it in normal R.
knitr Markdown Example Code:
```{r}
library(forecast)
```
Spurious warning from forecast and knitr
========================================
The following generates a warning that I don't think is valid
```{r}
summary(auto.arima(WWWusage))
```
Produces this:
Whereas running the following in R normally produces no such warning:
> library(forecast)
This is forecast 4.02
> summary(auto.arima(WWWusage))
Series: WWWusage
ARIMA(1,1,1)
Coefficients:
ar1 ma1
0.6504 0.5256
s.e. 0.0842 0.0896
sigma^2 estimated as 9.793: log likelihood=-254.15
AIC=514.3 AICc=514.55 BIC=522.08
Training set error measures:
ME RMSE MAE MPE MAPE MASE
0.3035616 3.1137542 2.4052748 0.2805566 1.9174634 0.5315228
Also since this dataset is the example dataset for auto.arima
I'm inclined to believe that the warning is incorrect (since I suspect a "good" example would be given).
Any idea what is going on?
That warning did exist, but was suppressed internally by forecast
; see options(warn = -1)
in forecast:::search.arima
.
knitr
(actually the evaluate
package) captures the warnings regardless of the getOption('warn')
value. In this case, you have to use the warning=FALSE
option as Jilber suggested.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With