Learn R Programming

extremevalues (version 1.0)

fitFunctions: Fit model distributions

Description

Fit model distribution to a set of observations.

Usage

fitLognormal(y, p)
fitPareto(y, p)
fitExponential(y,p)
fitWeibull(y,p)
fitNormal(y,p)

Arguments

y
Vector of one-dimensional nonnegative data
p
Corresponding quantile values

Value

  • R2R-squared value for the fit
  • lamda(exponential only) Estimated location (and spread) parameter for $f(y)=\lambda*exp(-\lambda * y)$
  • mu(lognormal only) Estimated ${\sf E}(\ln(y))$ for lognormal distribution
  • 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 $k$ for weibull distribution
  • lambda(weibull only) estimated scaling parameter $\lambda$ for weibull distribution

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.

References

An outlier detection method for economic data, M.P.J. van der Loo, Submitted to The Journal of Official Statistics (November 2009)

Examples

Run this code
y = 10^rnorm(50);
L <- getOutliers(y,rho=0.5);

Run the code above in your browser using DataLab