summarize_trait_pairs: Summarize Trait and Keying Pairs in a Constructed...

View source: R/summarize_trait_pairs.R

summarize_trait_pairsR Documentation

Summarize Trait and Keying Pairs in a Constructed Forced-Choice Test

Description

Analyzes a constructed forced-choice block design and tallies the number of equally-keyed and mixed-keyed pairs for every trait combination.

Usage

summarize_trait_pairs(
  blocks,
  item_chars,
  trait_col,
  key_col,
  block_size = NULL,
  output_format = c("wide", "long")
)

Arguments

blocks

Either an n-by-k matrix of item IDs (where rows are blocks), or a flat vector of ordered item IDs.

item_chars

Data frame containing the item characteristics.

trait_col

Character string. Name of the column in item_chars containing traits.

key_col

Character string. Name of the column in item_chars containing keying directions.

block_size

Integer. Required only if blocks is a flat vector. Number of items per block.

output_format

Character. Either "wide" (default, cross-tabulated summary) or "long" (matches the exact data frame format of build_target_dist()).

Value

A data frame of the tallied pairs.


autoFC documentation built on July 14, 2026, 5:07 p.m.