Last data update: 2014.03.03

R: Validates the marginal specification of the binary variables
validation.binR Documentation

Validates the marginal specification of the binary variables

Description

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

Usage

validation.bin(n.B, prop.vec = NULL)

Arguments

n.B

Number of binary variables.

prop.vec

Proportion vector for binary variables.

Value

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

Examples

n.B<-3
prop.vec<-c(0.25,0.5,0.75)
validation.bin(n.B, prop.vec)

## Not run: 
n.B<-3
validation.bin(n.B)

n.B<--3
prop.vec<-c(0.25,0.5,0.75)
validation.bin(n.B, prop.vec)

n.B<-0
prop.vec<-c(0.25,0.5,0.75)
validation.bin(n.B, prop.vec)

n.B<-5
prop.vec<-c(0.25,0.5,0.75)
validation.bin(n.B, prop.vec)

n.B<-3
prop.vec<-c(0.25,0.5,-0.75)
validation.bin(n.B, prop.vec)

## End(Not run)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(PoisBinNonNor)
Loading required package: BB
Loading required package: corpcor
Loading required package: Matrix
Loading required package: mvtnorm
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/PoisBinNonNor/validation.bin.Rd_%03d_medium.png", width=480, height=480)
> ### Name: validation.bin
> ### Title: Validates the marginal specification of the binary variables
> ### Aliases: validation.bin
> 
> ### ** Examples
> 
> n.B<-3
> prop.vec<-c(0.25,0.5,0.75)
> validation.bin(n.B, prop.vec)
[1] TRUE
> 
> ## Not run: 
> ##D n.B<-3
> ##D validation.bin(n.B)
> ##D 
> ##D n.B<--3
> ##D prop.vec<-c(0.25,0.5,0.75)
> ##D validation.bin(n.B, prop.vec)
> ##D 
> ##D n.B<-0
> ##D prop.vec<-c(0.25,0.5,0.75)
> ##D validation.bin(n.B, prop.vec)
> ##D 
> ##D n.B<-5
> ##D prop.vec<-c(0.25,0.5,0.75)
> ##D validation.bin(n.B, prop.vec)
> ##D 
> ##D n.B<-3
> ##D prop.vec<-c(0.25,0.5,-0.75)
> ##D validation.bin(n.B, prop.vec)
> ## End(Not run)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>