On Sat, 18 Oct 2014 00:21:35 +0000 Bill Oliver vendor@billoblog.com wrote:
On Sat, 18 Oct 2014, Rolf Turner wrote:
It would be a bit of work, although not an overwhelming intellectual challenge, to produce an R package that would do essentially the same thing as "easyfit". There are a number of questions that would have to be addressed of course. E.g. just how do you want/expect the distributions to be fitted to the data? Maximum likelihood? Are all the distributions dealt with by "easyfit" amenable to being fitted via maximum likelihood? And how is the choice of distribution to be made? AIC? The "easyfit" web page refers to "goodness of fit tests", which can be problematic, or "visual inspection" --- always a good idea, but it too can be problematic.
Overall I don't think this "press a button and let the software do your thinking for you" is the right way to go. If the results matter at all, you need to know what you are doing and what pitfalls can lurk to trap the unwary.
I don't understand what you mean by "All the R packages I've seen make you build your own library of probability density functions and then do the fitting on each one." R has a large number of built-in probability density functions (including *most* of the distributions listed on the "easyfit" web page) and most of these can be fitted (via maximum likelihood) using the fitdistr() function from the MASS package. The fitdistr() function can fit essentially any distribution for which a probability density function can be written. Goodness of fit testing is more problematic, but then as I said that is a problematic topic. Superimposing fitted pdf-s on a histogram of the data for "visual comparison" is straightforward.
cheers,
Rolf Turner
What I mean is that R has the capability of generating PDFs, and R has the capability of calculating various goodness of fit measures, but if you want to check goodness of fit measures against, say, 50 PDFs, then you have to write the package. It's easier for me to use easyfit than write the package.
Never having heard of "easyfit" before now, I guess I am confused as to what you mean when you say fitting a pdf. What is the form of the pdfs that you want to fit? It is very unusual to want to fit 50 different parametric pdfs, unless what you mean is something totally different. In that case, have you considered going the (nonparametric) density estimation route?
Many thanks, Ranjan
____________________________________________________________ FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your desktop! Check it out at http://www.inbox.com/marineaquarium