Learn R Programming

KFAS (version 1.5.1)

confint.KFS: Confidence Intervals of Smoothed States

Description

Extract confidence intervals of the smoothed estimates of states from the output of KFS.

Usage

# S3 method for KFS
confint(object, parm = "all", level = 0.95, ...)

Value

A list of confidence intervals for each state

Arguments

object

An object of class KFS.

parm

Which states to extract? Either a numeric vector containing the indices of the corresponding states, or a character vector defining the types of the corresponding states. Possible choices are "all", "level", "slope", "trend", "regression", "arima", "custom", "cycle" or "seasonal", where "trend" extracts all states relating to trend. These can be combined. Default is "all".

level

The confidence level required. Defaults to 0.95.

...

Ignored.

Examples

Run this code

model <- SSModel(log(drivers) ~ SSMtrend(1, Q = list(1)) +
 SSMseasonal(period = 12, sea.type = "trigonometric") +
 log(PetrolPrice) + law, data = Seatbelts, H = 1)
out <- KFS(model)

confint(out, parm = "regression")

Run the code above in your browser using DataLab