Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: AIC for CDF fit
Date: Thu, 26 Feb 2009 02:34:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 12
Message-ID: <go4v2p$bnr$1@fred.mathworks.com>
References: <go0dfd$h9$1@fred.mathworks.com> <go47s7$s23$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1235615641 12027 172.30.248.37 (26 Feb 2009 02:34:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 26 Feb 2009 02:34:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1727284
Xref: news.mathworks.com comp.soft-sys.matlab:520896


Thanks a lot, Peter
yes, the wbllike can give me the likelihood for the weibull fit, so as the lognlike. i am also considering the rician, rayleigh and nakagami, but matlab did not provide such funciton for likelihood estimation except i copy from dfittool. 
So i am wondering is there method i can get the likelihood by not accessing dfittool, or can i know how matlab calculate the loglikelihood for funciton lognlike and wbllike? is it simplely 
log(sum(error^2)/N) % take log of MSE

Peter Perkins <Peter.PerkinsRemoveThis@mathworks.com> wrote in message <go47s7$s23$1@fred.mathworks.com>...

> You're generating random data, and then evaluating the CDF of a distribution, perhaps a distribution that has been estimated from (other?) data.  Perhaps you are using WBLFIT from the Statistics Toolbox to estimate the distribution?  (If you're using WEIBFIT as your var name indicates, you either have a very old version, or you should use WBLFIT.)  If that's the case, you would compute the AIC using WBLLIKE and the number of parameters:
> 
>    aic = 2*(wbllike(params,data) + 2)  % 2 * (negative log-likelihood + #params)
> 
> The AIC function you're trying to use is, I believe, a function from the System Identification Toolbox, and a function that requires you to pass in a model estimated using the functions in that toolbox.