recursion: Simulate from a Gaussian state space model

Description Usage Arguments Value Author(s) See Also Examples

Description

Draw a sample of y_1,…,y_n, and θ_1,…,θ_n from the state space model given as input.

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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))

ClausDethlefsen/sspir documentation built on May 6, 2019, 7 p.m.