generateSPASM: Generate data from an additive state space model

Description Usage Arguments Value Examples

Description

This function generates data and returns components so as to easily test the Laplace-Gaussian filter and the sparse spline additive models. Data is generated as

y_{t} = Z sin(z * x_{t} / 2π) + σ_{y} * N(0, I)

x_{t+1} = Tt x_t + σ_x * N(0,I)

where Z is a dxp matrix of standard uniform random variables and z=[1 ... p].

Usage

1
generateSPASM(N, p, d, sig.x = 0.1, sig.y = 0.1)

Arguments

N

the number of observed time points

p

the dimension of the hidden state vector

d

the dimension of the observation vector

sig.x

scalar which multiplies the hidden standard normal noise

sig.y

scalar which multiplies the standard normal noise added to the observations

Value

a list with components

y

the observations, nxd

x

the hidden states, nxp

Tt

the state transition matrix, pxp

HHt

the observation noise variance, dxd

GGt

the hidden noise variance, pxp

Examples

1
generateSPASM(100,3,4)

dajmcdon/spasm documentation built on May 6, 2019, 1:31 a.m.