twCoefLnormCi: twCoefLnormCi

Description Usage Arguments Value Author(s) See Also Examples

Description

Calculates mu and sigma of the lognormal distribution from lower and upper quantile, i.e. conidence interval.

Usage

1
twCoefLnormCi(lower, upper, sigmaFac = qnorm(0.99), isTransScale = FALSE)

Arguments

lower

value at the lower quantile, i.e. practical minimum

upper

value at the upper quantile, i.e. practical maximum

sigmaFac

sigmaFac=2 is 95% sigmaFac=2.6 is 99% interval

isTransScale

if true lower and upper are already on log scale

Value

named numeric vector: mu and sigma parameter of the lognormal distribution.

Author(s)

Thomas Wutzler

See Also

twQuantiles2Coef transOrigPopt.default

Examples

1
2
3
4
5
6
7
8
mu=2
sd=c(1,0.8)
p=0.99
lower <- l <- qlnorm(1-p, mu, sd )		# p-confidence interval
upper <- u <- qlnorm(p, mu, sd )		# p-confidence interval
cf <- twCoefLnormCi(lower,upper)	
all.equal( cf[,"mu"] , c(mu,mu) )
all.equal( cf[,"sigma"] , sd )

twDEMC documentation built on May 2, 2019, 5:38 p.m.