Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
'alpha' in corrcoef

Subject: 'alpha' in corrcoef

From: J G

Date: 7 Apr, 2011 08:25:05

Message: 1 of 2

I'm using corrcoef and I want a 1% critical value so I think I need to use 'alpha' and specify it as 0.01.
It says that the default is 0.05 however when I set this to 0.01:
[r,p] = corrcoef(data,'alpha',0.01)
the p-values did not change from when I just used:
[r,p] = corrcoef(data)
Is this code correct or am I doing something wrong?

Subject: 'alpha' in corrcoef

From: Wayne King

Date: 7 Apr, 2011 09:33:05

Message: 2 of 2

"J G" wrote in message <injsd1$4fh$1@fred.mathworks.com>...
> I'm using corrcoef and I want a 1% critical value so I think I need to use 'alpha' and specify it as 0.01.
> It says that the default is 0.05 however when I set this to 0.01:
> [r,p] = corrcoef(data,'alpha',0.01)
> the p-values did not change from when I just used:
> [r,p] = corrcoef(data)
> Is this code correct or am I doing something wrong?

Hi JG, the alpha value does not affect the computation of the p-value. The alpha value is used to determine what confidence interval you want to specify around your estimated correlation coefficients.

The matrices specifying the upper and lower confidence intervals respectively are optional output arguments. Use the following syntax to obtain them:

[r,p,rLO,rUP]=corrcoef(...,'alpha',0.01);

If you look at the confidence intervals, they will change as you vary alpha.

Hope that helps,
Wayne

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us