check.residuals {dse1}R Documentation

Autocorrelations Diagnostics

Description

Calculate autocorrelation diagnostics of a time series matrix or TSdata or residuals of a TSestModel

Usage

    check.residuals(obj, ...)
    check.residuals(obj, ac=T, pac=T, select=seq(nseries(obj)), 
                   drop=NULL, plot.=T, graphs.per.page=5, verbose=F)
    check.residuals(obj, ...)
    check.residuals(obj, ...)

Arguments

model An TSestModel or TSdata object.
ac If T the auto-correlation function is plotted.
pac If T the partial auto-correlation function is plotted.
select Is used to indicate a subset of the residual series. By default all residuals are used.
drop Is used to indicate a subset of the residual time periods to drop. All residuals are used with the default (NULL).Typically this can be used to get rid of bad initial conditions (eg. drop=seq(10) ) or outliers.
plot. If F then plots are not produced.
verbose If T then the auto-correlations and partial auto-correlations are printed if they are calculated.

Details

This is a generic function. The default method works for a time series matrix which is treated as if it were a matrix of residuals. However, in a Box-Jenkins type of analysis the matrix may be data which is being evaluated to determine a model. The method for a TSestModel evaluates the residuals calculated by subtracting the output data from the model predictions.

Value

A list with residual diagnostic information: residuals, mean, cov, acf= autocorrelations, pacf= partial autocorrelations.

Examples

    if(is.R()) data("eg1.DSE.data.diff", package="dse1")
    model <- est.VARX.ls(eg1.DSE.data.diff)
    check.residuals(model)