BetadiscreteWeibull: Beta discrete Weibull (bdw) Distribution Family Function

BetadiscreteWeibullR Documentation

Beta discrete Weibull (bdw) Distribution Family Function

Description

Provides functions for the probability mass function (PMF), cumulative distribution function (CDF), quantile function, and random variate generation for the BdW distribution.

Usage

dbdw(x, shape1, shape2, shape3, log = FALSE)
pbdw(x, shape1, shape2, shape3, lower.tail = TRUE, log.p = FALSE)
qbdw(p, shape1, shape2, shape3, lower.tail = TRUE, log.p = FALSE)
rbdw(n, shape1, shape2, shape3)

Arguments

x

Vector of non-negative integers for dbdw and pbdw.

p

Vector of probabilities (0 <= p <= 1) for qbdw.

n

Number of random variates to generate for rbdw.

shape1

First shape parameter "a" (must be > 0).

shape2

Second shape parameter "b" (must be > 0).

shape3

Second shape parameter "c" (must be > 0).

log

Logical; if TRUE, probabilities are returned on the log scale (for dsbg and psbg).

lower.tail

Logical; if TRUE (default), probabilities are P(X <= x), otherwise P(X > x) (for psbg).

log.p

Logical; if TRUE, probabilities are returned on the log scale (for psbg and qsbg).

Value

  • dbdw: A numeric vector of PMF values.

  • pbdw: A numeric vector of CDF values.

  • qbdw: A numeric vector of quantile values.

  • rbdw: A numeric vector of random variates.

References

Fader P, Hardie B. How to project customer retention. Journal of Interactive Marketing. 2007;21(1):76-90.

Fader P, Hardie B, Liu Y, Davin J, Steenburgh T. "How to Project Customer Retention" Revisited: The Role of Duration Dependence. Journal of Interactive Marketing. 2018;43:1-16.

Examples

# PMF example
dbdw(1:5, shape1 = 2, shape2 = 3,shape3 = 0.5)

# CDF example
pbdw(1:5, shape1 = 2, shape2 = 3, shape3 = 0.5)

# Quantile example
qbdw(c(0.1, 0.5, 0.9), shape1 = 2, shape2 = 3 , shape3 = 0.5)

# Random variates
rbdw(10, shape1 = 2, shape2 = 3,  shape3 = 0.5)


sriharitn/foretell documentation built on Feb. 2, 2025, 10:25 a.m.