strategy_postprob {multinomineq} | R Documentation |
Strategy Classification: Posterior Model Probabilities
Description
Posterior model probabilities for multiple strategies (with equal prior model probabilities).
Usage
strategy_postprob(k, n, strategies, cpu = 1)
Arguments
k |
observed frequencies of Option B. Either a vector or a matrix/data frame (one person per row). |
n |
vector with the number of choices per item type. |
strategies |
list of strategies. See strategy_multiattribute |
cpu |
number of processing units for parallel computation. |
See Also
strategy_marginal
and model_weights
Examples
# pattern 1: A, A, B with constant error e<.50
strat1 <- list(
pattern = c(-1, -1, 1),
c = .5, ordered = FALSE,
prior = c(1, 1)
)
# pattern 2: A, B, B with ordered error e1<e3<e2<.50
strat2 <- list(
pattern = c(-1, 3, 2),
c = .5, ordered = TRUE,
prior = c(1, 1)
)
baseline <- list(
pattern = 1:3, c = 1, ordered = FALSE,
prior = c(1, 1)
)
# data
k <- c(3, 4, 12) # frequencies Option B
n <- c(20, 20, 20) # number of choices
strategy_postprob(k, n, list(strat1, strat2, baseline))
[Package multinomineq version 0.2.6 Index]