[R] Cauchy distribution

Ben Bolker bbolker at gmail.com
Sun Oct 17 19:42:01 CEST 2010


evage <el_vagena <at> hotmail.com> writes:

> Firstly, I would like to fit a Cauchy distribution to my data. Any ideas for
> that? 

  Start with 

library("MASS")
fitdistr(x,"cauchy")

> And secondly I would like to see the difference between my data and the
> fitting and how statistical important is that difference. 

  General goodness-of-fit tests against an unspecified alternative
are a little tricky for continuously distributed
data.  You could use ?ks.test , but the results will not be quite right
because you will have estimated the parameters from the data -- see the
last paragraph in the help page under "Details".  It is easier
to evaluate relative goodness-of-fit of the Cauchy vs some other
distribution.



More information about the R-help mailing list