dot-postRW: Draws from the posterior of the variance parameter of a...

.postRWR Documentation

Draws from the posterior of the variance parameter of a random walk or a random walk with constant or stochastic drift.

Description

Draws from the posterior of the variance parameter of a random walk or a random walk with constant or stochastic drift.

Usage

.postRW(Y, sigmaDistr, sigmaLast = NULL, muDistr = NULL)

Arguments

Y

A Tn x 1 vector with the dependent variable.

sigmaDistr

A 1 x k matrix with prior distribution and box constraints for the innovation variance. The first two entries contain the prior hyperparameters and the last two entries the upper and lower bound.

sigmaLast

A scalar containing the last draw of the innovation variance.

muDistr

A k x 1 matrix with prior distribution and box constraints for the constant trend. The first two entries contain the prior hyperparameters and the last two entries the upper and lower bound.

Details

If the process follows a random walk with constant drift, the two parameters are drawn sequentially (conditional on the other parameter). The constant is drawn from a normal posterior given by conjugacy.

The innovation variance is drawn from a Inverse-Gamma posterior given by conjugacy.


RGAP documentation built on Nov. 2, 2023, 6:02 p.m.