fitFunctions {extremevalues} | R Documentation |
Fit model distributions
Description
Fit model distribution to a set of observations.
Usage
fitNormal(y, p)
fitLognormal(y, p)
fitPareto(y, p)
fitExponential(y, p)
fitWeibull(y, p)
Arguments
y |
Vector of one-dimensional nonnegative data |
p |
Corresponding quantile values |
Details
The function sorts the values of y and uses (log)linear regression to fit the values between the pmin and pmax quantile to the cdf of a model distribution.
Value
R2 |
R-squared value for the fit |
lamda |
(exponential only) Estimated location (and spread) parameter for |
mu |
(lognormal only) Estimated |
sigma |
(lognormal only) Estimated Var(ln(y)) for lognormal distribution |
ym |
(pareto only) Estimated location parameter (mode) for pareto distribution |
alpha |
(pareto only) Estimated spread parameter for pareto distribution |
k |
(weibull only) estimated power parameter |
lambda |
(weibull only) estimated scaling parameter |
Author(s)
Mark van der Loo, see www.markvanderloo.eu
References
M.P.J. van der Loo, Distribution based outlier detection for univariate data. Discussion paper 10003, Statistics Netherlands, The Hague (2010). Available from www.markvanderloo.eu or www.cbs.nl.
Examples
y = 10^rnorm(50);
L <- getOutliers(y,rho=0.5);