Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Old bug in corrcoef not yet fixed
Date: Thu, 8 Jan 2009 02:14:02 +0000 (UTC)
Organization: The MathWorks Inc
Lines: 37
Message-ID: <gk3nha$479$1@fred.mathworks.com>
References: <gk3k0q$hko$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 1231380842 4329 172.30.248.37 (8 Jan 2009 02:14:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 8 Jan 2009 02:14:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869871
Xref: news.mathworks.com comp.soft-sys.matlab:510340

"Pasco Alquim" <pasquimm@yahoo.com> wrote in message <gk3k0q$hko$1@fred.mathworks.com>...
> Help info of corrcoef says that
> 
> % 'alpha' A number between 0 and 1 to specify a confidence
> % level of 100*(1-ALPHA)%. Default is 0.05 for 95%
> % confidence intervals.
> 
> However, the 'alpha' value is simply ignored (as far back as in R13)
> e.g
> Sorry for the repetition but I forgot one very important thin in the subject - the BUG word
> 
> xy = rand(10,2);
> [r,p]=corrcoef(xy)
> 
> r =
>     1.0000 0.3724
>     0.3724 1.0000
> p =
> 
>     1.0000 0.2892
>     0.2892 1.0000
> 
> 
> [r,p]=corrcoef(xy,'alpha',0.5);
> r =
>     1.0000 0.3724
>     0.3724 1.0000
> p =
>     1.0000 0.2892
>     0.2892 1.0000

I believe you need to compare the 3rd and 4th output argument:

[r,p,rlo,rup]=corrcoef(xy)

[r,p,rlo,rup]=corrcoef(xy,'alpha',0.5)