validate.plist: Checks the validity of ordinal probabilities

Description Usage Arguments Details Examples

View source: R/validate.plist.R

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

1
validate.plist(plist, no.ord)

Arguments

plist

A list of probability vectors corresponding to each ordinal variable. The i-th element of plist is a vector of the cumulative probabilities defining the marginal distribution of the i-th ordinal component of the multivariate variables. If the i-th ordinal variable has k categories, the i-th vector of the plist will contain k-1 probability values. The k-th element is implicitly 1.

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

1
2
	marginal = list( c(0.2, 0.5), c(0.4, 0.7, 0.9))
	validate.plist(marginal, 2)

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