bfa_gd_gibbs: Fast Gibbs sampler for Bayesian factor analysis.

Description Usage Arguments Author(s)

View source: R/RcppExports.R

Description

Fast Gibbs sampler for Bayesian factor analysis.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
bfa_gd_gibbs(
  Linit,
  Finit,
  xi_init,
  phi_init,
  zeta_init,
  theta_init,
  kappa_init,
  Y22init,
  Y21,
  Y31,
  Y32,
  nsamp,
  burnin,
  thin,
  rho_0,
  alpha_0,
  delta_0,
  lambda_0,
  nu_0,
  beta_0,
  eta_0,
  tau_0,
  hetero_factors,
  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.

theta_init

A numeric vector. The initial values the the factor precisions.

kappa_init

A numeric scalar. The initial value of the mean of the factor 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.

delta_0

The prior sample size of the column-specific precisions of the factors.

lambda_0

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

nu_0

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

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.

hetero_factors

A logical. Should we also update the precisions of the factors (TRUE), or not (FALSE)?

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.