bfa_gs_linked_gibbs: Fast Gibbs sampler for Bayesian factor analysis.

Description Usage Arguments Author(s)

View source: R/RcppExports.R

Description

This is very similar to bfa_gd_gibbs except that we link the precisions of the observations with the precisions of the factors. For some reason, this works very well in practice.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
bfa_gs_linked_gibbs(
  Linit,
  Finit,
  xi_init,
  phi_init,
  zeta_init,
  Y22init,
  Y21,
  Y31,
  Y32,
  nsamp,
  burnin,
  thin,
  rho_0,
  alpha_0,
  beta_0,
  eta_0,
  tau_0,
  display_progress
)

Arguments

Linit

A numeric matrix. The initial values of the loadings.

Finit

A numeric matrix. The initial values for the factors.

xi_init

A numeric vector. The initial values of the precisions.

phi_init

A numeric scalar. The initial value of the mean of the precisions.

zeta_init

A numeric vector. The initial values of the augmented row precisions.

Y22init

A matrix of numerics. The initial value of Y22.

Y21

A matrix of numerics.

Y31

A matrix of numerics.

Y32

A matrix of numerics.

nsamp

The number of iterations to run in the Gibbs sampler, not including the burnin.

burnin

The number of iterations to burnin.

thin

We only collect samples every thin iterations.

rho_0

The prior sample size for column-specific the precisions.

alpha_0

The prior sample size for the mean of the column-specific precisions.

beta_0

The prior mean of the mean of the column-specific precisions.

eta_0

The prior sample size of the expanded parameters.

tau_0

The prior mean of of the expanded parameters.

display_progress

A logical. If TRUE, then a progress bar will be displayed and you'll be able to interrupt the C++ code. If FALSE, then neither of these capabilities will be provided.

Author(s)

David Gerard


dcgerard/vicar documentation built on July 7, 2021, 1:08 p.m.