VitalSigns
VitalSigns

Reputation: 83

Inverse of the lognormal distribution

I need to find the inverse of a given lognormal distribution. Since there is no inbuilt function in R for inverse lognormal, I need to design my own.

I have this lognormal distribution for a random variable 'x'

 f_lambda <- function(x,mu,sig) {dlnorm(x, meanlog = mu, sdlog = sig,log=FALSE)}

On wikipedia it says

 G(y) = 1- F(1/y)

where G(Y)n is the inverse distribution to F(X) and X= 1/Y.

But, I am confused as to how to encode F(1/y) in r and what to use to define that distribution - mu or 1/mu.

I have estimates of mu and sigma for F(x).

Thanks in advance.

Upvotes: 0

Views: 4571

Answers (1)

akash87
akash87

Reputation: 3994

In general, the quantile distribution is the inverse of a cumulative distribution. This really means:

F(x) = p

x = F^-1(p)

which means that to find the inverse of the lognormal distribution you can use

qlnorm()

Upvotes: 3

Related Questions