Hi, I am trying to fit a Johnson SB distribution using fitdist function in fitdistrplus Library. I have defined the Johnson SB distribution from ( http://www.ntrand.com/johnson-sb-distribution/) . But it gives me the follwing errors. Any help would be appreciated
#xi = xi #lambda =l #delta =d #gamma = g djohn = function(x,xi,l,d,g) (d/(l*sqrt(2*pi)*((x-xi)/l)*(1-((x-xi)/l))))*exp[-0.5*(g + d*log(((x-xi)/l)/(1-((x-xi)/l))))^2] pjohn = function(x,xi,l,d,g) pnorm(g + d*log(((x-xi)/l)/(1-((x-xi)/l)))) qjohn = function(p,xi,l,d,g) xi + (l*exp((qnorm(p) - g)/d))/(1 + exp((qnorm(p) - g)/d)) f1c <- fitdist(data2,"john",start=list(xi = 0.5 ,l = 50, d = 1, g = 1)) Error in fitdist(data2, "john", start = list(xi = 0.5, l = 50, d = 1, : the function mle failed to estimate the parameters, with the error code 100 In addition: Warning message: In log(((x)/l)/(1 - ((x)/l))) : NaNs produced Cheers AG [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.