Learn R Programming

tfarima (version 0.4.1)

init_kf: Initialization of Kalman filter

Description

init_kf computes the starting values x0 and P0 by generalized least squares using the first n observations.

Usage

init_kf(mdl, z = NULL, n = 0)

Value

A list with components:

x0

initial state vector estimate

P0

covariance matrix of the initial state estimate

Arguments

mdl

an object of class ssm.

z

optional time series if it differs from model series.

n

integer, number of observations used to estimate the initial conditions. If n < d (dimension of state vector), it defaults to length(z).