Extract the cluster trajectories
Extracts a data frame of all cluster trajectories.
## S4 method for signature 'lcModel' clusterTrajectories(object, at = time(object), what = "mu", ...)
object |
The |
at |
An optional vector, list or data frame of covariates at which to compute the cluster trajectory predictions. If a vector is specified, this is assumed to be the time covariate. Otherwise, a named list or data frame must be provided. |
what |
The distributional parameter to predict. By default, the mean response 'mu' is predicted. The cluster membership predictions can be obtained by specifying |
... |
Additional arguments. |
A data.frame of the estimated values at the given times. The first column should be named "Cluster". The second column should be time, with the name matching the timeVariable(object). The third column should be the expected value of the observations, named after the responseVariable(object).
Other model-specific methods:
coef.lcModel(),
converged(),
deviance.lcModel(),
df.residual.lcModel(),
fitted.lcModel(),
lcModel-class,
logLik.lcModel(),
model.frame.lcModel(),
nobs.lcModel(),
postprob(),
predict.lcModel(),
predictAssignments(),
predictForCluster(),
predictPostprob(),
residuals.lcModel(),
sigma.lcModel(),
time.lcModel(),
trajectories()
model <- latrend(method = lcMethodLcmmGMM(fixed = Y ~ Time, mixture = fixed), id = "Id", time = "Time", data = latrendData) clusterTrajectories(model) clusterTrajectories(model, at = c(0, .5, 1))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.