Date: Sep 24, 2013 11:02 AM
Subject: regstats - How to understand tstat.pval
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,
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])
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?