Learn R Programming

paleoTS (version 0.6.2)

checkSSMresiduals: Compute and (optionally) plot residuals from SSM model fit

Description

Compute and (optionally) plot residuals from SSM model fit

Usage

checkSSMresiduals(
  y,
  w,
  show.plot = TRUE,
  resid.type = c("standardized", "unstandardized")
)

Value

a vector of residuals, returned invisibly

Arguments

y

a paleoTS object

w

a paleoTSfit object, where the fitting functions uses SSM

show.plot

logical, if TRUE, several diagnostic plots are shown

resid.type

residual type, either "standardized" or "unstandardized"

Details

It is recommended that resid.type be set to the default, "standardized", which will scale residuals by their expected standard deviation

Examples

Run this code
y <- sim.GRW(ns = 50, ms = 0.2)
w <- fitSimple(y, model = "URW", method = "SSM")  # wrong model
checkSSMresiduals(y, w, show.plot = TRUE) # positive residuals show model mis-fit

Run the code above in your browser using DataLab