validation.ord: Validates the marginal specification of the ordinal variables

Description Usage Arguments Value Examples

View source: R/validation.ord.R

Description

Checks whether the marginal specification of the ordinal part is valid and consistent.

Usage

1
validation.ord(n.O, prop.list = NULL)

Arguments

n.O

Number of ordinal variables.

prop.list

A list of probability vectors corresponding to each ordinal variable. The i-th element of prop.list 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 prop.list will contain k-1 probability values. The k-th element is implicitly 1.

Value

The function returns TRUE if no specification problem is encountered. Otherwise, it returns an error message.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
n.O<-3
prop.list<-list(c(0.3,0.6),c(0.25,0.5,0.75),c(0.1,0.2,0.8,0.9))
validation.ord(n.O,prop.list)

## Not run: 
n.O<-3
validation.ord(n.O)

n.O<-NULL
prop.list<-list(c(0.3,0.6),c(0.25,0.5,0.75),c(0.1,0.2,0.8,0.9))
validation.ord(prop.list=prop.list)

n.O<--3
prop.list<-list(c(0.3,0.6),c(0.25,0.5,0.75),c(0.1,0.2,0.8,0.9))
validation.ord(-3,prop.list)

n.O<--0
prop.list<-list(c(0.3,0.6),c(0.25,0.5,0.75),c(0.1,0.2,0.8,0.9))
validation.ord(n.O,prop.list)

n.O<-5
prop.list<-list(c(0.3,0.6),c(0.25,0.5,0.75),c(0.1,0.2,0.8,0.9))
validation.ord(n.O,prop.list)

n.O<-3
prop.list<-list(c(0.3,0.6),c(0.25,0.5,-0.75),c(0.1,0.2,0.8,1.5))
validation.ord(n.O,prop.list)

n.O<-3
prop.list<-list(0.3,c(0.3,0.4),c(0.4,0.2,0.3))
validation.ord(n.O,prop.list)

## End(Not run)

PoisBinOrd documentation built on March 22, 2021, 9:06 a.m.