sample_fc_responses: Sample forced-choice responses from block-level pattern...

View source: R/sim-utils.R

sample_fc_responsesR Documentation

Sample forced-choice responses from block-level pattern probabilities

Description

Uses inverse-CDF multinomial sampling (identical to the C++ implementation in forced_choice_from_agree) to draw a discrete pattern index for each person-block combination.

Usage

sample_fc_responses(prob, patterns, N.person, N.block)

Arguments

prob

N \times \sum_B P_b matrix of block-level pattern probabilities (stacked by block).

patterns

List of observed-pattern matrices (one per block).

N.person

Number of persons.

N.block

Number of blocks.

Value

A named list with response (N \times B integer matrix of pattern indices) and data (N \times B character matrix of ranking strings like "1>3>2").


ForceChoice documentation built on Sept. 13, 2026, 1:06 a.m.