Learn R Programming

dlsem (version 2.4.6)

residualPlot: Plot for diagnostics of the residuals in a distributed-lag structural equation model.

Description

Several different types of plot for diagnostics of the residuals in a distributed-lag structural equation model are displayed.

Usage

residualPlot(x, type = "fr")

Arguments

x

An object of class dlsem.

type

A character string indicating the type of plot, which should be one among 'fr' (fitted vs. residuals plot, the default), 'qq' (quantile-quantile plot of the residuals), 'ts' (time series plot of the residuals), 'ac' (auto-correlation plot of the residuals).

See Also

dlsem.

Examples

Run this code
# NOT RUN {
data(industry)
indus.code <- list(
  Consum~ecq(Job,0,5),
  Pollution~ecq(Job,1,8)+ecq(Consum,1,7)
  )
indus.mod <- dlsem(indus.code,group="Region",exogenous=c("Population","GDP"),data=industry,
  log=TRUE)
residualPlot(indus.mod,type="fr")
residualPlot(indus.mod,type="qq")
residualPlot(indus.mod,type="ts")
residualPlot(indus.mod,type="ac")
# }

Run the code above in your browser using DataLab