Skip to contents

Implements the R3STEP approach for analyzing relationships between latent class membership and auxiliary (distal) variables while accounting for classification uncertainty.

Usage

r3step(
  gmm_object,
  distal_vars,
  data,
  method = "BCH",
  test_pairwise = TRUE,
  adjust_multiple = "none"
)

Arguments

gmm_object

A fitted SurveyMixr object from gmm_survey()

distal_vars

Character vector of distal variable names to analyze

data

Data frame containing the distal variables (must include same ID variable as used in gmm_object)

method

Character string specifying R3STEP method: "BCH" (Bolck-Croon-Hagenaars, default), "ML" (maximum likelihood), or "manual" (manual 3-step with correction)

test_pairwise

Logical, conduct pairwise comparisons between classes? (default: TRUE)

adjust_multiple

Character string for multiple testing adjustment: "none" (default), "bonferroni", "holm", or "BH"

Value

An S4 object of class R3StepResults containing:

class_means

Matrix of class-specific means for each distal variable

standard_errors

Matrix of survey-adjusted standard errors

test_results

Data frame with omnibus and pairwise test results

effect_sizes

Matrix of Cohen's d effect sizes (pairwise)

Details

The R3STEP approach addresses a key challenge in mixture modeling: naively relating class membership to auxiliary variables using most-likely class assignment leads to biased estimates due to classification uncertainty.

Why R3STEP?

Traditional approaches that use most-likely class assignment ("classify-analyze") produce biased parameter estimates and incorrect standard errors. The R3STEP methods correct for this by incorporating classification uncertainty into the analysis.

Available Methods:

  • BCH (default): Uses weighted regression with weights derived from the classification error matrix. Computationally efficient and recommended for most applications.

  • ML: Simultaneous estimation of mixture model and auxiliary variable relationships. Most accurate but computationally intensive.

  • Manual 3-step: Traditional 3-step approach with manual correction for classification error.

The function automatically accounts for complex survey design features (weights, clustering, stratification) when computing standard errors and test statistics.

Interpretation:

The output provides:

  • Class-specific means (adjusted for classification error)

  • Survey-adjusted standard errors

  • Omnibus tests (overall class differences)

  • Pairwise comparisons (if requested)

  • Effect sizes (Cohen's d with survey weights)

References

Asparouhov, T., & Muthén, B. (2014). Auxiliary variables in mixture modeling: Three-step approaches using Mplus. Structural Equation Modeling: A Multidisciplinary Journal, 21(3), 329-341.

Bolck, A., Croon, M., & Hagenaars, J. (2004). Estimating latent structure models with categorical variables: One-step versus three-step estimators. Political Analysis, 12(1), 3-27.

Vermunt, J. K. (2010). Latent class modeling with covariates: Two improved three-step approaches. Political Analysis, 18(4), 450-469.

Examples

if (FALSE) { # \dontrun{
# Fit GMM
fit <- gmm_survey(
  data = mcs_simulated,
  id = "id",
  time = "age",
  outcome = "selfcontrol",
  n_classes = 3,
  strata = "stratum",
  cluster = "psu",
  weights = "weight",
  starts = 500
)

# Analyze distal outcomes
r3step_results <- r3step(
  gmm_object = fit,
  distal_vars = c("academic_achievement", "delinquency"),
  data = mcs_simulated,
  method = "BCH"
)

summary(r3step_results)
} # }