binom_to_multinom: Converts Binary to Multinomial Frequencies

View source: R/auxiliary.R

binom_to_multinomR Documentation

Converts Binary to Multinomial Frequencies

Description

Converts the number of "hits" in the binary choice format to the observed frequencies across for all response categories (i.e., the multinomial format).

Usage

binom_to_multinom(k, n)

Arguments

k

vector of observed response frequencies.

n

the number of choices per item type. If k=n=0, Bayesian inference is relies on the prior distribution only.

Details

In multinomineq, binary choice frequencies are represented by the number of "hits" for each item type/condition (the vector k) and by the total number of responses per item type/condition (the scalar or vector n).

In the multinomial format, the vector k includes all response categories (not only the number of "hits"). This requires to define a vector options, which indicates how many categories belong to one item type/condition (since the total number of responses per item type is fixed).

Examples

k <- c(1, 5, 8, 10)
n <- 10
binom_to_multinom(k, n)


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