Skip to contents

Given output from a random intercept model, compute the "X" and "Y" variables needed for the least squares reparametrization.

Usage

getXY_randint(
  XX,
  post_y_pred,
  post_sigma_e,
  post_sigma_u,
  post_y_pred_sum = NULL
)

Arguments

XX

(n x p) matrix of covariates

post_y_pred

(nsave x m x n) array of posterior predictive draws

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)

Value

list of the covariates and the response