oazetaUC: One-Altered Logarithmic Distribution

OazetaR Documentation

One-Altered Logarithmic Distribution

Description

Density, distribution function, quantile function and random generation for the one-altered zeta distribution with parameter pobs1.

Usage

doazeta(x, shape, pobs1 = 0, log = FALSE)
poazeta(q, shape, pobs1 = 0)
qoazeta(p, shape, pobs1 = 0)
roazeta(n, shape, pobs1 = 0)

Arguments

x, q, n, p

Same Unif.

shape, log

Same as Otzeta).

pobs1

Probability of (an observed) one, called pobs1. The default value of pobs1 = 0 corresponds to the response having a 1-truncated zeta distribution.

Details

The probability function of Y is 1 with probability pobs1, else a 1-truncated zeta distribution.

Value

doazeta gives the density and poazeta gives the distribution function, qoazeta gives the quantile function, and roazeta generates random deviates.

Note

The argument pobs1 is recycled to the required length, and must have values which lie in the interval [0,1].

Author(s)

T. W. Yee

See Also

oazeta, Oizeta, Otzeta, zeta.

Examples

shape <- 1.1; pobs1 <- 0.10; x <- (-1):7
doazeta(x, shape = shape, pobs1 = pobs1)
table(roazeta(100, shape = shape, pobs1 = pobs1))

## Not run:  x <- 0:10
barplot(rbind(doazeta(x, shape = shape, pobs1 = pobs1),
                dzeta(x, shape = shape)),
        beside = TRUE, col = c("blue", "orange"), cex.main = 0.7, las = 1,
        ylab = "Probability", names.arg = as.character(x),
        main = paste("OAZ(shape = ", shape, ", pobs1 = ", pobs1,
                   ") [blue] vs",  " zeta(shape = ", shape,
                   ") [orange] densities", sep = "")) 
## End(Not run)

VGAMdata documentation built on March 18, 2022, 8:03 p.m.