Coming from an R background and lme4. I have 210 market_no’s and I’m fitting a logistic regression with a varying intercept on market_no’s. I can’t seem to find the match between the market_no’s and the fit random effects. Does anyone know if there’s a dictionary in MixedModels.jl or how it orders the random effects column? In R it’s just the ordering of the levels in the factor.
using MixedModels
propensity = fit(GeneralizedLinearMixedModel, @formula(exposure_flag ~ 1 + hrs + (1 |market_no)), data, Bernoulli())
ran_ef = ranef(propensity)[1]
julia> ran_ef
1×210 Array{Float64,2}:
0.175225 0.00431493 0.0471093 -0.0464407 -0.50483 0.0908781 0.134034 -0.265099 -0.0321225 0.055499 0.55636 -0.395267 … -0.30837 -0.157295 -0.328563 -0.157659 -0.00782337 -0.0862638 -0.137914 -0.237887 -0.456184 0.00809435 -0.202609