Skip to contents

This function extracts the weights of ranking permutation patterns using a paired anchor question. The anchor question is a ranking question with the same set of options as the main question. The anchor question is used to identify the distribution of random answers, which is then used to estimate the distribution of non-random answers in the main question.

Usage

weight_patterns(
  dat,
  main_q,
  anchor_q,
  anc_correct,
  anc_correct_pattern = NULL,
  main_labels,
  J
)

Arguments

dat

The input dataset with ranking data.

main_q

Column name for the main ranking question to be analyzed.

anchor_q

Column name for the paired anchor question.

anc_correct

Indicator for passing the anchor question.

anc_correct_pattern

The correct pattern to pass the anchor question filter, given the reference set. Defaults to NULL. If NULL, it will taken on a J-length string with a natural progression of numbers, such as "123", "1234", "1234567", and so on.

main_labels

Labels for ranking options in the main question.

J

Number of options in the ranking question. This must be equal to the length of the main_labels argument. This argument ensures that there is no error in both arguments.