pcBinom: Cumulative Probability Mass function for Lord's Two-Term...

View source: R/betafunctions.R

pcBinomR Documentation

Cumulative Probability Mass function for Lord's Two-Term Approximation to the Compound Binomial Distribution.

Description

Function for calculating the proportion of observations up to a specifiable quantile under Lord's two-term approximation to the compound Binomial distribution.

Usage

pcBinom(q, N, k, p, lower.tail = TRUE)

Arguments

q

The quantile or vector of quantiles for which the proportion is to be calculated.

N

Total number of trials.

k

Lord's k (see documentation for the Lords.k() function).

p

Probability of success for each trial.

lower.tail

Logical. If TRUE (default), probabilities are P[X<x], otherwise, P[X >= x]. Note that this differs from base-R binom() functions.

Examples

# Assume some variable follows a compound Binomial distribution with 100
# trials, a 50% probability of success on each trial, and Lord's k = 1. To
# compute the cumulative probability at a specific point of the distribution
# (e.g., 50):
pcBinom(q = 50, N = 100, k = 1, p = .5)

betafunctions documentation built on May 29, 2024, 1:13 a.m.