Description Usage Arguments Value Author(s) See Also Examples
Estimating coefficients of logitnormal distribution from mode and upper quantile
1 | twCoefLogitnormMLE(mle, quant, perc = 0.999)
|
mle |
numeric vector: the mode of the density function |
quant |
numeric vector: the upper quantile value |
perc |
numeric vector: the probability for which the quantile was specified |
numeric matrix with columns c("mu","sigma")
rows correspond to rows in mle, quant, and perc
Thomas Wutzler
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # estimate the parameters, with mode 0.7 and upper quantile 0.9
(theta <- twCoefLogitnormMLE(0.7,0.9))
x <- seq(0,1,length.out=41)[-c(1,41)] # plotting grid
px <- plogitnorm(x,mu=theta[1],sigma=theta[2]) #percentiles function
plot(px~x); abline(v=c(0.7,0.9),col="gray"); abline(h=c(0.999),col="gray")
dx <- dlogitnorm(x,mu=theta[1],sigma=theta[2]) #density function
plot(dx~x); abline(v=c(0.7,0.9),col="gray")
# vectorized
(theta <- twCoefLogitnormMLE(mle=seq(0.4,0.8,by=0.1),quant=0.9))
# flat
(theta <- twCoefLogitnormMLEFlat(0.7))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.