dot-postNIG: Draws from the posterior of parameters of a normal model with...

.postNIGR Documentation

Draws from the posterior of parameters of a normal model with normal inverse gamma prior.

Description

Draws from the posterior of parameters of a normal model with normal inverse gamma prior.

Usage

.postNIG(Y, X, betaLast, betaDistr, sigmaDistr)

Arguments

Y

A Tn x 1 vector with the dependent variable.

X

A Tn x k matrix with the k explanatory variables.

betaLast

A k x 1 vector containing the last draw.

betaDistr

A 4 x k matrix with prior distribution and box constraints for the parameters of each variable. In each column, the first two entries contain the prior hyperparameters and the last two entries the upper and lower bound.

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.

Details

Draws from the posterior are obtained by conjugacy of the Normal-Inverse-Gamma distribution.

Value

A list with a draws for beta and the innovation variance.


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