I am testing a code I am using in R to compute estimates for the MLEs of the parameters for a given distribution. As an example, to check if the code works, I have chosen the paper A New Two-parameter Modified Half-logistic Distribution... by G. Mohammad. However, in trying to reproduce the parameter estimates for the MHL distribution (defined on page 1 of the attached paper) when using Data Set II (see page 14), I obtain estimates of $0.630$ and $0.228$ for $\alpha$ and $\beta$, respectively. This is markedly different to those obtained by the author ($0.975$ and $0.298$). What has gone wrong here? Is there a mistake somewhere in my code? It doesn't seem obvious to me.
The code I am using is as follows:
library(bbmle)
x <- scan(textConnection("0.036 0.058 0.102 0.103 0.114 0.116 0.061 0.074 0.078 0.086 0.381 0.538
0.570 0.574 0.590 0.618 0.645 0.961 1.228 10.94 11.02 13.88 1.600 0.148 0.183 0.192 0.254 0.262 0.379 2.006 2.054 2.804 3.058 3.076 3.147 3.625 3.704 3.931 4.073 4.393 4.534 4.893 6.274 6.816 7.896
7.904 8.022 9.337 14.73 15.08"))
dL <- function(x,alpha,beta) {
r <- max(exp(-x)*(1-exp(-x))^(alpha-1)*(beta*exp(-(beta-1)*x)+alpha+(alpha-beta)*exp(-beta*x))/(1+exp(-beta*x))^2, 0.00000001)
}
vdL <- Vectorize(dL)
LL <- function(x, alpha, beta){ -sum( log( vdL(x, alpha, beta))) }
(m0 <- mle2(LL,start=list(alpha=1,beta=0.3),data=list(x=x)))
For convenience, the MHL pdf is given by
$$f(x) = e^{-x}(1-e^{-x})^{-1+\alpha}\frac{\beta e^{-(\beta-1)x}+\alpha+(\alpha-\beta)e^{-\beta x}}{(1+e^{-\beta x})^2}$$