Thin extender over lcmm::lcmm for the
Proust-Lima et al. (2017) latent-class linear mixed model on
longitudinal / repeated-measures data.
Arguments
- fixed
A two-sided formula for the fixed-effects part of the model.
- random
A one-sided formula for the random-effects part (default
~1, random intercept only).- subject
Character; the name of the column in
dataidentifying the subject / grouping variable.- data
A data frame containing the variables in
fixed,random, andsubject.- ng
Integer; the number of latent classes (default
2).- ...
Further arguments forwarded to
lcmm::lcmm(e.g.mixture,classmb,idiag,nwg,link,intnodes,epsa,epsb,epsd,maxiter,B,convB,convL,convG,verbose).
Value
A list with $method = "lcmm::lcmm" and $raw
(an lcmm object with the class-membership probabilities,
class-specific fixed-effect estimates, and convergence
diagnostics).
Examples
if (FALSE) { # \dontrun{
if (requireNamespace("lcmm", quietly = TRUE)) {
data("data_hlme", package = "lcmm")
morie_lcmm_latent_class(
fixed = Y ~ Time,
random = ~ Time,
subject = "ID",
data = data_hlme,
ng = 2,
mixture = ~ Time
)
}
} # }