Skip to contents

This function implements the bias correction of the ranking distribution using a paired anchor question, using the IPW estimator.

Usage

imprr_weights(
  data,
  J = NULL,
  main_q,
  anc_correct,
  seed = 123456,
  weight = NULL
)

Arguments

data

The input dataset with ranking data.

J

The number of items in the ranking question. Defaults to NULL, in which case it will be inferred from the data.

main_q

Column name for the main ranking question to be analyzed.

anc_correct

Indicator for passing the anchor question.

seed

Seed for set.seed for reproducibility.

weight

A vector of weights. Defaults to NULL.

Value

A list.