MATLAB: Where is the t statistic reported for [R,P]=corrcoef(…)

corrcoefdocumentation of t statisticp-valuet-statistic

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.

Best Answer

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.