| fittedTrajectories | R Documentation |
Extract the fitted trajectories for all strata
## S4 method for signature 'lcModel' fittedTrajectories( object, at = time(object), what = "mu", clusters = trajectoryAssignments(object), ... )
object |
The model. |
at |
The time points at which to compute the id-specific trajectories.
The default implementation merely filters the output of |
what |
The distributional parameter to compute the response for. |
clusters |
The cluster assignments for the strata to base the trajectories on. |
... |
Additional arguments. |
The default implementation uses the output of fitted() of the respective model.
A data.frame representing the fitted response per trajectory per moment in time for the respective cluster.
Other lcModel functions:
clusterNames(),
clusterProportions(),
clusterSizes(),
clusterTrajectories(),
coef.lcModel(),
converged(),
deviance.lcModel(),
df.residual.lcModel(),
estimationTime(),
externalMetric,lcModel,lcModel-method,
fitted.lcModel(),
getCall.lcModel(),
getLcMethod(),
ids(),
lcModel-class,
metric(),
model.frame.lcModel(),
nClusters(),
nIds(),
nobs.lcModel(),
plot-lcModel-method,
plotClusterTrajectories(),
plotFittedTrajectories(),
postprob(),
predict.lcModel(),
predictAssignments(),
predictForCluster(),
predictPostprob(),
qqPlot(),
residuals.lcModel(),
sigma.lcModel(),
strip(),
time.lcModel(),
trajectoryAssignments()
data(latrendData) # Note: not a great example because the fitted trajectories # are identical to the respective cluster trajectory method <- lcMethodLMKM(Y ~ Time, id = "Id", time = "Time") model <- latrend(method, latrendData) fittedTrajectories(model) fittedTrajectories(model, at = time(model)[c(1, 2)])