The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: regstats - How to understand tstat.pval
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  

Posts: 6
Registered: 4/3/12
regstats - How to understand tstat.pval
Posted: Sep 24, 2013 11:02 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi guys,
I have 2 vectors and I want to check whether there is some correlation between the:
1st value of the 1st vector vs 1st value of the 2nd vector,
2nd value of the 1st vector vs 2nd value of the 2nd vector,
3rd value of the 1st vector vs 3rd value of the 2nd vector,
etc etc.....

I am not sure if I am doing properly, but I am using the function: regstats in order to see if there is correlation or not.
In particular I get the Rsquare and the Pvalue. The problem is that the Pvalue contains 2 values.... and I don't know what do this values come from.
Could someone help me? Thank you!

taking 2 vectors:
a = [1 2 3 4 5 ];
b = [2 4 6 8 10];
regstats([1 2 3 4 5 ],[2 4 6 8 10])

I get:
pval = 1;

Rsquare = 1

Ok about the Rsquare!
But how about the pval? Why 2 values? I was expected to have pval =0. wasn't it?

Thank you

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.