Returns subject-level random effect deviations on the natural (log) scale.
These are the Cholesky-transformed deviations, not standardized scores.
To obtain the standardized random effects (u matrix), access
object$tmb_obj directly.
Value
Data frame with subject-level random effects. Columns:
id— subject identifierb_i,c_i(when present) — first-column convenience aliases forq0_(Intercept)andalpha_(Intercept). Preserved for backward compatibility with older callers.q0_<term>— per-block random-effect coefficients for log-Q0, one column per random-effects design column from the parsed block structure. For factor-expanded or multi-block fits, these expose the per-condition slope REs thatb_i/c_ialone do not surface.alpha_<term>— analogous columns for log-alpha.
Examples
# \donttest{
data(apt)
fit <- fit_demand_tmb(apt, equation = "exponential", verbose = 0)
#> equation='exponential': Dropped 14 zero-consumption observations (146 remaining).
head(nlme::ranef(fit))
#> id b_i c_i q0_(Intercept) alpha_(Intercept)
#> 1 19 0.4347399 -0.6136355 0.4347399 -0.6136355
#> 2 30 -0.8308979 0.4420229 -0.8308979 0.4420229
#> 3 38 -0.3588356 0.1280378 -0.3588356 0.1280378
#> 4 60 0.3938846 0.1112281 0.3938846 0.1112281
#> 5 68 0.4514144 -0.3174826 0.4514144 -0.3174826
#> 6 106 -0.1487057 0.4857013 -0.1487057 0.4857013
# }
