Smoothed Estimates or One-step-ahead Predictions of Fitted Values
Computes fitted values from output of KFS
(or using the SSModel
object), i.e. one-step-ahead
predictions
f(θ[t] | y[t-1], ... , y[1]), (m
) or smoothed estimates
f(θ[t] | y[n], ... , y[1]), (muhat
),
where f is the inverse of the link function
(identity in Gaussian case), except in case of Poisson distribution where
f is multiplied with the exposure u[t].
## S3 method for class 'KFS' fitted(object, start = NULL, end = NULL, filtered = FALSE, ...) ## S3 method for class 'SSModel' fitted(object, start = NULL, end = NULL, filtered = 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 |
... |
Additional arguments to |
nsim |
Only for method for for non-Gaussian model of class |
Multivariate time series containing fitted values.
signal
for partial signals and their covariances.
data("sexratio") model <- SSModel(Male ~ SSMtrend(1,Q = list(NA)),u = sexratio[, "Total"], data = sexratio, distribution = "binomial") model <- fitSSM(model,inits = -15, method = "BFGS")$model out <- KFS(model) identical(drop(out$muhat), fitted(out)) fitted(model)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.