Learn R Programming

RGAP (version 0.1.1)

.gibbsStepRAR2: Draws from the posterior of the parameters of the RAR2 cycle equation, conditional on the states.

Description

Draws from the posterior of the parameters of the RAR2 cycle equation, conditional on the states.

Usage

.gibbsStepRAR2(Y, parLast, parDistr, varNames)

Value

A list with the draws.

Arguments

Y

a Tn x 1 vector.

parLast

A 3 x 1 vector containing the last draw for amplitude, mean cycle periodicity, innovation variance (in that order).

parDistr

A 4 x 3 matrix with prior distribution and box constraints for the parameters of each variable (the order of the columns is as for parLast). In each column, the first two entries contain the prior hyperparameters and the last two entries the upper and lower bound.

varNames

A vector with parameter names in the correct order, i.e., amplitude, mean cycle periodicity, variance.

Details

The parameters \(A\) and \(\tau\) are Beta distributed and the variance \(\sigma^2\) is Gamma distributed.

The posterior is not available in closed form, instead it is obtained via an ARMS step.