I'm currently trying to do power calculation using SIMR package in R. To start off, I first created the following model which defines my study design with simulated output y:
model1 <- glmer(y ~ (a*b) +
(1 + (a*b)|subj), family="binomial",
data = simulated.df,
control = glmerControl(optCtrl = list(maxfun = 1e+9)))
I would now like to adjust the variance-covariance matrix of this model based on my pilot data. The varcorr matrix of my pilot data is as follows:
#> VarCorr(m_pilot)
#Groups Name Std.Dev. Corr
#subj (Intercept) 0.11582
#a1 0.12624 -0.254
#b1 0.12239 -0.080 0.563
#a1:b1 0.10523 0.267 -0.600 -0.337
How can I change the varcorr matrix of my stimulated model (model1) to the varcor matrix from my pilot data?
I would be very grateful for any help.
Maria