-2

Consider me to be an undergraduate student doing a routine research study.

Is there a simple, straight forward way to find and access (or implement) distribution fitting in R using the following estimates:

  • Kolmogorov-Smirnov Minimum Distance estimate
  • Cramér–von Mises Minimum Distance estimate
  • Anderson-Darling Minimum Distance estimate
  • Maximum Likelihood Estimate

I got my self lost in tons of documentation and reference manuals on various R packages.

The question more relates to using R software system than to statistics itself, that's why I asked it here, at SO.

konstunn
  • 355
  • 4
  • 17
  • 1
    Understanding distribution theory and metrics on distributions is a fairly technical study. The reason you are lost is that you have no theoretical basis for reading the avaialble documentation. You should explain what level of mathematical sophistication you possess (for example how knowledgeable are you in real analysis) and ask the moderators to migrate this question to CrossValidated.com or perhaps http://math.stackexchange.com/. I count 135 hits on CV.com for a search on `distance metrics distributions` – IRTFM Nov 30 '16 at 05:43
  • Consider me to be an undergraduate student, I have no experience in real analysis. I've edited my question to add this information. – konstunn Nov 30 '16 at 05:59
  • 1
    Well, as an undergrad I never took a real analysis course and so what I do understand comes from haphazard self-education. If you are an "upper division" math major that would be one thing, and if a "lower division" biology student quite another thing. I still think the question is sitting in the wrong forum, whatever your level of mathematical sophistication. – IRTFM Nov 30 '16 at 06:03
  • Okay, I got you. But, in my opinion, the question more relates to using R, than to statistics. I also faced a disclaimer on a "R" tag at CrossValidated something like that one should not ask questions about using R itself at CV. – konstunn Nov 30 '16 at 06:07
  • But you are not asking how to fix a syntactic error. You are asking (I think) for background information on the differences, ...advantages/disadvantages of one over the others (for some unstated purpose) as well as guidance on how to interpret the results (which you would be advised to [edit] into the question) among the available methods that you list above. – IRTFM Nov 30 '16 at 06:12
  • Not exactly. I ask just for help about how to run certain statistical procedures and get the result. I will carry out the research on these results on my own. Otherwise, I really should better have asked my question at CV. – konstunn Nov 30 '16 at 06:34
  • @42- However, asking for help to interpret the results which I haven't got yet is not constructive. I consider interpreting the results to be another one separate big question to discuss. – konstunn Nov 30 '16 at 06:40
  • CV.com is the place to ask for help in interpreting results. The code you offer does run without error. If I were responding to this question on CV.com I would be advising you to plot the empirical distribution and the various "best fits" you get with various criteria. – IRTFM Nov 30 '16 at 06:46
  • Before downvoting, explain briefly, please, why you downvote. – konstunn Dec 01 '16 at 06:39

1 Answers1

0
library(fitdistrplus)

# normally distributed sample
x1 = rnorm(100)

# Kolmogorov-Smirnov mimimum distance method
fitdist(x1, "mge", distr="norm", gof="KS")

# Cramer-von Mises
fitdist(x1, "mge", distr="norm", gof="CvM")

# Anderson-Darling
fitdist(x1, "mge", distr="norm", gof="AD")

# Maximum Likelihood estimate
fitdist(x1, "mle", distr="norm")

Things are appeared to be pretty straight forward.

konstunn
  • 355
  • 4
  • 17
  • Before downvoting, explain briefly, please, why you downvote. – konstunn Dec 01 '16 at 06:40
  • I'm not the downvoter, either here or above, but I can certainly understand downvotes that have been cast. The code in this "answer" was simply copied and then removed from an earlier version of your question, making it even more puzzling that you posted these on a site for coding questions, if the answer was already easy to find in the package documentation. – IRTFM Dec 01 '16 at 17:28
  • It was not so easy to find that for me being a newbie at R. If you look back further you can also see that the very first versions of my question don't contain the code. It was a little challenge for me to find this out. – konstunn Dec 02 '16 at 06:26
  • The question has been hung. No one has voted to close it, or migrate. So I've decided to edit, reduce it a little and answer it by myself. – konstunn Dec 02 '16 at 07:04