Draws from the posterior of the variance parameter of a random walk or a random walk with constant or stochastic drift.
.postRW(Y, sigmaDistr, sigmaLast = NULL, muDistr = NULL)
A Tn x 1
vector with the dependent variable.
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.
A scalar containing the last draw of the innovation variance.
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.
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.