Creates the design matrix that allows for estimation of G
The function G_estimate
uses a MoM method, and G_estimate_randint
is a special case of G_estimate
.
G_generate(data, Z_lst, RE_table, MoM, ID = "id")
data
: Data frame that contains the predictors and outcomeZ_lst
: Transposed list of Z matrices from the univariate fitsRE_table
: Table of random effects and interactions, generated from the lmerMod
objectMoM
: Integer to determine type of MoM estimation.ID
: Name of the ID factor, assuming names of HHat
are generated from the same table in the same orderList containing Z matrices and indices (unsure)
Helper function for variance estimation in fui
.