Skip to main content
edited tags
Link
kjetil b halvorsen
  • 82.8k
  • 32
  • 201
  • 663
edited tags
Link
kjetil b halvorsen
  • 82.8k
  • 32
  • 201
  • 663
Based on the help file for elnormAlt the question is about a CI for e^{\mu+sigma^2}
Source Link

Surprisingly, I can't find a discussion on calculating confidence intervals for the mean $EY=e^{\mu+\sigma^2/2}$ of the lognormal distributionsdistribution. My question goes beyond what is covered in the link below, and is specific to the package EnvStats.

Confidence Interval for Mu in a Log normal Distributions in R

Say I have some lognormal data:

mydat <- data.frame(value = rlnorm(1000, meanlog = 6, sdlog = .5))

That looks like: enter image description here

I use EnvStats::elnormAlt to estimate parameters for the lognormal distribution mydat.

elnormAlt(mydat$value, method = "mvue", ci = FALSE, ci.type = "two-sided", 
  ci.method = "land", conf.level = 0.95)

And obtain:

Results of Distribution Parameter Estimation
--------------------------------------------

Assumed Distribution:            Lognormal

Estimated Parameter(s):          mean = 454.7097844
                                 cv   =   0.5359667

Estimation Method:               mvue

Data:                            mydat$value

Sample Size:                     1000

When I change the argument ci = TRUE, I get the error:

Error in integrate(density.fcn.qlands.t, -pi/2, theta, nu = nu, zeta = zeta) : 
  non-finite function value

My questions are twofold:

  1. Can someone succinctly explain the mathematical meaning of cv?
  2. What is the meaning of the error message I'm getting, and how can I calculate confidence intervals using the Land (Cox) method?

Surprisingly, I can't find a discussion on calculating confidence intervals for lognormal distributions. My question goes beyond what is covered in the link below, and is specific to the package EnvStats.

Confidence Interval for Mu in a Log normal Distributions in R

Say I have some lognormal data:

mydat <- data.frame(value = rlnorm(1000, meanlog = 6, sdlog = .5))

That looks like: enter image description here

I use EnvStats::elnormAlt to estimate parameters for the lognormal distribution mydat.

elnormAlt(mydat$value, method = "mvue", ci = FALSE, ci.type = "two-sided", 
  ci.method = "land", conf.level = 0.95)

And obtain:

Results of Distribution Parameter Estimation
--------------------------------------------

Assumed Distribution:            Lognormal

Estimated Parameter(s):          mean = 454.7097844
                                 cv   =   0.5359667

Estimation Method:               mvue

Data:                            mydat$value

Sample Size:                     1000

When I change the argument ci = TRUE, I get the error:

Error in integrate(density.fcn.qlands.t, -pi/2, theta, nu = nu, zeta = zeta) : 
  non-finite function value

My questions are twofold:

  1. Can someone succinctly explain the mathematical meaning of cv?
  2. What is the meaning of the error message I'm getting, and how can I calculate confidence intervals using the Land (Cox) method?

Surprisingly, I can't find a discussion on calculating confidence intervals for the mean $EY=e^{\mu+\sigma^2/2}$ of the lognormal distribution. My question goes beyond what is covered in the link below, and is specific to the package EnvStats.

Confidence Interval for Mu in a Log normal Distributions in R

Say I have some lognormal data:

mydat <- data.frame(value = rlnorm(1000, meanlog = 6, sdlog = .5))

That looks like: enter image description here

I use EnvStats::elnormAlt to estimate parameters for the lognormal distribution mydat.

elnormAlt(mydat$value, method = "mvue", ci = FALSE, ci.type = "two-sided", 
  ci.method = "land", conf.level = 0.95)

And obtain:

Results of Distribution Parameter Estimation
--------------------------------------------

Assumed Distribution:            Lognormal

Estimated Parameter(s):          mean = 454.7097844
                                 cv   =   0.5359667

Estimation Method:               mvue

Data:                            mydat$value

Sample Size:                     1000

When I change the argument ci = TRUE, I get the error:

Error in integrate(density.fcn.qlands.t, -pi/2, theta, nu = nu, zeta = zeta) : 
  non-finite function value

My questions are twofold:

  1. Can someone succinctly explain the mathematical meaning of cv?
  2. What is the meaning of the error message I'm getting, and how can I calculate confidence intervals using the Land (Cox) method?
Tweeted twitter.com/StackStats/status/899927722948014082
Post Migrated Here from stackoverflow.com (revisions)
Source Link
Loading