Computation of Confidence Limits for the Mean of a Lognormal Distribution

tl;dr Thought some old code for calculating confidence limits for the mean of a lognormal distribution was lost. Found it yesterday.

A program is described that calculates exact and optimal (uniformly most accurate unbiased) confidence limits for linear functions of the normal mean and variance. The program can therefore also be used to calculate confidence limits for monotone transformations of such functions (e.g., lognormal means). The accuracy of the program has been thoroughly evaluated in terms of coverage probabilities for a wide range of parameter values.

From Computation of Confidence Limits for Linear Functions of the Normal Mean and Variance (1999).

Many years ago, I implemented some improvements in the calculation of confidence limits for the mean of a lognormal distribution. This work was basically just implementing the methods developed by Charles Land (e.g., "Confidence Intervals for Linear Functions of the Normal Mean and Variance", Annals of Mathematical Statistics, 43, 1187-1205).

In contrast to confidence limits for the mean of a normal distribution, the case of a lognormal distribution is a little more tedious than one would think.

The methods implemented are actually for confidence limits for a linear function of the mean and variance of a normal distribution - the lognormal mean is a special case.

Land had worked with some folks and there was a standalone program that implemented these methods, but there was room for improvement (and I wanted to see if I could reproduce the values), and so I independently delved into it for a while as a side thing and was able to obtain a program that was more robust and was usable over a larger range. Land and I put together a report (this one), and the NIH even hosted the code on their site, where you could grab the code and/or run it online.

A few months ago, someone wrote me and asked if I could send him the code, as he couldn't find it anywhere.

I couldn't find it either, and the NIH subsite was gone. Charles Land has retired to Europe after a distinguished career, and I didn't remember sending him the entire package of files, anyway.

Now, there may be alternative/better methods to calculate these things nowadays, but the idea of someone having to re-implement these particular methods was a depressing thought - at least they could serve as a starting point or something.

In cleaning up a room yesterday, I came across a 15-year-old CD that had all of the 20th century code and documentation for this implementation. This stuff is actually almost 20 years old.

This information in currently available in this 8MB zip file at learnforeverlearn.com. There's some reorganization and cleanup needed of some things, which I hope to get to if all of this hasn't been superceded by better and more efficient approaches.

The How-To was written in WordPerfect, which I have converted to doc and uploaded as a public Google drive document here.

The program itself is written in Fortran. At the time, I compiled things with one of Microsoft's Fortran compilers, but I recall that I was also able to build it with the gnu Fortran compiler. It might even be possible to build it without too much trouble in javascript now.

No comments:

Post a Comment

Popular Posts