sp_fa: Posterior sampling for the sparse Bayesian infinite factor...

Description Usage Arguments Value References

View source: R/Bayesian.R

Description

Ported to R from Matlab code supporting the paper by Bhattacharya and Dunson (2011). Courtesy of A. Bhattacharya.

Usage

1
sp_fa(dat, k, trace = TRUE, nprint = 1000, control = list(...), ...)

Arguments

dat

Data matrix, of size n x p.

k

Number of latent factor.

trace

If TRUE then trace information is being printed every nprint iterations of the Gibbs sampling. Default is TRUE.

nprint

Frequency of tracing information. Default is every 1000 iterations.

control

A list of hyperparameters for the prior distributions and for controlling the Gibbs sampling. See sp_fa_control.

...

Arguments to be used to form the default control argument if it is not supplied directly.

Value

A list, with components Sigma and Lambda, containing the posterior samples for the covariance matrix of the model, with dimension p x p x (nrun - burn)/thin, and of the loading matrix, with dimension p x k x (nrun - burn)/thin, respectively.

References

Bhattacharya, A. and Dunson, D.B. (2011). Sparse Bayesian infinite factor models. Biometrika, 98, p. 291-306.


rdevito/MSFA documentation built on March 18, 2020, 2:57 p.m.