Skip to contents

Wrapper around analyze_opinion_coalitions that iterates over waves (e.g. years), optionally binarizing items before analysis.

Usage

measure_alignment_waves(
  data,
  ques_cols = NULL,
  ques_stem = NULL,
  group_col,
  wave_col = "year",
  waves = NULL,
  id_col = NULL,
  weight_col = "weight",
  binarize = FALSE,
  na_action = c("warn", "fail"),
  binarize_args = list(),
  progress = TRUE,
  ...
)

Arguments

data

Data frame containing all waves.

ques_cols

Character vector of question columns.

ques_stem

Optional vector of substrings/regex used to match columns.

group_col

Grouping variable or named list for labeling.

wave_col

Column containing wave identifiers.

waves

Optional vector of waves to analyze.

id_col

Optional respondent id column name.

weight_col

Optional weight column name.

binarize

Logical; apply binarize_responses() before analysis.

na_action

Logical; if a wave is missing, either throw error or warning.

binarize_args

Named list of arguments for binarize_responses().

progress

Logical; show progress in purrr::map.

...

Additional arguments passed to analyze_opinion_coalitions.

Value

Named list of results by wave.