KFAS (version 1.3.7)

plot.SSModel: Diagnostic Plots of State Space Models

Description

Diagnostic plots based on standardized residuals for objects of class SSModel.

Usage

# S3 method for SSModel
plot(x, nsim = 0, zerotol = 0, ...)

Arguments

x

Object of class SSModel.

nsim

The number of independent samples used in importance sampling. Only used for non-Gaussian model. Default is 0, which computes the approximating Gaussian model by approxSSM and performs the usual Gaussian filtering/smoothing so that the smoothed state estimates equals to the conditional mode of \(p(\alpha_t|y)\). In case of nsim = 0, the mean estimates and their variances are computed using the Delta method (ignoring the covariance terms).

zerotol

Tolerance parameter for positivity checking in standardization. Default is zero. The values of D <= zerotol * max(D, 0) are deemed to zero.

...

Ignored.

Examples

Run this code
# NOT RUN {
modelNile <- SSModel(Nile ~ SSMtrend(1, Q = list(matrix(NA))), H = matrix(NA))
modelNile <- fitSSM(inits = c(log(var(Nile)),log(var(Nile))), model = modelNile,
 method = "BFGS")$model

if (interactive()) {
  plot(modelNile)
}
# }

Run the code above in your browser using DataLab