The fitdistr function estimates distribution parameters by maximizing the likelihood function using the optim function. ... Functions were developped to enable moment matching estimation (MME), quantile matching estimation (QME), and maximum goodness-of-fit estimation (MGE) using eight different distances.