strategy_to_Ab function

Transform Pattern of Predictions to Polytope

Transform Pattern of Predictions to Polytope

Transforms ordered item-type predictions to polytope definition. This allows to use Monte-Carlo methods to compute the Bayes factor if the number of item types is large (bf_binom).

strategy_to_Ab(strategy)

Arguments

  • strategy: a decision strategy returned by strategy_multiattribute.

Returns

a list containing the matrix A and the vector b

that define a polytope via A*x <= b.

Details

Note: Only works for models without guessing predictions and without equality constraints (i.e., requires separate error probabilities per item type)

Examples

# strategy: A,B,B,A e2<e3<e4<e1<.50 strat <- list( pattern = c(-1, 4, 3, -2), c = .5, ordered = TRUE, prior = c(1, 1) ) pt <- strategy_to_Ab(strat) pt # compare results to encompassing BF method: b <- list( pattern = 1:4, c = 1, ordered = FALSE, prior = c(1, 1) ) k <- c(2, 20, 18, 0) n <- rep(20, 4) m1 <- strategy_postprob(k, n, list(strat, b)) log(m1[1] / m1[2]) bf_binom(k, n, pt$A, pt$b, log = TRUE)