Home > wafo > wstats > wweibplot.m

wweibplot

PURPOSE ^

Plots data on a Weibull distribution paper

SYNOPSIS ^

phat = wweibplot(x)

DESCRIPTION ^

 WWEIBPLOT Plots data on a Weibull distribution paper
 
  CALL:  phat = wweibplot(X)
 
        phat = [a c] Parameters (see wweibcdf) estimated from 
               the plot by least squares method
           X = data vector or matrix
 
  Example:
    R=wweibrnd(2,2,1,100);
    phat=wweibplot(R)
 
  See also  wwibcdf, wweibinv

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

001 function phat = wweibplot(x)
002 %WWEIBPLOT Plots data on a Weibull distribution paper
003 %
004 % CALL:  phat = wweibplot(X)
005 %
006 %       phat = [a c] Parameters (see wweibcdf) estimated from 
007 %              the plot by least squares method
008 %          X = data vector or matrix
009 %
010 % Example:
011 %   R=wweibrnd(2,2,1,100);
012 %   phat=wweibplot(R)
013 %
014 % See also  wwibcdf, wweibinv
015 
016 
017 
018 % Reference: Cohen & Whittle, (1988) "Parameter Estimation in Reliability
019 % and Life Span Models", p. 25 ff, Marcel Dekker.
020 
021 % Revised jr 28.08.2000: line 23 added.
022 % rewritten ms 20.06.2000
023 
024 x = x(:);
025 F=empdistr(x,[],0);
026 plot(log(F(:,1)),log(-log(1-F(:,2))),'b.','markersize',12);
027 U=[ones(size(x)) log(F(:,1))];
028 b=U\log(-log(1-F(:,2)));
029 c=b(2);
030 a=exp(-b(1)/c);
031 hold on
032 plot(log(F(:,1)),U*b,'r--')
033 hold off
034 title('Weibull Probability Plot')
035 xlabel('log(X)')
036 ylabel('log(-log(1-F))')
037 if nargout > 0,
038   phat=[a,c];
039 end
040

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