bfa_gs: Bayesian factor analysis used in Gerard and Stephens (2021).

Description Usage Arguments Author(s) References See Also

View source: R/ruvb.R

Description

Similar to that of Ghosh and Dunson (2009) but with two key differences: (1) the prior is order invariant (though this makes the factors and factor loadings unidentified), and (2) we place hierarchical priors on the uniquenesses (variances).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
bfa_gs(
  Y21,
  Y31,
  Y32,
  k,
  nsamp = 10000,
  burnin = round(nsamp/4),
  thin = 20,
  display_progress = TRUE,
  hetero_factors = TRUE,
  rho_0 = 0.1,
  alpha_0 = 0.1,
  delta_0 = 0.1,
  lambda_0 = 0.1,
  nu_0 = 1,
  beta_0 = 1,
  eta_0 = 1,
  tau_0 = 1
)

Arguments

Y21

Top left of matrix.

Y31

Bottom left of matrix.

Y32

Top right of matrix.

k

The rank of the mean matrix.

nsamp

A positive integer. The number of samples to draw.

burnin

A positive integer. The number of early samples to discard.

thin

A positive integer. We will same the updates of Y22 every thin iteration of the Gibbs sampler.

display_progress

A logical. Should we print a text progress bar to keep track of the Gibbs sampler (TRUE) or not (FALSE)?

hetero_factors

A logical. Should we assign colum-specific variances for the factors (TRUE) or not (FALSE)?

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.

Author(s)

David Gerard

References

See Also

gdfa for the slower R implementation.


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