bfa_gs_linked: Simple Bayesian low rank matrix decomposition.

Description Usage Arguments Details Author(s) References See Also

View source: R/ruvb.R

Description

"bfl" = "Bayesian factor loading"

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
bfa_gs_linked(
  Y21,
  Y31,
  Y32,
  k,
  nsamp = 10000,
  burnin = round(nsamp/4),
  thin = 10,
  display_progress = TRUE,
  rho_0 = 0.1,
  alpha_0 = 0.1,
  beta_0 = 1,
  eta_0 = 1,
  tau_0 = 1,
  use_code = c("r", "cpp")
)

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 keep 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)? Also, if TRUE, then you can interrupt the C++ code every 1% of runtime.

rho_0

A scalar. The prior "sample size" for the precisions.

alpha_0

A scalar. The prior "sample size" for the mean of the precisions.

beta_0

A scalar. The prior mean of the precisions.

eta_0

A scalar. The prior "sample size" for the parameter expansion.

tau_0

A scalar. The prior mean for the parameter expansion. matrix.

use_code

A character. Should we use the C++ code ("cpp") or the R code ("r")?

Details

This is as simple as they come. I put normal priors on the loadings and factors and gamma priors on the precisions. The hyperparameters are set to provide weak prior information by default.

The main difference between this version and others is that the factors are a prior assumed to have the same variances as the data observations. This might be distasteful to some.

This also has parameter expansion implemented and is written in compiled code. To see a slower version without parameter expansion, go to bfl.

Author(s)

David Gerard

References

See Also

bfa_gs_linked.


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