Where is the t statistic reported for [R,P]=corrcoef(...)?

3 views (last 30 days)
Hi. From the Matlab help I know that for [R,P]=corrcoef(...) the p-value is calculated on the basis of the t statistic: "The p-value is computed by transforming the correlation to create a t statistic having n-2 degrees of freedom, where n is the number of rows of X." Does anyone know if there is a possibility to access the t statistic? For instance the regress function for multiple linear regression reports the f statistc in 'stats'. I am looking for something like that.
Thanks.

Accepted Answer

Tom Lane
Tom Lane on 1 Jun 2012
If you are comfortable editing the corrcoef.m file, you can add Tstat as an additional output. This variable is computed inside the file but not returned.
Another alternative is to see how Tstat is computed and do that yourself outside the corrcoef.m file.

More Answers (0)

Categories

Find more on Descriptive Statistics in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!