plotDiag function

Plot Diagnostics for an msm Object

Plot Diagnostics for an msm Object

Creates several plots for the residual analysis. It shows a plot of residuals against fitted values, a Normal Q-Q plot, ACF/PACF of residuals and ACF/PACF of square residuals. Depending on the selection, it shows the pooled residuals or the residuals for each regime.

plotDiag(x, regime, which)

Arguments

  • x: an object of class "MSM.lm" or "MSM.glm".
  • regime: a single numeric value or vector indicating the regimes to show its residuals. In order to show all the regimes, it could be written all.
  • which: if a subset of the plots is required, specify a subset of the numbers 1:3. The default value is c(1:3). See details for more information.

Details

The argument which has three values:

  • 1: represents the plot of residuals against fitted values.

  • 2: represents the Normal Q-Q plot.

  • 3: represents the ACF/PACF of residuals and ACF/PACF of square residuals.

Author(s)

Jose A. Sanchez-Espigares, Alberto Lopez-Moreno

See Also

Overview: MSwM-package

Classes : MSM.lm, MSM.glm, MSM.fitted

Methods : msmFit,summary,AIC,intervals,msmResid

Plot : plot,plotProb,plotReg,plotDiag

  • Maintainer: Josep A. Sanchez-Espigares
  • License: GPL (>= 2.0)
  • Last published: 2021-06-06

Useful links