Smoothed Estimates or One-step-ahead Predictions of States
Compute smoothed estimates or one-step-ahead predictions of states of
SSModel
object or extract them from output of KFS
.
For non-Gaussian models without simulation (nsim = 0
),
these are the estimates of conditional modes of
states. For Gaussian models and non-Gaussian models with importance sampling,
these are the estimates of conditional means of states.
## S3 method for class 'KFS' coef( object, start = NULL, end = NULL, filtered = FALSE, states = "all", last = FALSE, ... ) ## S3 method for class 'SSModel' coef( object, start = NULL, end = NULL, filtered = FALSE, states = "all", last = FALSE, nsim = 0, ... )
object |
An object of class |
start |
The start time of the period of interest. Defaults to first time point of the object. |
end |
The end time of the period of interest. Defaults to the last time point of the object. |
filtered |
Logical, return filtered instead of smoothed estimates of
state vector. Default is |
states |
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
|
last |
If |
... |
Additional arguments to |
nsim |
Only for method for for non-Gaussian model of class |
Multivariate time series containing estimates states.
model <- SSModel(log(drivers) ~ SSMtrend(1, Q = list(1)) + SSMseasonal(period = 12, sea.type = "trigonometric") + log(PetrolPrice) + law, data = Seatbelts, H = 1) coef(model, states = "regression", last = TRUE) coef(model, start = c(1983, 12), end = c(1984, 2)) out <- KFS(model) coef(out, states = "regression", last = TRUE) coef(out, start = c(1983, 12), end = c(1984, 2))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.