R code for fitting a 3-parameter lognormal model using the correct likelihood

When fitting a three-parameter lognormal model the likelihood may approach infinity (see figure below). This unboundedness of the likelihood occurs when the threshold parameter of the three-parameter lognormal model approaches the smallest observed failure time. A possible remedy, such that the likelihood becomes bounded again, is using the correct likelihood.
For some data sets it is necessary to resort to a remedy such as the correct likelihood. This is because the unboundedness of the likelihood might prevent a numerical optimization algorithm from finding the correct model parameters.

Lognormal 3 parameter correct likelihood

Example of an unbounded likelihood: The likelihood goes to infinity when the threshold parameter (=gamma) approaches the smallest failure time (marked by red line).

The following R code implements the correct likelihood for a 3-parameter lognormal distribution. The code may be used to fit the distribution to (right) censored or complete (uncensored) data in R.

Continue reading R code for fitting a 3-parameter lognormal model using the correct likelihood

R code for fitting a three-parameter lognormal distribution

The following code fits the three-parameter lognormal distribution to (right) censored or complete (uncensored) data in R.

The R code implements a fitting strategy proposed by Jerry Lawless in his 2003 book Statistical models and methods for lifetime data (pp. 187-188). A similar strategy is suggested by Terry Therneau in this comment.

For some data sets Lawless’ fitting strategy yields an unbounded likelihood. See this blog post for more information on the unbounded likelihood of a 3-parameter lognormal model.

Lognormal 3 parameter

Continue reading R code for fitting a three-parameter lognormal distribution