rod: Internal function to generate random numbers following...

View source: R/internal_functions.R

rodR Documentation

Internal function to generate random numbers following over-dispersed Bernoulli or Poisson distribution. It wraps rpoisod and rbinomod functions.

Description

Internal function to generate random numbers following over-dispersed Bernoulli or Poisson distribution. It wraps rpoisod and rbinomod functions.

Usage

rod(n, mu, d, type = c("binomial", "quasibinomial", "poisson", "quasipoisson"))

Arguments

n

integer. Number of observations.

mu

numeric. Probability of success on each trial or mean, for (quasi)binomial and (quasi)Poisson, respectively.

d

numeric. Dispersion parameter.

type

character indicating the distribution.

Value

a vector with the simulated sample.


collin documentation built on Sept. 19, 2023, 5:06 p.m.