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

View source: R/ssm.R

checkSSMresidualsR Documentation

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")
)

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

Value

a vector of residuals, returned invisibly

Examples

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

paleoTS documentation built on Sept. 11, 2024, 9:18 p.m.