How to compare goodness of fit between different distributions in R? I have some annual maximum data and I want to fit them with some statistical distributions. Theoretically, annual maximum data can be modeled by a Generalized extreme value distribution (GEV), however, this is not always the case. So I want to test which distribution can better describe my data.
As an example, I have tested GEV and Weibull distributions.
library(extRemes)
library(eva)
library(fitdistrplus)

Mydata <- c(3,3,2,3,4,3,4,3,2,2,4,3,5,3,3,3,2,5,4,2,2,5,4,5,2,4,3,4,5,4,3,6,4,15,5,2,4,5,3)
fit_mle <- fevd(x=Mydata, method = "MLE", type="GEV",period.basis = "year")
ks.test(x=Mydata, y="pgev",loc=fit_mle$results$par[[1]],
    scale=fit_mle$results$par[[2]],shape=fit_mle$results$par[[3]])
summary(fit_mle)


fw <- fitdist(data=Mydata, distr="weibull")
ks.test(x=Mydata, y="pweibull",
    scale=fw$estimate[["scale"]],shape=fw$estimate[["shape"]])
summary(fw)


According to the KS test, both GEV and Weibull are acceptable. However, according to AIC, GEV is better. 
My questions are: First, am I correct that GEV is better in this case? Second, is there any goodness of fit test that can be used to compare the goodness of fit between different distributions? Thanks for any help.
 A: Since GEV has better AIC and BIC, it seems better.
You may also try cross-validation.
(To do cross-validation, you should randomlt divide the data by several (maybe 5) pieces, for each piece fit it on other pieces, and test it on this piece, looking at the log-likelihood. The sum of log-likelihoods is what you need.)
A: It appears that the Weibull distribution is a special case of the three parameter GEV (at least,from Wikipedia article on GEV - "The shape parameter ξ governs the tail behavior of the distribution. The sub-families defined by ξ = 0, ξ > 0 and ξ < 0  correspond, respectively, to the Gumbel, Fréchet and Weibull families"*, with a true shape parameter < 0 implying a "reverse" Weibull - I suspect this means a shape parameter > 0 is related to a Weibull, but not an expert, so not sure) I don't think it's clear from your results that the shape parameter is significantly > 0.
(* URL = https://en.wikipedia.org/wiki/Generalized_extreme_value_distribution#Link_to_Fr%C3%A9chet,_Weibull_and_Gumbel_families)
