OCHI98FIT Parameter estimates and confidence intervals for Ochi data. CALL: [phat pci] = ochi98fit(data,alpha) phat = [a b] = maximum likelihood estimates of the parameters of the distribution pci = 100(1-alpha) percent confidense intervals data = data matrix alpha = confidence level (default 0.05 corresponding to 95% CI) See also ochi98pdf
Log-likelihood function. | |
Inverse of the Normal distribution function | |
Parameter estimates for Rayleigh data. | |
Multidimensional unconstrained nonlinear minimization (Nelder-Mead). | |
Information about MATLAB and The MathWorks. | |
Convert string matrix to numeric array. | |
MATLAB version number. |
001 function [phat, pci,pinit]=ochi98fit(data,alpha) 002 %OCHI98FIT Parameter estimates and confidence intervals for Ochi data. 003 % 004 % CALL: [phat pci] = ochi98fit(data,alpha) 005 % 006 % phat = [a b] = maximum likelihood estimates of the parameters of the distribution 007 % pci = 100(1-alpha) percent confidense intervals 008 % data = data matrix 009 % alpha = confidence level (default 0.05 corresponding to 95% CI) 010 % 011 % 012 % See also ochi98pdf 013 014 % Reference: 015 % [1] Michel K. Ochi, 016 % "Probability distributions of peaks and troughs of non-gaussian processes" 017 % Probabilistic Engineering Mechanics Vol 13 No 4 (1998) 018 % pp 291-298 019 020 % tested on: 021 % history: 022 % revised pab nov 2004 023 % - replaced call to fmins with fminsearch 024 % revised pab 04.11.2000 025 % - removed ochi98like with a call to loglike instead 026 % revised pab 29.02.2000 027 % changed name to ochi98fit 028 % Per A. Brodtkorb 14.02.99 029 030 if (nargin < 2)|isempty(alpha) 031 alpha = 0.05; 032 end 033 p_int = [alpha/2; 1-alpha/2]; 034 035 data1=data(:) 036 037 a = wraylfit(data1)*sqrt(2); 038 pinit=[a a]; 039 040 %simultanous MLE 041 mvrs=version;ix=find(mvrs=='.'); 042 if str2num(mvrs(1:ix(2)-1))>5.2, 043 phat = fminsearch('loglike',pinit,[],data1,'ochi98pdf'); 044 else 045 phat = fmins('loglike',pinit,[],[],data1,'ochi98pdf'); 046 end 047 048 if nargout == 2 049 [LL,cov]=loglike(phat,data1,'ochi98pdf'); 050 sa = diag(info).'; 051 pci = wnorminv(repmat(p_int,1,2),[phat; phat],[sa;sa]); 052 end 053 054
Comments or corrections to the WAFO group