Function Reference: gevfit

statistics: [paramhat, paramci] = gevfit (data)
statistics: [paramhat, paramci] = gevfit (data, paramguess)
statistics: [paramhat, paramci] = gevfit (data, alpha)
statistics: [paramhat, paramci] = gevfit (…, options)

Find the maximum likelihood estimator paramhat of the generalized extreme value (GEV) distribution to fit data.

Arguments

  • data is the vector of given values.
  • paramguess is an initial guess for the maximum likelihood parameter vector. If not given, this defaults to k_0=0 and sigma, mu determined by matching the data mean and standard deviation to their expected values.
  • alpha returns 100(1-ALPHA) percent confidence intervals for the parameter estimates. Pass in [] for ALPHA to use the default values.
  • options a structure that specifies control parameters for the iterative algorithm used to compute ML estimates. The structure must contain the following fields:

    ’Display’ = "off"; ’MaxFunEvals’ = 400; ’MaxIter’ = 200; ’TolFun’ = 1e-6; ’TolX’ = 1e-6.

    If not provided, the aforementioned values are used by default.

Return values

  • paramhat is the 3-parameter maximum-likelihood parameter vector [k_0, sigma, mu], where k_0 is the shape parameter of the GEV distribution, sigma is the scale parameter of the GEV distribution, and mu is the location parameter of the GEV distribution.
  • paramci has the approximate 95% confidence intervals of the parameter values based on the Fisher information matrix at the maximum-likelihood position.

When K < 0, the GEV is the type III extreme value distribution. When K > 0, the GEV distribution is the type II, or Frechet, extreme value distribution. If W has a Weibull distribution as computed by the WBLFIT function, then -W has a type III extreme value distribution and 1/W has a type II extreme value distribution. In the limit as K approaches 0, the GEV is the mirror image of the type I extreme value distribution as computed by the EVFIT function.

The mean of the GEV distribution is not finite when K >= 1, and the variance is not finite when PSI >= 1/2. The GEV distribution is defined for K*(X-MU)/SIGMA > -1.

Examples

 
 
 data = 1:50;
 [pfit, pci] = gevfit (data);
 p1 = gevcdf (data, pfit(1), pfit(2), pfit(3));
 plot (data, p1)
 
 

See also: gevcdf, gevinv, gevlike, gevpdf, gevrnd, gevstat

Source Code: gevfit

Example: 1

 

 data = 1:50;
 [pfit, pci] = gevfit (data);
 p1 = gevcdf (data, pfit(1), pfit(2), pfit(3));
 plot (data, p1);

                    
plotted figure