Description Usage Arguments Value
View source: R/factor_infinite.R
The model is as follows:
y_i = Λ η_i + ε_i
ε_i \sim N_p(0, Σ)
where Σ = diag(σ_1^2, ..., σ_p^2).
See Bhattacharya, Anirban, and David B. Dunson. 'Sparse Bayesian infinite factor models.' Biometrika (2011): 291-306.
1 2 3 4 5 6 7 8 9 | factor_infinite <- function(
Y,
k_star,
niter = 1000,
a_sig = 1,
b_sig = 1,
rho = 3,
a1 = 1,
a2 = 3)
|
Y |
n by p matrix |
k_star |
number of factors to cut off at |
niter |
number of iterations for the gibbs sampler to run. |
a_sig |
shape hyper parameter for the σ^2 |
b_sig |
shape hyper parameter for the σ^2 |
rho |
hyper parameter |
a1 |
hyper parameter |
a2 |
hyper parameter |
sigma2 |
An niter x p matrix of posterior values |
lambda |
An niter x p x k_star array of posterior values |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.