Description Usage Arguments Details Author(s) References See Also
"bfl" = "Bayesian factor loading"
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
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. |
keep |
A positive integer. We will same the updates of
|
print_update |
A logical. Should we print a text progress bar
to keep track of the Gibbs sampler ( |
plot_update |
A logical. Should we make some plots to keep
track of the Gibbs sampler ( |
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 scale of the mean matrix. |
tau_0 |
A scalar. The prior mean of the scale of the mean matrix. |
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.
There is no parameter expansion in this one. To see one with
parameter expansion, and a much faster version, see
bfa_gs_linked
.
David Gerard
Gerard, David, and Matthew Stephens. 2021. "Unifying and Generalizing Methods for Removing Unwanted Variation Based on Negative Controls." Statistica Sinica, 31(3), 1145-1166. doi: 10.5705/ss.202018.0345
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.