.gibbsStep2Eq | R Documentation |
Draws from the posterior of the parameters of the cubs equation, conditional on the states.
.gibbsStep2Eq(
Y,
X,
p,
pk,
pa,
betaLast,
sigmaLast,
betaDistr,
sigmaDistr,
phiLast = NULL,
phiDistr = NULL,
phiC,
sigmaC
)
Y |
a |
X |
a |
p |
integer, lag of cubs. |
pk |
integer, contemporaneous cycle and cycle lags. |
pa |
integer, autoregressive order of error term. |
betaLast |
last draw from posterior of beta. |
sigmaLast |
last draw from posterior of cubs innovation variance. |
betaDistr |
prior distribution of beta. |
sigmaDistr |
prior distribution of cubs innovation variance. |
phiLast |
(optional) vector, last draw from posterior of the autoregressive parameter of the error term. |
phiDistr |
(optional) prior of the autoregressive parameter of the error term. |
phiC |
parameter vector of the cycle equation. |
sigmaC |
innovation variance of the cycle equation |
The parameter vector beta and the innovation variance are Normal-inverse Gamma distributed. A draw from their posterior is obtained by conjugacy.
If there are additional lags of the cycle or cubs, conjugacy does not apply since the starting values are not given. In this case, a Metropolis-Hasting step is implemented.
If the error term is an AR(1) or AR(2) process, an additional Gibbs step draws from the posterior of the autoregressive parameter, given all other parameters.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.