predict.latents_growth_mixture: Prediction for a growth mixture model (not implemented)

View source: R/growth-mixture-simulate.R

predict.latents_growth_mixtureR Documentation

Prediction for a growth mixture model (not implemented)

Description

Predictions for new persons are not implemented yet. The fitted class trajectories and each fitted person's own predicted curve are tables of get_results.latents_growth_mixture(): "trajectories" and "individual".

Usage

## S3 method for class 'latents_growth_mixture'
predict(object, ...)

Arguments

object

A latents_growth_mixture fit.

...

Unused.

Value

Never returns; raises latents_unsupported_prediction.

Examples

few_students <- subset(growth_scores, student <= 60)
fit <- mixture_regression(score ~ wave, few_students, n_classes = 2,
                          id = "student", class_level = "group",
                          random = "intercept", seed = 1)
# Prediction is refused; get_results(fit, "trajectories") has the curves
try(predict(fit))

latents documentation built on Oct. 16, 2026, 5:09 p.m.