Compute the optimal linear coefficients for any covariates under a random intercept model
Source:R/source_subsel.R
get_coefs_randint.Rd
Given the output from a random intercept model and covariates of interest, compute the optimal linear coefficients.
Arguments
- post_y_pred
S x m x n
matrix of posterior predictive draws at the covariate values form
replicates per subject- XX
n x p
matrix of covariates (e.g., restricted to the subset ofp
variables of interest)- post_sigma_e
(
nsave
) draws from the posterior distribution of the observation error SD- post_sigma_u
(
nsave
) draws from the posterior distribution of the random intercept SD- post_y_pred_sum
(
nsave x n
) matrix of the posterior predictive draws summed over the replicates within each subject (optional)