draw_lam: Draw factor loadings from their conditional posterior

Description Usage Arguments Details Value Examples

View source: R/draw_lam.R

Description

function that allows to draw from posterior of factor loadings.

Usage

1
draw_lam(yt, ft, R, lam0, V_lam)

Arguments

yt

A matrix of demeaned and standardized time series data.

ft

A matrix of the factors.

R

Diagonal matrix of dimension n of idiosyncratic component.

lam0

Matrix of mean of initial factor loadings.

V_lam

Diagonal matrix of dimension k of Variance-Covariance matrix of initial factor loadings.

Details

The function conducts a normalization by demeaning and dividing by the standard deviation of the individual time series.

Value

Element of a vector, coefficient of lambda.

Examples

1
2
3
k <- 2
lam0 <- matrix(0,k,1)
V_lam <- diag(k)

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