Skip to contents

Extracts predicted trajectories for a specific latent class.

Usage

extract_trajectories(object, class = 1, time_range = NULL)

Arguments

object

A SurveyMixr object

class

Integer specifying which class (default: 1)

time_range

Optional numeric vector of time points for prediction

Value

Data frame with time and predicted values

Examples

if (FALSE) { # \dontrun{
fit <- gmm_survey(data = mcs_simulated, id = "id", time = "age",
                  outcome = "selfcontrol", n_classes = 3)

traj_class1 <- extract_trajectories(fit, class = 1)
} # }