I've been given some data that should come from a lognormal distribution. I've got some issues concerning the fitting, here's what I did.
library(fitdistrplus) x <- c(3.36,0.31,9.24,0.29,0.01,1.18,0.35,0.89,3.23,12.24,0.19,5.35,23.05,32.39, 0.79,0.7,14.64,8.81,4.12,17.92,7.80,11.96,18.39,11.29,6.46,13.22,9.01,9.4, 8.43,25.82,4.69,6.28,8.70,7.45,9.48,5.07,11.93,9.52,18.41,11.38,10.80,23.21, 15.18,17.6,20.35,49.61,34.69,12.25,38.82,25.66,25.01,16.89,19.58,22.72, 10.01,4.30,20.06,5.93,4.55,18.11,0.54,5.75,16.79,8.77,0.11,5,3.77,9.06) descdist(x,discrete=FALSE)
I cannot post the graph since there would be too many links for my reputation, but data seem to come from a beta distribution, rather than a lognormal one. However I've tried the fit anyway.
fit.dist <- fitdist(x,"lnorm") plot(fit.dist)
What can I assess from the graphs? Q-Q plot suggests that the distribution of the data should have a longer right tail than the theoretical distribution. Does it also suggest that the data are right skewed?
At this point i rescale the data in the interval [0,1] to try to see if the beta distribution fits better.
y <- x/100 fit.dist <- fitdist(y,"beta")
Fit seems, as expected, much better.
> summary(fit.dist) Fitting of the distribution ' beta ' by maximum likelihood Parameters : estimate Std. Error shape1 0.8660958 0.1292606 shape2 6.6110806 1.2517790 Loglikelihood: 79.03786 AIC: -154.0757 BIC: -149.6367
Can I, at this point, infer that the data come from a Beta(0.8660958,6.610806)? What are the relations between Beta and lognormal in this particulare case? What other analysis can I perform to strengthen this hypothesis?