Learn R Programming

multinomineq (version 0.2.6)

inside_binom: Check Whether Choice Frequencies are in Polytope

Description

Computes relative choice frequencies and checks whether these are in the polytope defined via (1) A*x <= b or (2) by the convex hull of a set of vertices V.

Usage

inside_binom(k, n, A, b, V)

inside_multinom(k, options, A, b, V)

Arguments

k

choice frequencies. For inside_binom: per item type (e.g.: a1,b1,c1,..) For inside_multinom: for all choice options ordered by item type (e.g., for ternary choices: a1,a2,a3, b1,b2,b3,..)

n

only for inside_binom: number of choices per item type.

A

a matrix with one row for each linear inequality constraint and one column for each of the free parameters. The parameter space is defined as all probabilities x that fulfill the order constraints A*x <= b.

b

a vector of the same length as the number of rows of A.

V

a matrix of vertices (one per row) that define the polytope of admissible parameters as the convex hull over these points (if provided, A and b are ignored). Similar as for A, columns of V omit the last value for each multinomial condition (e.g., a1,a2,a3,b1,b2 becomes a1,a2,b1). Note that this method is comparatively slow since it solves linear-programming problems to test whether a point is inside a polytope (Fukuda, 2004) or to run the Gibbs sampler.

options

only for inside_multinom: number of response options per item type.

See Also

inside

Examples

Run this code
############ binomial
# x1

Run the code above in your browser using DataLab