
Per-subject prediction and Jacobian for mixed-effects engines
Source:R/RcppExports.R
nlmerSolveGrad.RdLike the population gradient solver but takes a per-subject
nsub x ntheta parameter matrix (phi = beta + b, as
supplied by lme4::nlmer) instead of one shared theta.
Requires .nlmSetupEnv() to already be loaded.
Arguments
- thetaMat
A
nsub x nthetamatrix of per-subject parameter values. Rowidis solved against subjectid(in the loadedetTransorder).- record
When
TRUE, record this evaluation's population parameter estimate – the per-subject mean ofthetaMat's columns (phi = beta + baveraged over subjects, which equals the fixed effect exactly for parameters without a random effect) – into the resident nlm parameter history via the shared scale machinery. This is how an external optimizer (e.g.lme4::nlmer) populates the iteration print and the history recovered bynlmGetParHist(). No objective value is recorded (the scale'sshowOfvis expected to be 0 for these engines). Defaults toFALSE.