validation.ordPmat: Validates matrix of ordinal probabilities

Description Usage Arguments Details Value Examples

View source: R/validation.ordPmat.R

Description

Validates the range of input matrix of marginal probabilities. It also counts the ordinal categories for each variable.

Usage

1

Arguments

ordPmat

Matrix of marginal probabilities.

Details

Number of columns of input matrix is the number of variables and each column contains probability of each category within each variable. Any probability with 0 value must be entered at the end of corresponding column. For example if a column contains c(0.3,0.5,0.2,0), then it is assumed that particular variable has only 3 (1, 2 and 3) categories.

Value

J

Number of ordinal variables

K

Vector of number of categories for each variable

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
# 3 outcomes with 3, 4 and 4 categories.
ordPmat1 = matrix( c(0.15,0.70,0.40,
					0.55,0.10,0.25,
					0.30,0.10,0.15,
					0,0.10,0.20),4,3,byrow=TRUE)
validation.ordPmat(ordPmat1)

## End(Not run)

MultiOrd documentation built on March 6, 2021, 1:08 a.m.