Learn R Programming

carx (version 0.7.1)

tsdiag.carx: Show diagnostic plots for a carx object

Description

Four diagnostic plots will be shown, which are

  • the time series plot of the residuals,

  • the residuals versus the fitted values,

  • the ACF plot of the residuals, and

  • the Ljung-Box test statistics versus the lags.

Usage

# S3 method for carx
tsdiag(object, gof.lag, col = "red", omit.initial = TRUE,
  mfrow = c(4, 1), main = "Diagnostic Plots from Simulated Residuals", ...)

Arguments

object

a carx object.

gof.lag

the maximum number of lags in ACF and Ljung-Box goodness-of-fit test.

col

color of some warning lines in the figures, default=red.

omit.initial

whether initial residuals should be omitted, default = TRUE.

mfrow

par parameter indicating how the plots are to be arranged, default = c(4,1).

main

The main title of the plot, default = "Diagnostic Plots".

...

Other arguments sent to plot.

Value

none.

Examples

Run this code
# NOT RUN {
dat = carxSim(nObs=100,seed=0)
mdl <- carx(y~X1+X2-1,data=dat, p=2, CI.compute = FALSE)
tsdiag(mdl)
# }

Run the code above in your browser using DataLab