Generally Altered, Inflated, Truncated and Deflated Logarithmic Distribution
gaitdlogUC.RdDensity, distribution function, quantile function and random generation for the generally altered, inflated, truncated and deflated logarithmic distribution. Both parametric and nonparametric variants are supported; these are based on finite mixtures of the parent with itself and the multinomial logit model (MLM) respectively.
Usage
dgaitdlog(x, shape.p, a.mix = NULL, a.mlm = NULL,
i.mix = NULL, i.mlm = NULL,
d.mix = NULL, d.mlm = NULL, truncate = NULL,
max.support = Inf, pobs.mix = 0, pobs.mlm = 0,
pstr.mix = 0, pstr.mlm = 0,
pdip.mix = 0, pdip.mlm = 0, byrow.aid = FALSE,
shape.a = shape.p, shape.i = shape.p, shape.d = shape.p,
log = FALSE)
pgaitdlog(q, shape.p, a.mix = NULL, a.mlm = NULL,
i.mix = NULL, i.mlm = NULL,
d.mix = NULL, d.mlm = NULL, truncate = NULL,
max.support = Inf, pobs.mix = 0, pobs.mlm = 0,
pstr.mix = 0, pstr.mlm = 0,
pdip.mix = 0, pdip.mlm = 0, byrow.aid = FALSE,
shape.a = shape.p, shape.i = shape.p, shape.d = shape.p,
lower.tail = TRUE)
qgaitdlog(p, shape.p, a.mix = NULL, a.mlm = NULL,
i.mix = NULL, i.mlm = NULL,
d.mix = NULL, d.mlm = NULL, truncate = NULL,
max.support = Inf, pobs.mix = 0, pobs.mlm = 0,
pstr.mix = 0, pstr.mlm = 0,
pdip.mix = 0, pdip.mlm = 0, byrow.aid = FALSE,
shape.a = shape.p, shape.i = shape.p, shape.d = shape.p)
rgaitdlog(n, shape.p, a.mix = NULL, a.mlm = NULL,
i.mix = NULL, i.mlm = NULL,
d.mix = NULL, d.mlm = NULL, truncate = NULL,
max.support = Inf, pobs.mix = 0, pobs.mlm = 0,
pstr.mix = 0, pstr.mlm = 0,
pdip.mix = 0, pdip.mlm = 0, byrow.aid = FALSE,
shape.a = shape.p, shape.i = shape.p, shape.d = shape.p)Arguments
- x, q, p, n, log, lower.tail
Same meaning as in
dlog.- shape.p, shape.a, shape.i, shape.d
Same meaning as
shapefordlog, i.e., for an ordinary logarithmic distribution. SeeGaitdpoisfor generic information.- truncate, max.support
See
Gaitdpoisfor generic information.- a.mix, i.mix, d.mix
See
Gaitdpoisfor generic information.- a.mlm, i.mlm, d.mlm
See
Gaitdpoisfor generic information.- pobs.mlm, pstr.mlm, pdip.mlm, byrow.aid
See
Gaitdpoisfor generic information.- pobs.mix, pstr.mix, pdip.mix
See
Gaitdpoisfor generic information.
Details
These functions for the logarithmic distribution
are analogous to the Poisson,
hence most details have been put in
Gaitdpois.
These functions do what
Oalog,
Oilog,
Otlog
collectively did plus much more.
Warning
See Gaitdpois about the dangers
of too much inflation and/or deflation on
GAITD PMFs, and the difficulties detecting such.
Value
dgaitdlog gives the density,
pgaitdlog gives the distribution function,
qgaitdlog gives the quantile function, and
rgaitdlog generates random deviates.
The default values of the arguments correspond to ordinary
dlog,
plog,
qlog,
rlog
respectively.
See also
gaitdlog,
Gaitdpois,
dgaitdplot,
Gaitdzeta,
multinomial,
Oalog,
Oilog,
Otlog.
Examples
ivec <- c(2, 10); avec <- ivec + 1; shape <- 0.995; xgrid <- 0:15
max.support <- 15; pobs.a <- 0.10; pstr.i <- 0.15
dvec <- 1; pdip.mlm <- 0.05
(ddd <- dgaitdlog(xgrid, shape,
max.support = max.support, pobs.mix = pobs.a,
pdip.mlm = pdip.mlm, d.mlm = dvec,
a.mix = avec, pstr.mix = pstr.i, i.mix = ivec))
#> [1] 0.00000000 0.23125894 0.26575062 0.07923885 0.06926528 0.05513516
#> [7] 0.04571624 0.03898942 0.03394516 0.03002261 0.05106095 0.02076115
#> [13] 0.02218089 0.02037230 0.01882255 0.01747987
if (FALSE) dgaitdplot(shape, ylab = "Probability", xlab = "x",
max.support = max.support, pobs.mix = 0,
pobs.mlm = 0, a.mlm = avec, all.lwd = 3,
pdip.mlm = pdip.mlm, d.mlm = dvec, fam = "log",
pstr.mix = pstr.i, i.mix = ivec, deflation = TRUE,
main = "GAITD Combo PMF---Logarithmic Parent") # \dontrun{}