0

I would like to calculate r2 for this multilevel model (longitudional). "Mzp" means time, which is a dummy-coded variable (mzp.D1, mzp.D2 - simple contrasts).

slope.outcome.simple.con <- lme(MKG.IS ~ mzp.D1 + mzp.D2 + MKG.TREAT_2 + mzp.D1*MKG.TREAT_2 + mzp.D2*MKG.TREAT_2, random = ~ mzp.D1 + mzp.D2| MKG.NR, data = lang, method = "ML", control = list(opt = "optim", sigma = 1e-7))

I want to run this function:

r2mlm_long_manual(
  data,
  covs,
  random_covs,
  clusterID,
  gammas,
  Tau,
  sigma2,
  bargraph = TRUE)

What can I insert for "gammas", for "Tau" and for "sigma2"?

I have already tried to execute the function "multilevel.r2", which led to the result (according to Rights & Sterba, 2021) that the explained variance is 100 percent, which cannot be possible.

I hope someone can explain to me how best to solve this problem.

Phil
  • 7,287
  • 3
  • 36
  • 66

0 Answers0