lcMethodMixAK_GLMM: Specify a GLMM iwht a normal mixture in the random effects

View source: R/methodMixAK_GLMM.R

lcMethodMixAK_GLMMR Documentation

Specify a GLMM iwht a normal mixture in the random effects

Description

Specify a GLMM iwht a normal mixture in the random effects

Usage

lcMethodMixAK_GLMM(
  fixed,
  random,
  time = getOption("latrend.time"),
  id = getOption("latrend.id"),
  nClusters = 2,
  ...
)

Arguments

fixed

A formula specifying the fixed effects of the model, including the response. Creates the y and x arguments for the call to mixAK::GLMM_MCMC.

random

A formula specifying the random effects of the model, including the random intercept. Creates the z and random.intercept arguments for the call to mixAK::GLMM_MCMC.

time

The name of the time variable.

id

The name of the trajectory identifier variable. This is used to generate the id vector argument for the call to mixAK::GLMM_MCMC.

nClusters

The number of clusters.

...

Arguments passed to mixAK::GLMM_MCMC. The following external arguments are ignored: y, x, z, random.intercept, silent.

Note

This method currently does not appear to work under R 4.2 due to an error triggered by the mixAK package during fitting.

References

\insertRef

komarek2009newlatrend

See Also

Other lcMethod implementations: getArgumentDefaults(), getArgumentExclusions(), lcMethod-class, lcMethodAkmedoids, lcMethodCrimCV, lcMethodDtwclust, lcMethodFeature, lcMethodFunFEM, lcMethodFunction, lcMethodGCKM, lcMethodKML, lcMethodLMKM, lcMethodLcmmGBTM, lcMethodLcmmGMM, lcMethodMclustLLPA, lcMethodMixtoolsGMM, lcMethodMixtoolsNPRM, lcMethodRandom, lcMethodStratify

Examples

data(latrendData)
# this example only runs when the mixAK package is installed
try({
 method <- lcMethodMixAK_GLMM(fixed = Y ~ 1, random = ~ Time,
  id = "Id", time = "Time", nClusters = 3)
 model <- latrend(method, latrendData)
 summary(model)
})

latrend documentation built on March 31, 2023, 5:45 p.m.