Ab_drop_fixed: Drop fixed columns in the Ab-Representation

View source: R/transform_Ab_V.R

Ab_drop_fixedR Documentation

Drop fixed columns in the Ab-Representation

Description

Often inequalities refer to all probability parameters of a multinomial distribution. This function allows to transform the inequalities into the appropriate format A * x <b with respect to the free parameters only.

Usage

Ab_drop_fixed(A, b, options)

Arguments

A

a matrix defining the convex polytope via A*x <= b. The columns of A do not include the last choice option per item type and thus the number of columns must be equal to sum(options-1) (e.g., the column order of A for k = c(a1,a2,a2, b1,b2) is c(a1,a2, b1)).

b

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

options

number of observable categories/probabilities for each item type/multinomial distribution, e.g., c(3,2) for a ternary and binary item.

Examples

# p1 < p2 < p3 < p4
A4 <- matrix(
  c(
    1, -1, 0, 0,
    0, 1, -1, 0,
    0, 0, 1, -1
  ),
  nrow = 3, byrow = TRUE
)
b4 <- c(0, 0, 0)

# drop the fixed column for: p4 = (1-p1-p2-p3)
Ab_drop_fixed(A4, b4, options = c(4))


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