Skip to contents

Extracts class proportions with survey-adjusted confidence intervals.

Usage

class_proportions(object, weighted = TRUE, ci_level = 0.95)

Arguments

object

A SurveyMixr object

weighted

Logical, return weighted proportions? (default: TRUE)

ci_level

Confidence level (default: 0.95)

Value

Data frame with class proportions and confidence intervals

Details

Class proportions are estimated from the mixture model. When survey weights are used, weighted proportions better represent the population. Confidence intervals account for survey design (clustering, stratification).

Examples

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

class_proportions(fit)
} # }