<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/264991</link>
    <title>MATLAB Central Newsreader - Important Regression Questions</title>
    <description>Feed for thread: Important Regression Questions</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, 04 Nov 2009 17:13:03 -0500</pubDate>
      <title>Important Regression Questions</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/264991#692119</link>
      <author>Samoline1 Linke</author>
      <description>Hi,&lt;br&gt;
&lt;br&gt;
I have a few confusions about Regression!&lt;br&gt;
&lt;br&gt;
First, I have seen regression can be applied to either 'linear' or 'non linear' models &lt;br&gt;
&lt;br&gt;
BUT!!!&lt;br&gt;
&lt;br&gt;
1 - What is the best criteria to see that the fitted curve or line is the best model e.g. one way could be to compare the values of norm of residuals....is there any other? &lt;br&gt;
&lt;br&gt;
2- when I do regstats (x,y), then it gives me very useful information e.g. value of   R-square etc. but are these values calculated based on a linear model or does it calculate the values fitting the best possible model?&lt;br&gt;
&lt;br&gt;
3- why is it so that for nonlinear, one must have some formula in mind to apply. Is not it possible that I simply input my data and matlab itself decides whats the best fit (non linear).&lt;br&gt;
&lt;br&gt;
Thanks for ur time.</description>
    </item>
    <item>
      <pubDate>Wed, 04 Nov 2009 18:54:02 -0500</pubDate>
      <title>Re: Important Regression Questions</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/264991#692153</link>
      <author>someone </author>
      <description>&quot;Samoline1 Linke&quot; &amp;lt;maganatewoman@yahoo.com&amp;gt; wrote in message &amp;lt;hcscmu$8u9$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I have a few confusions about Regression!&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; First, I have seen regression can be applied to either 'linear' or 'non linear' models &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; BUT!!!&lt;br&gt;
&lt;br&gt;
I'm not an expert, but my experiences are:&lt;br&gt;
&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; 1 - What is the best criteria to see that the fitted curve or line is the best model e.g. one way could be to compare the values of norm of residuals....is there any other? &lt;br&gt;
&lt;br&gt;
Yes, there are many others, but no &quot;best&quot; criteria other than plotting and using your own eyeball to judge which is best given YOUR criteria.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; 2- when I do regstats (x,y), then it gives me very useful information e.g. value of   R-square etc. but are these values calculated based on a linear model or does it calculate the values fitting the best possible model?&lt;br&gt;
&lt;br&gt;
I believe it calculates the values based on the model YOU supplied.&lt;br&gt;
(There is no a-priori &quot;best possible model&quot; under ALL circumstances.&lt;br&gt;
&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; 3- why is it so that for nonlinear, one must have some formula in mind to apply. Is not it possible that I simply input my data and matlab itself decides whats the best fit (non linear).&lt;br&gt;
&lt;br&gt;
No, I don't believe it is possible.&lt;br&gt;
There are an infinite number of nonlinear models that can be applied.&lt;br&gt;
How can MATLAB try all the infinite possibilities?&lt;br&gt;
&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks for ur time.</description>
    </item>
    <item>
      <pubDate>Thu, 05 Nov 2009 11:47:01 -0500</pubDate>
      <title>Re: Important Regression Questions</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/264991#692354</link>
      <author>Samoline1 Linke</author>
      <description>&quot;someone&quot; &amp;lt;someone@somewhere.net&amp;gt; wrote in message &amp;lt;hcsika$kc3$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Samoline1 Linke&quot; &amp;lt;maganatewoman@yahoo.com&amp;gt; wrote in message &amp;lt;hcscmu$8u9$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Hi,&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; I have a few confusions about Regression!&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; First, I have seen regression can be applied to either 'linear' or 'non linear' models &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; BUT!!!&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I'm not an expert, but my experiences are:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; 1 - What is the best criteria to see that the fitted curve or line is the best model e.g. one way could be to compare the values of norm of residuals....is there any other? &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Yes, there are many others, but no &quot;best&quot; criteria other than plotting and using your own eyeball to judge which is best given YOUR criteria.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; 2- when I do regstats (x,y), then it gives me very useful information e.g. value of   R-square etc. but are these values calculated based on a linear model or does it calculate the values fitting the best possible model?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I believe it calculates the values based on the model YOU supplied.&lt;br&gt;
&amp;gt; (There is no a-priori &quot;best possible model&quot; under ALL circumstances.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; 3- why is it so that for nonlinear, one must have some formula in mind to apply. Is not it possible that I simply input my data and matlab itself decides whats the best fit (non linear).&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; No, I don't believe it is possible.&lt;br&gt;
&amp;gt; There are an infinite number of nonlinear models that can be applied.&lt;br&gt;
&amp;gt; How can MATLAB try all the infinite possibilities?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Thanks for ur time.&lt;br&gt;
&lt;br&gt;
-------------&lt;br&gt;
&lt;br&gt;
I have checked for regstats and have seen that it calculates the values based on the model. But one can not make it to calculate the values for a cubic or 5th degree polynomial fitting.&lt;br&gt;
&lt;br&gt;
Could someone please confirm?</description>
    </item>
    <item>
      <pubDate>Thu, 05 Nov 2009 15:10:17 -0500</pubDate>
      <title>Re: Important Regression Questions</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/264991#692424</link>
      <author>Tom Lane</author>
      <description>&amp;gt; I have checked for regstats and have seen that it calculates the values &lt;br&gt;
&amp;gt; based on the model. But one can not make it to calculate the values for a &lt;br&gt;
&amp;gt; cubic or 5th degree polynomial fitting.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Could someone please confirm?&lt;br&gt;
&lt;br&gt;
The polyfit function would be easier for this:&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; load census&lt;br&gt;
&amp;gt;&amp;gt; x = (cdate-mean(cdate))/100;&lt;br&gt;
&amp;gt;&amp;gt; p = polyfit(x,pop,5)&lt;br&gt;
p =&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;6.3901    4.7543   -3.8481   60.9626  120.8211   62.2285&lt;br&gt;
&lt;br&gt;
But it is possible to use regstats for this by specifying the model as a &lt;br&gt;
vector of powers of the x variable:&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; regstats(pop,x,(0:5)','beta')&lt;br&gt;
ans =&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;source: 'regstats'&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;beta: [6x1 double]&lt;br&gt;
&amp;gt;&amp;gt; ans.beta&lt;br&gt;
ans =&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;62.2285&lt;br&gt;
&amp;nbsp;&amp;nbsp;120.8211&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;60.9626&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;-3.8481&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;4.7543&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;6.3901&lt;br&gt;
&lt;br&gt;
-- Tom </description>
    </item>
  </channel>
</rss>

