In R
package lme4
, the function coef
seems to return slopes for each level of the factor, but in Julia coef
returns only fixed effects. (see r - Extracting slopes for cases from a mixed effects model (lme4) - Cross Validated).
Is there a way to get the individual slopes like in R?
using RData, MixedModels
const dat = Dict(Symbol(k)=>v for (k,v) in
load(joinpath(dirname(pathof(MixedModels)), "..", "test", "dat.rda")));
sleepstudy = deepcopy(dat[:sleepstudy])
names!(sleepstudy, [:Reaction, :Days, :Subject])
fm1 = fit(LinearMixedModel, @formula(Reaction ~ Days + (Days|Subject)), sleepstudy)
coef(fm1)
# 2-element Array{Float64,1}:
# 251.40510484848375
# 10.467285959596053