<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/156775</link>
    <title>MATLAB Central Newsreader - fitting Beta CDF</title>
    <description>Feed for thread: fitting Beta CDF</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>Wed, 26 Sep 2007 17:09:26 -0400</pubDate>
      <title>fitting Beta CDF</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/156775#394069</link>
      <author>Pete sherer</author>
      <description>Hi,&lt;br&gt;
&lt;br&gt;
Are there any function similar to glmfit but for fitting the&lt;br&gt;
Beta or Gamma CDF.&lt;br&gt;
&lt;br&gt;
For example, I have the empirical CDF that I would like to&lt;br&gt;
fit the Beta or Gamma CDF to.&lt;br&gt;
&lt;br&gt;
x = 0:0.1:1.0;&lt;br&gt;
data = [0.001;0.02;0.15;0.2;0.3;0.45;0.7;0.82;0.9;0.95;0.98;];&lt;br&gt;
&lt;br&gt;
Thank you very much for your help.</description>
    </item>
    <item>
      <pubDate>Wed, 26 Sep 2007 17:39:05 -0400</pubDate>
      <title>Re: fitting Beta CDF</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/156775#394078</link>
      <author>Tom Lane</author>
      <description>&amp;gt; Are there any function similar to glmfit but for fitting the&lt;br&gt;
&amp;gt; Beta or Gamma CDF.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; For example, I have the empirical CDF that I would like to&lt;br&gt;
&amp;gt; fit the Beta or Gamma CDF to.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; x = 0:0.1:1.0;&lt;br&gt;
&amp;gt; data = [0.001;0.02;0.15;0.2;0.3;0.45;0.7;0.82;0.9;0.95;0.98;];&lt;br&gt;
&lt;br&gt;
Pete, this can be taken different ways.&lt;br&gt;
&lt;br&gt;
1.  If you just want to fit a nonlinear function of x to data by least &lt;br&gt;
squares:&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; x=x';&lt;br&gt;
&amp;gt;&amp;gt; p=nlinfit(x,data,@(b,x)betacdf(x,b(1),b(2)),[1 1])&lt;br&gt;
p =&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2.2548    2.2327&lt;br&gt;
&amp;gt;&amp;gt; plot(x,data,'bo',x,betacdf(x,p(1),p(2)),'r-')&lt;br&gt;
&lt;br&gt;
2.  If data represents the empirical cumulative distribution of a sample y, &lt;br&gt;
do you have y?  Then you could use betafit on y.&lt;br&gt;
&lt;br&gt;
3.  If data represents a binomial response for different values of a &lt;br&gt;
stimulus x, then you could use glmfit.  If data is y./N then you'd need both &lt;br&gt;
y and N.  You could use the 'link' argument to specify a beta cdf as the &lt;br&gt;
link function.&lt;br&gt;
&lt;br&gt;
-- Tom </description>
    </item>
  </channel>
</rss>

