Path: news.mathworks.com!not-for-mail
From: Peter Perkins <Peter.PerkinsRemoveThis@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Linear regression.
Date: Fri, 14 Mar 2008 09:13:13 -0400
Organization: The MathWorks, Inc.
Lines: 24
Message-ID: <frdtl9$p9o$1@fred.mathworks.com>
References: <fr9c9t$o1p$1@news.onet.pl> <frb897$m3l$1@fred.mathworks.com> <frbraa$3r1$1@news.onet.pl> <frbvdg$7t7$1@fred.mathworks.com> <frc046$k3v$1@fred.mathworks.com>
NNTP-Posting-Host: perkinsp.dhcp.mathworks.com
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: fred.mathworks.com 1205500393 25912 172.31.57.88 (14 Mar 2008 13:13:13 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 14 Mar 2008 13:13:13 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.12 (Windows/20080213)
In-Reply-To: <frc046$k3v$1@fred.mathworks.com>
Xref: news.mathworks.com comp.soft-sys.matlab:457235



Yuri Geshelin wrote:

> Here is what Zebbik wrote:
> 
> "The Slope Error is the thing i am looking for in MATLAB."
> 
> Does lscov or polyconf accomplish this task?

Yuri, "yes" to LSCOV (depending on what is meant by "error"), but you're 
right, my suggestion of polyconf was off track; I I wasn't paying enough 
attention.

Zebbik, if by "error", you mean a standard error, then LSCOV will give 
you that as its second output.

If you want a confidence interval for the coefficient, then REGRESS in 
the Statistics Toolbox (as pointed out by Arthur G) returns that as its 
second output.

In both cases, all you have to do is to create the design matrix X as

    X = [ones(length(x),1) x(:)]

where x and y are vectors containing your data.