Learn R Programming

HelpersMG (version 5.1)

pSnbinom: Distribution function for the sum of random variable with negative binomial distributions.

Description

Distribution function for the sum of random variable with negative binomial distributions.

Usage

pSnbinom(
  q = stop("At least one quantile must be provided"),
  size = NULL,
  prob = NULL,
  mu = NULL,
  lower.tail = TRUE,
  log.p = FALSE,
  tol = 1e-06
)

Arguments

q

vector of quantiles.

size

target for number of successful trials, or dispersion parameter (the shape parameter of the gamma mixing distribution). Must be strictly positive, need not be integer.

prob

probability of success in each trial. 0 < prob <= 1.

mu

alternative parametrization via mean.

lower.tail

logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x].

log.p

logical; if TRUE, probabilities p are given as log(p).

tol

Tolerance for recurrence

Value

pSnbinom returns distribution function

Details

pSnbinom returns the distribution function for the sum of random variable with negative binomial distributions

See Also

Other Distribution of sum of random variable with negative binomial distributions: dSnbinom(), qSnbinom(), rSnbinom()

Examples

Run this code
# NOT RUN {
alpha <- c(2.1, 2.05, 2)
mu <- c(10, 30, 20)
p <- pSnbinom(q=10, size=alpha, mu=mu, lower.tail = TRUE)
# }

Run the code above in your browser using DataLab