Learn R Programming

mistr (version 0.0.6)

plim.compdist: Left-Hand Limit of Distribution Function

Description

plim is a generic function that evaluates the left-hand limit of distribution function for a distribution object at given values.

Usage

# S3 method for compdist
plim(O, q, lower.tail = TRUE, log.p = FALSE)

# S3 method for mixdist plim(O, q, lower.tail = TRUE, log.p = FALSE)

plim(O, q, lower.tail = TRUE, log.p = FALSE)

# S3 method for discrdist plim(O, q, lower.tail = TRUE, log.p = FALSE)

# S3 method for contdist plim(O, q, lower.tail = TRUE, log.p = FALSE)

# S3 method for trans_univdist plim(O, q, lower.tail = TRUE, log.p = FALSE)

Value

Vector of computed results.

Arguments

O

distribution object.

q

vector of quantiles.

lower.tail

logical; if TRUE, probabilities are \(P[X < x]\) otherwise, \(P[X \ge x]\), default: TRUE.

log.p

logical; if TRUE, probabilities \(p\) are given as \(log(p)\), default: FALSE.

Details

Methods of plim function evaluates the left-hand limit of any offered distribution from the package mistr. The left-hand limit is defined as \(F(x-)=P(X<x)\). The function makes use of the p[sufix] and q[sufix] functions as pnorm or qbeta and thus, if a new distribution is added, these functions must be reachable through the search path.

Examples

Run this code
B <- binomdist(10, 0.3)
plim(B, c(NA, 1, 3, 5))

P <- poisdist()
M <- mixdist(B, P, weights = c(0.5, 0.5))
plim(M, c(NA, 1, 3, 5))

CC <- compdist(B, P, weights = c(0.5, 0.5), breakpoints = 1)
CCC <- 2*CC+5
plim(CCC, c(NA, 1, 3, 5))

Run the code above in your browser using DataLab