| dhalflogistic | R Documentation |
Half-logistic density, distribution, and quantile functions, random number generation and expectation and variance.
dhalflogistic(x, scale=1, log=FALSE)
phalflogistic(q, scale=1)
qhalflogistic(p, scale=1)
rhalflogistic(n, scale=1)
ehalflogistic(scale=1)
vhalflogistic(scale=1)
x, q |
quantile. |
p |
probability. |
n |
number of observations. |
scale |
scale parameter ( |
log |
logical; if |
The half-logistic distribution is simply a zero-mean logistic distribution
that is restricted to take only positive values.
If X\sim\mathrm{logistic}, then
|sX|\sim\mathrm{halflogistic}(\mathrm{scale}\!=\!s).
‘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 ‘ehalflogistic()’ and ‘vhalflogistic()’
functions return the corresponding half-logistic distribution's
expectation and variance, respectively.
Christian Roever christian.roever@med.uni-goettingen.de
C. Roever, R. Bender, S. Dias, C.H. Schmid, H. Schmidli, S. Sturtz, S. Weber, T. Friede. On weakly informative prior distributions for the heterogeneity parameter in Bayesian random-effects meta-analysis. Research Synthesis Methods, 12(4):448-474, 2021. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1002/jrsm.1475")}.
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.
#######################
# 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.