Learn R Programming

convdistr (version 1.6.1)

BETABINOMIAL: Factory for a BETABINOMIAL distribution object

Description

Returns an BETABINOMIAL distribution object that produce random numbers from a betabinomial distribution using the rbbinom function

Usage

new_BETABINOMIAL(p_size, p_shape1, p_shape2, p_dimnames = "rvar")

new_BETABINOMIAL_od(p_size, p_mu, p_od, p_dimnames = "rvar")

new_BETABINOMIAL_icc(p_size, p_mu, p_icc, p_dimnames = "rvar")

Value

An object of class DISTRIBUTION, BETADISTRIBUION

Arguments

p_size

a non-negative parameter for the number of trials

p_shape1

non-negative parameters of the Betabinomial distribution

p_shape2

non-negative parameters of the Betabinomial distribution

p_dimnames

A character that represents the name of the dimension

p_mu

mean proportion for the binomial part of the distribution

p_od

over dispersion parameter

p_icc

intra-class correlation parameter

Functions

  • new_BETABINOMIAL_od(): parametrization based on dispersion

  • new_BETABINOMIAL_icc(): parametrization based on intra-class correlation

Author

John J. Aponte

Examples

Run this code
myDistr <- new_BETABINOMIAL(10,1,1)
myDistr$rfunc(10)

Run the code above in your browser using DataLab