get_group_probabilities: Compute Posterior Probabilities and Group Assignments for...

View source: R/multiple_model.R

get_group_probabilitiesR Documentation

Compute Posterior Probabilities and Group Assignments for Multivariate Trajectory Models

Description

Calculates the posterior probabilities of group membership for each individual based on a fitted multivariate trajectory model. It assigns each individual to the most likely joint trajectory group and provides the specific sub-group assignments across all dimensions.

Usage

get_group_probabilities(
  object,
  lY,
  lA,
  Risk = NULL,
  lymin = NULL,
  lymax = NULL,
  lTCOV = NULL,
  ldelta = NULL,
  lnw = NULL
)

Arguments

object

An object of class trajectory.mult returned by the trajeR_mult function.

lY

List of matrices representing the longitudinal responses (one matrix per model). Must match the data used for fitting.

lA

List of matrices representing the time or age of observation (one matrix per model). Must match the data used for fitting.

Risk

An optional one-sided formula for global risk factors, matching the one used for fitting.

lymin

An optional list of minimum boundaries for censoring. If NULL, it is calculated automatically.

lymax

An optional list of maximum boundaries for censoring. If NULL, it is calculated automatically.

lTCOV

**(Not implemented)** List of time-dependent covariates.

ldelta

**(Not implemented)** List of matrices indicating the presence of time-dependent covariates.

lnw

**(Not implemented)** List of integers representing weights.

Value

A list containing the following components:

post_prob

A matrix of posterior probabilities for each individual and each joint group.

joint_group

A numeric vector indicating the most likely joint group for each individual.

group_assignments

A matrix showing the sub-group assignment for each joint group.


trajeR documentation built on Aug. 4, 2026, 1:09 a.m.