posteriorPredictive: Calculates the convolution of two Gaussian distributions

Description Usage Arguments Details Value Examples

Description

Calculates the convolution of two Gaussian distributions

Usage

1
posteriorPredictive(x, P, Tt, GGt)

Arguments

x

the mean of x_{t|t}

P

the variance of x_{t|t}

Tt

the state transition matrix

GGt

the variance of the transition noise

Details

This function calculates

p(x_{t+1} | y_{t}) = \int dx_{t} p(x_{t+1}| x_{t}) p(x_{t} | y_{1:t})

assuming that both distributions on the right are Gaussian. This function also assumes that the mean of x_{t+1|t} is linear in x_{t}:

p(x_{t+1} | x_{t}) = N(Tt x_{t|t}, GGt).

The result is therefore:

p(x_{t+1} | y_{t}) = N(Tt x_{t|t}, Tt P Tt' + GGt).

Value

a list with components x, the mean of x_{t+1|t}, P the variance of x_{t+1|t} and Pinv, the inverse of P

Examples

1
posteriorPredictive(rnorm(3), diag(1,3), matrix(rnorm(9),3), diag(1,3))

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