draw_sig: Draw variance of idiosyncratic components from inverse gamma...

Description Usage Arguments Value Examples

View source: R/draw_sig.R

Description

function draws variance of idiosyncratic components from inverse gamma distribution.

Usage

1
draw_sig(yt, lambda, ft, Ttq, nu0, s0)

Arguments

yt

A matrix of demeaned and standardized time series data.

lambda

A vector of dimension n x k of the factor loadings.

ft

A matrix of the factors.

Ttq

Number of high-frequency periods minus lag length for state equation.

nu0

shape (degrees of freedom) of IG distribution.

s0

Prior for the rate (reciprocal of scale) of IG distribution (1/100=0,01 as benchmark residuals of AR(1) from OLS).

Value

Matrix R.

Examples

1
2
3
4
5
6
7
8
9
yt <- as.matrix(t(Xmat))
k <- 2
q <- 1
Tt <- dim(yt)[2]
Ttq <- Tt-q
V_lam <- diag(k)

nu0 <- k + 3
s0 <- 100

h4sci/packagr documentation built on Jan. 7, 2021, 10:40 p.m.