<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/245211</link>
    <title>MATLAB Central Newsreader - AIC for CDF fit</title>
    <description>Feed for thread: AIC for CDF fit</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Tue, 24 Feb 2009 09:09:01 -0500</pubDate>
      <title>AIC for CDF fit</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/245211#630410</link>
      <author>Xiaoxiao Mao</author>
      <description>Dear all, &lt;br&gt;
&lt;br&gt;
I am trying to use AIC to choose a best fit CDF. &lt;br&gt;
from matlab help, the syntex is  aic(model), i am not sure what to put as the model. maybe i put my codes as following, can anyone try to help me by telling  me what to put in the place of 'model'.&lt;br&gt;
&lt;br&gt;
% if weibull fitting is used&lt;br&gt;
data = random(1:100);&lt;br&gt;
weibfit = cdf('Weibull',data,parm_weib(1),parm_weib(2));&lt;br&gt;
m = aic(model);</description>
    </item>
    <item>
      <pubDate>Wed, 25 Feb 2009 19:57:59 -0500</pubDate>
      <title>Re: AIC for CDF fit</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/245211#630832</link>
      <author>Peter Perkins</author>
      <description>Xiaoxiao Mao wrote:&lt;br&gt;
&amp;gt; Dear all, &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I am trying to use AIC to choose a best fit CDF. &lt;br&gt;
&amp;gt; from matlab help, the syntex is  aic(model), i am not sure what to put as the model. maybe i put my codes as following, can anyone try to help me by telling  me what to put in the place of 'model'.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; % if weibull fitting is used&lt;br&gt;
&amp;gt; data = random(1:100);&lt;br&gt;
&amp;gt; weibfit = cdf('Weibull',data,parm_weib(1),parm_weib(2));&lt;br&gt;
&amp;gt; m = aic(model);&lt;br&gt;
&lt;br&gt;
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:&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;aic = 2*(wbllike(params,data) + 2)  % 2 * (negative log-likelihood + #params)&lt;br&gt;
&lt;br&gt;
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.</description>
    </item>
    <item>
      <pubDate>Thu, 26 Feb 2009 02:34:01 -0500</pubDate>
      <title>Re: AIC for CDF fit</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/245211#630911</link>
      <author>Xiaoxiao Mao</author>
      <description>Thanks a lot, Peter&lt;br&gt;
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. &lt;br&gt;
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 &lt;br&gt;
log(sum(error^2)/N) % take log of MSE&lt;br&gt;
&lt;br&gt;
Peter Perkins &amp;lt;Peter.PerkinsRemoveThis@mathworks.com&amp;gt; wrote in message &amp;lt;go47s7$s23$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&lt;br&gt;
&amp;gt; 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:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;    aic = 2*(wbllike(params,data) + 2)  % 2 * (negative log-likelihood + #params)&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; 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.</description>
    </item>
    <item>
      <pubDate>Thu, 26 Feb 2009 14:45:09 -0500</pubDate>
      <title>Re: AIC for CDF fit</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/245211#631051</link>
      <author>Peter Perkins</author>
      <description>Xiaoxiao Mao wrote:&lt;br&gt;
&amp;gt; Thanks a lot, Peter&lt;br&gt;
&amp;gt; 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. &lt;br&gt;
&amp;gt; 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 &lt;br&gt;
&amp;gt; log(sum(error^2)/N) % take log of MSE&lt;br&gt;
&lt;br&gt;
&quot;edit lognlike wbllike&quot;</description>
    </item>
    <item>
      <pubDate>Fri, 27 Feb 2009 03:39:02 -0500</pubDate>
      <title>Re: AIC for CDF fit</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/245211#631227</link>
      <author>Xiaoxiao Mao</author>
      <description>Peter Perkins &amp;lt;Peter.PerkinsRemoveThis@mathworks.com&amp;gt; wrote in message &amp;lt;go69tl$eg1$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&lt;br&gt;
&amp;gt; &quot;edit lognlike wbllike&quot;&lt;br&gt;
&lt;br&gt;
Thanks so much, it works</description>
    </item>
  </channel>
</rss>

