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:
R values

Subject: R values

From: J G

Date: 7 Apr, 2011 06:15:06

Message: 1 of 2

This is probably a stupid question, but...
I want to use a pairwise linear correlation test to get Pearson’s correlation coefficient (R values) and a 1% critical value for the sample size.
Is this the output that I get when I use: [RHO,PVAL] = corr(data) ?

Subject: R values

From: Wayne King

Date: 7 Apr, 2011 09:37:04

Message: 2 of 2

"J G" wrote in message <injkp9$t3d$1@fred.mathworks.com>...
> This is probably a stupid question, but...
> I want to use a pairwise linear correlation test to get Pearson’s correlation coefficient (R values) and a 1% critical value for the sample size.
> Is this the output that I get when I use: [RHO,PVAL] = corr(data) ?

Yes, you can. corr() returns the p-value so you can choose to accept only those r values with p-values less than 0.01 as significantly different from zero. Use the optional 'tail' parameter to specify a one-tailed vs two-tailed test.

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