Skip to contents

Computes plurality responses, respondent alignment, and cumulative plurality statistics by group for the specified question columns.

Usage

measure_alignment(
  data,
  wave_col = NULL,
  ques_cols = NULL,
  ques_stem = NULL,
  group_col = NULL,
  weight_col = NULL,
  id_col = NULL,
  verbose = TRUE,
  treat_na = c("exclude", "unaligned")
)

Arguments

data

Data frame containing responses.

wave_col

Column with wave identifiers (e.g., year).

ques_cols

Optional character vector of question columns to include.

ques_stem

Optional vector of substrings/regex used to match columns.

group_col

Grouping variable or named list for labeling.

weight_col

Optional weight column name.

id_col

Optional respondent id column name.

verbose

Logical; if TRUE (default) prints progress messages.

treat_na

How to handle NA responses in alignment.

Value

List of analysis tables and metadata attributes.