[R] non-linear binning? power-law in R
Dr. Herwig Meschke
HerwigMeschke at t-online.de
Thu Jun 17 16:49:55 CEST 2004
Why not try to avoid binning (and density plot) at all? An alternative
could be a qqplot (as a log-log-plot), e.g.
plot(ppoints(length(x4)), x4[order(x4)], log="xy")
abline(lm(log(x4[order(x4)])~log(ppoints(length(x4)))), col="red")
If the assumptions of uniform distribution and power transformation
y=a*x**b are true, the coefficient of lm estimates the exponent b.
Herwig
--
Dr. Herwig Meschke
Wissenschaftliche Beratung
Hagsbucher Weg 27
D-89150 Laichingen
phone +49 7333 210 417 / fax +49 7333 210 418
email HerwigMeschke at t-online.de
More information about the R-help
mailing list