LmME | R Documentation |
Estimates the normal linear model parameterized as a linear transformation model.
LmME(
formula,
data,
subset,
weights,
offset,
na.action = na.omit,
silent = TRUE,
resid = FALSE,
do_update = FALSE,
estinit = TRUE,
initpar = NULL,
fixed = NULL,
nofit = FALSE,
control = optim_control(),
...
)
formula |
A formula describing the model. Smooth additive terms are
defined the way as in |
data |
an optional data frame, list or environment (or object
coercible by |
subset |
an optional vector specifying a subset of observations to be used in the fitting process. |
weights |
an optional vector of case weights to be used in the fitting
process. Should be |
offset |
this can be used to specify an _a priori_ known component to
be included in the linear predictor during fitting. This
should be |
na.action |
a function which indicates what should happen when the data
contain |
silent |
Logical. Make TMB functionality silent. |
resid |
Logical. If |
do_update |
Logical. If |
estinit |
Logical. Estimate a vector of initial values for the fixed effects parameters from a (fixed effects only) mlt model |
initpar |
Named list of initial parameter values, if |
fixed |
a named vector of fixed regression coefficients; the names need to correspond to column names of the design matrix |
nofit |
logical, if TRUE, creates the model object, but does not run the optimization |
control |
list with controls for optimization |
... |
Optional arguments to |
The additive mixed-effects normal linear model is a special case of the mixed-effects additive transformation model family, with the transformation function restricted to be linear and the inverse link set to the standard Gaussian CDF (see Hothorn et al., 2018). This function estimates this model with the transformation model parameterization, and offers features that are typically not available in other mixed-effects additive implementations, such as stratum-specific variances, and censored and/or truncated observations.
The model extends tram::Lm
with random effects and
(optionally penalized) additive terms. For details on mixed-effect
transformation models, see Tamasi and Hothorn (2021).
The elements of the linear predictor are parameterized with negative
parameters (i.e. negative = TRUE
in tram
).
The results can be transformed back to the usual linear mixed/additive model
parametrization with specific methods provided by tramME
. The
differences between the two parametrizations are discussed in Tamasi and
Hothorn (2021).
A LmME
model object.
Hothorn, Torsten, Lisa Möst, and Peter Bühlmann. "Most Likely Transformations." Scandinavian Journal of Statistics 45, no. 1 (March 2018): 110–34. <doi:10.1111/sjos.12291>
Tamasi, Balint, and Torsten Hothorn. "tramME: Mixed-Effects Transformation Models Using Template Model Builder." The R Journal 13, no. 2 (2021): 398–418. <doi:10.32614/RJ-2021-075>
library("survival")
data("sleepstudy", package = "lme4")
## Create a version of the response with 200 ms detection limit and 50 ms
## step sizes
ub <- ceiling(sleepstudy$Reaction / 50) * 50
lb <- floor(sleepstudy$Reaction / 50) * 50
lb[ub == 200] <- 0
sleepstudy$Reaction_ic <- Surv(lb, ub, type = "interval2")
m <- LmME(Reaction_ic ~ Days + (Days | Subject), data = sleepstudy)
summary(m)
coef(m, as.lm = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.