library(lme4)

set.seed(101)
ss <- sleepstudy[sample(nrow(sleepstudy), size = round(0.9 * nrow(sleepstudy))), ]

Fit the original model

m1 <- lmer(Reaction ~ Days + (1 | Subject) + (0 + Days | Subject), ss)

summary(m1)

Fix the params

Let's force the estimates to be 700 and 30.

dd <- as.function(m1)

ff <- dd(c(sqrt(700), sqrt(30)))

environment(dd)$pp$beta(1)  ## values of the new estimates


PMassicotte/makroalgaeindicators documentation built on May 20, 2019, 10:19 p.m.