
Half-logistic density, distribution, quantile functions and random number generation.
dhalflogistic(x, scale=1, log=FALSE)
phalflogistic(q, scale=1)
qhalflogistic(p, scale=1)
rhalflogistic(n, scale=1)
quantile.
probability.
number of observations.
scale parameter (
logical; if TRUE
, logarithmic density will be returned.
‘dhalflogistic()
’ gives the density function,
‘phalflogistic()
’ gives the cumulative distribution
function (CDF),
‘qhalflogistic()
’ gives the quantile function (inverse CDF),
and ‘rhalflogistic()
’ generates random deviates.
The half-logistic distribution is simply a zero-mean logistic distribution
that is restricted to take only positive values.
If
N.L. Johnson, S. Kotz, N. Balakrishnan. Continuous univariate distributions, volume 2, chapter 23.11. Wiley, New York, 2nd edition, 1994.
dlogis
, dhalfnormal
,
dlomax
, drayleigh
,
TurnerEtAlPrior
, RhodesEtAlPrior
,
bayesmeta
.
# NOT RUN {
#######################
# illustrate densities:
x <- seq(0,6,le=200)
plot(x, dhalfnormal(x), type="l", col="red", ylim=c(0,1),
xlab=expression(tau), ylab=expression("probability density "*f(tau)))
lines(x, dhalflogistic(x), col="green3")
lines(x, dhalfcauchy(x), col="blue")
lines(x, dexp(x), col="cyan")
abline(h=0, v=0, col="grey")
# show log-densities (note the differing tail behaviour):
plot(x, dhalfnormal(x), type="l", col="red", ylim=c(0.001,1), log="y",
xlab=expression(tau), ylab=expression("probability density "*f(tau)))
lines(x, dhalflogistic(x), col="green3")
lines(x, dhalfcauchy(x), col="blue")
lines(x, dexp(x), col="cyan")
abline(v=0, col="grey")
# }
Run the code above in your browser using DataLab