twCoefLogitnormCi: twCoefLogitnormCi

Description Usage Arguments Value Author(s) See Also Examples

Description

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

Usage

1
2
3
4
twCoefLogitnormCi(lower, upper, perc = 0.975, sigmaFac = qnorm(perc), 


    isTransScale = FALSE)

Arguments

lower

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

upper

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

perc

numeric vector: the probability for which the quantile was specified

sigmaFac

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

isTransScale

if true lower and upper are already on logit scale

Value

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

Author(s)

Thomas Wutzler

See Also

logitnorm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
mu=2


sd=c(1,0.8)


p=0.99


lower <- l <- qlogitnorm(1-p, mu, sd )		# p-confidence interval


upper <- u <- qlogitnorm(p, mu, sd )		# p-confidence interval


cf <- twCoefLogitnormCi(lower,upper)	


all.equal( cf[,"mu"] , c(mu,mu) )


all.equal( cf[,"sigma"] , sd )

logitnorm documentation built on May 2, 2019, 6:15 p.m.