recursion {sspir}R Documentation

Simulate from a Gaussian state space model

Description

Draw a sample of y_1,...,y_n, and theta_1,...,theta_n from the state space model given as input.

Usage

recursion(ss, n)

Arguments

ss an object of class SS defining the state space model.
n an integer specifying the number of time steps to be simulated.

Value

The object ss with updated components y, mu and truetheta.

Author(s)

Claus Dethlefsen and Søren Lundbye-Christensen.

See Also

ssm, kfilter, smoother, getFamily.

Examples

data(kurit)
m1 <- SS(kurit)
phi(m1) <- c(100,5)
m0(m1) <- matrix(130)
C0(m1) <- matrix(400)

par(mfrow=c(2,1))
plot(recursion(m1,100))
phi(m1) <- c(5,100)
plot(recursion(m1,100))

[Package sspir version 0.2.3 Index]