validate.plist {OrdNor} | R Documentation |
Checks the validity of ordinal probabilities
Description
The function checks the validity of the probability vectors of the ordinal variables. It verifies that the elements in the vectors are cumulative probabilities and the values are between 0 and 1. It also checks a number of vectors within the list matches the specified number of ordinal variables.
Usage
validate.plist(plist, no.ord)
Arguments
plist |
A list of probability vectors corresponding to each ordinal variable. The i-th element of |
no.ord |
Number of ordinal variables. |
Details
The function returns error message if there are any violations. No message is displayed for the correct specifications.
Examples
marginal = list( c(0.2, 0.5), c(0.4, 0.7, 0.9))
validate.plist(marginal, 2)