Learn R Programming

dse (version R2000.6-1)

check.residuals: check residuals of a TSmodel or autocorrelations of TSdata

Description

check residuals of a TSmodel or autocorrelations of TSdata

Usage

check.residuals(model, ac=T, pac=T, select=NULL, drop=NULL, 
	  plot.=T,verbose=F)

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. All residuals are used with the default (NULL).
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.

Value

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

sideffects

Diagnostic information is printed and plotted if a device is available. Use dev.ask(T) to pause plotting between pages.

Examples

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

Run the code above in your browser using DataLab