plot-lcModel-method {latrend}R Documentation

Plot a lcModel

Description

Plot a lcModel object. By default, this plots the cluster trajectories of the model, along with the trajectories used for estimation.

Usage

## S4 method for signature 'lcModel,ANY'
plot(x, y, ...)

Arguments

x

The lcModel object.

y

Not used.

...

Arguments passed on to plotClusterTrajectories

object

The (cluster) trajectory data.

Value

A ggplot object.

See Also

plotClusterTrajectories plotFittedTrajectories plotTrajectories ggplot2::ggplot

Other lcModel functions: clusterNames(), clusterProportions(), clusterSizes(), clusterTrajectories(), coef.lcModel(), converged(), deviance.lcModel(), df.residual.lcModel(), estimationTime(), externalMetric(), fitted.lcModel(), fittedTrajectories(), getCall.lcModel(), getLcMethod(), ids(), lcModel-class, metric(), model.frame.lcModel(), nClusters(), nIds(), nobs.lcModel(), plotClusterTrajectories(), plotFittedTrajectories(), postprob(), predict.lcModel(), predictAssignments(), predictForCluster(), predictPostprob(), qqPlot(), residuals.lcModel(), sigma.lcModel(), strip(), time.lcModel(), trajectoryAssignments()

Examples

data(latrendData)
method <- lcMethodLMKM(Y ~ Time, id = "Id", time = "Time")
model <- latrend(method, latrendData, nClusters = 3)

if (require("ggplot2")) {
  plot(model)
}

[Package latrend version 1.6.1 Index]