strategy_unique: Unique Patterns/Item Types of Strategy Predictions

View source: R/strategy_unique.R

strategy_uniqueR Documentation

Unique Patterns/Item Types of Strategy Predictions

Description

Find unique item types, which are defined as patterns of cue values that lead to identical strategy predictions.

Usage

strategy_unique(strategies, add_baseline = TRUE, reversed = FALSE)

Arguments

strategies

a list of strategy predictions with the same length of the vector pattern, see strategy_multiattribute.

add_baseline

whether to add a baseline model which assumes one probability in [0,1] for each item type.

reversed

whether reversed patterns are treated separately (default: automatically switch Option A and B if pattern=c(-1,1,1,1))

Value

a list including:

  • unique: a matrix with the unique strategy patterns

  • item_type: a vector that maps the original predictions to item types (negative: reversed items)

  • strategies: a list with strategy predictions with pattern adapted to the unique item types

Examples

data(heck2017_raw)
ca <- heck2017_raw[1:100, c("a1", "a2", "a3", "a4")]
cb <- heck2017_raw[1:100, c("b1", "b2", "b3", "b4")]
v <- c(.9, .8, .7, .6)
strats <- strategy_multiattribute(
  ca, cb, v,
  c("WADDprob", "WADD", "TTB")
)
strategy_unique(strats)

multinomineq documentation built on Nov. 22, 2022, 5:09 p.m.