Plot the quantile-quantile (Q-Q) plot for the fitted lcModel object. This function is based on the qqplotr package.

qqPlot(model, byCluster = FALSE, ...)

Arguments

model

lcModel

byCluster

Whether to plot the Q-Q line per cluster

...

Additional arguments passed to residuals.lcModel, qqplotr::geom_qq_band(), qqplotr::stat_qq_line(), and qqplotr::stat_qq_point().

Value

A ggplot object.

Examples

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

if (require("ggplot2") && require("qqplotr")) {
  qqPlot(model)
}
#> Loading required package: qqplotr
#> 
#> Attaching package: ‘qqplotr’
#> The following objects are masked from ‘package:ggplot2’:
#> 
#>     StatQqLine, stat_qq_line