View source: R/estimation_validation.R
CArima | R Documentation |
Largely a wrapper for the Arima
function in the forecast package. It adds some usefull statistics and tests to validate and compare models.
CArima( y, order = c(0,0,0), seasonal = list(order = c(0,0,0), period = 1), plot = T xreg = NULL, include.constant = TRUE, lambda = model$lambda, biasadj = FALSE, method = c("CSS-ML", "ML", "CSS"), model = NULL, x = y, ... )
y |
a univariate time series of class |
order |
a specification of the non-seasonal part of the ARIMA model: the three integer components |
seasonal |
a specification of the seasonal part of the ARIMA model, plus the period (which defaults to frequency(x) if the |
plot |
if |
include.constant |
for undifferenced series it fits the mean of the time series, for differenced series it fits the mean of the differenced time series. Note that if there is more than one difference taken, no constant is included regardless of the value of this argument. |
... |
additional arguments to be passed to |
See the Arima
function in the forecast package.
See the Arima
function in the forecast package. The additional objects returned are:
period |
The time series period of the seasonal part. |
SBC |
The SBC value corresponding to the log-likelihood. |
cor.coef |
Correlation matrix of the parameters of the model. |
resid.acf |
ACF of the residuals obtained with the |
resid.pacf |
PACF of the residuals obtained with the |
lbtests.df |
Table of the Ljung-Box tests for some lags of the residuals, obtained with the |
lbtests.plot |
Barplot of the Ljung-Box pvalues of the residuals. |
residRM |
Range-mean plot of the residuals obtained with the |
residQQp |
Qqplot of the residuals. |
residDensity |
Plot of the residual density compared with the normal density. |
residMuTest |
T-test for the residual's mean, obtained with |
residShapiro |
Shapiro-Wilk normality test for the residuals, obtained with |
coeftest
, grid.arrange
#Some examples with AirPassengers model1 <- CArima(as.vector(log(AirPassengers)), order = c(0, 1, 1), seasonal = list(order=c(0,0,1), period = 12)) model1 summary(model1, plot=F) model2 <- CArima(as.vector(log(AirPassengers)), order = c(0, 1, 1), seasonal = list(order=c(0,1,1), period = 12)) model2 summary(model2, plot=F)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.