Oalog {VGAM} | R Documentation

## One-Altered Logarithmic Distribution

### Description

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

### Usage

    doalog(x, shape, pobs1 = 0, log = FALSE)
    poalog(q, shape, pobs1 = 0)
    qoalog(p, shape, pobs1 = 0)
    roalog(n, shape, pobs1 = 0)

### Arguments

`x, q, n, p` | Same `Unif`.
`shape, log` | Same as `Otlog`).
`pobs1` | Probability of (an observed) one, called pobs1. The default value of `pobs1 = 0` corresponds to the response having a 1-truncated logarithmic distribution.

### Details

The probability function of Y is 1 with probability `pobs1`, else a 1-truncated logarithmic(shape) distribution.

### Value

`doalog` gives the density and `poalog` gives the distribution function, `qoalog` gives the quantile function, and `roalog` 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

`oalog`, `oilog`, `Otlog`.

### Examples

    shape <- 0.75; pobs1 <- 0.10; x <- (-1):7
    doalog(x, shape = shape, pobs1 = pobs1)
    table(roalog(100, shape = shape, pobs1 = pobs1))

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

[Package VGAM version 1.0-3 Index]