drop_fixed | R Documentation |
Switches between two representation of polytopes for multinomial probabilities (whether the fixed parameters are included).
drop_fixed(x, options = 2) add_fixed(x, options = 2, sum = 1)
x |
a vector (typically |
options |
number of observable categories/probabilities for each item
type/multinomial distribution, e.g., |
sum |
a vector that determines the fixed sum in each multinomial condition.
By default, probabilities are assumed that sum to one.
If frequencies |
######## bi- and trinomial (a1,a2, b1,b2,b3) # vectors with frequencies: drop_fixed(c(3, 7, 4, 1, 5), options = c(2, 3)) add_fixed(c(3, 4, 1), options = c(2, 3), sum = c(10, 10) ) # matrices with probabilities: V <- matrix(c( 1, 0, 0, 1, .5, .5, 0, 1, 0 ), 3, byrow = TRUE) V2 <- add_fixed(V, options = c(2, 3)) V2 drop_fixed(V2, c(2, 3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.