Description Usage Arguments Value Note
View source: R/variable_selection_functions.R
Using the (group) lasso solution path, compute the proportion of variability explained by the sparsified models (relative to the full model) for each MCMC simulation.
1 | computeRho(beta_path, XX, post_beta, post_trace_sigma_2)
|
beta_path |
|
XX |
|
post_beta |
|
post_trace_sigma_2 |
|
A list containing rho_lam0
and rho_lam2
,
corrosponding to rho2 for the full model and the sparsified model
(for each value of lambda
in the solution path).
post_trace_sigma_2
is the (posterior samples of)
the trace of the error covariance matrix jointly across subjects i=1,...,n
and observations j=1,...,m, after marginalizing out the random effects gamma_ik
.
This is given by nm x sigma_e^2
+ sum_ik sigma_gamma_ik^2
,
where the second term is necessary only when random effects are included in the model
AND integrated over in the predictive distribution.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.