Home > wafo > wstats > wgumbplot.m

wgumbplot

PURPOSE ^

Plots data on a Gumbel distribution paper.

SYNOPSIS ^

phat = wgumbplot(x)

DESCRIPTION ^

 WGUMBPLOT Plots data on a Gumbel distribution paper.
 
  CALL:  phat = wgumbplot(X)
 
        phat = [a b] Parameters (see wgumbcdf) estimated from the plot by
               least squares method 
           X = data vector or matrix
 
  Example:
    R=wgumbrnd(2,0,[],1,100);
    phat=wgumbplot(R)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

001 function phat = wgumbplot(x)
002 %WGUMBPLOT Plots data on a Gumbel distribution paper.
003 %
004 % CALL:  phat = wgumbplot(X)
005 %
006 %       phat = [a b] Parameters (see wgumbcdf) estimated from the plot by
007 %              least squares method 
008 %          X = data vector or matrix
009 %
010 % Example:
011 %   R=wgumbrnd(2,0,[],1,100);
012 %   phat=wgumbplot(R)
013 
014 % Reference: 
015 %  Johnson  N.L., Kotz S. and Balakrishnan, N. (1994)
016 %  Continuous Univariate Distributions, Volume 2. Wiley. 
017 
018 
019 % rewritten ms 20.06.2000
020 
021 F=empdistr(x,[],0);
022 plot(F(:,1),-log(-log(F(:,2))),'b.','markersize',12);
023 U=[ones(size(F(:,1))) F(:,1)];
024 c=U\(-log(-log(F(:,2))));
025 a=1/c(2);
026 b=-c(1)*a;
027 hold on
028 plot(F(:,1),U*c,'r--')
029 hold off
030 title('Gumbel Probability Plot')
031 xlabel('X')
032 ylabel('-log(-log(F))')
033 if nargout > 0,
034   phat=[a,b];
035 end
036

Mathematical Statistics
Centre for Mathematical Sciences
Lund University with Lund Institute of Technology

Comments or corrections to the WAFO group


Generated on Thu 06-Oct-2005 02:21:16 for WAFO by m2html © 2003