a logical constant. If TRUE (default), a histogram and density lines are drawn.
legend.pos
a character string. Indicates the legend position and must be one of "bottomright", "bottom", "bottomleft", "left", "topleft", "top", "topright" (default), "right" and "center".
dlc
a vector; probability density line colors for supported (up to 7) distributions. If unspecified, the rainbow color palette will be used.
dlw
a numerical constant; probability density line width.
...
Further arguments and parameters for the function hist, particularly, main title and axis labels. However, the parameter freq is not able to override.
Value
A list containing the following items:
distribution
the name of the best fitting distribution.
ks.statistic
the Kolmogorov-Smirnov test statistic for the distribution.
p.value
the p-value of the test.
summary
results similar to above for other distributions.
x
given data.
n
the sample size.
Details
This function is supported following univariate distributions:
for positive random variables: Log normal, Exponential, Gamma and Weibull.
for all random variables: Normal, Cauchy, Log normal, Exponential, Gamma, Weibull and Uniform.
Legends of the plot are ordered by p-values of the test.
References
William J. Conover (1971). Practical Nonparametric Statistics. New York: John Wiley & Sons. Pages 295<U+2013>301.
Venables, W. N. and Ripley, B. D. (2002) Modern Applied Statistics with S. Fourth edition. Springer.