Learn R Programming

MultiDiscreteRNG (version 0.1.0)

validation.Bparameters: Validate binomial parameters are within feasible ranges

Description

This helper function checks that binomial inputs are valid before downstream probability calculations and data generation. If any check fails, the function stops with an informative error message.

Usage

validation.Bparameters(B.n.vec, B.prob.vec)

Value

No return values; called it to check parameter inputs

Arguments

B.n.vec

Vector of number of trials

B.prob.vec

Vector of probability

Examples

Run this code
validation.Bparameters(B.n.vec = c(10, 15), B.prob.vec = c(0.4, 0.2))

Run the code above in your browser using DataLab