Take the 2-minute tour ×
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It's 100% free, no registration required.

R doesn't return the correlation coefficient's variance (or standard error) when coding summary(linmod), linmod being a linear model with one stochastic variable. Wouldn't it be reasonable to first check this variance when reflecting on how reliable linmod is in terms of correlation, even before dealing with, say, the standard error of the slope which is returned by the summary code?

share|improve this question
1  
Why would you want that? What would it tell you that isn't in the summary of linmod? –  Peter Flom Apr 5 at 11:21
1  
I think this should be left open; it's pretty clear what the person is asking; it's not clear why he or she wants to know. –  Peter Flom Apr 5 at 11:28
    
It would allow me to t-test whether r might be 0. –  user3451767 Apr 5 at 13:31
    
So would cor.test(), and the $t$-test of the slope coefficient (same test regardless of whether the variables are standardized). –  Nick Stauner Apr 5 at 21:10
add comment

1 Answer 1

up vote 3 down vote accepted

I don't see what you'd stand to gain by checking the variance of the correlation before the standard error $(SE)$ of the slope. The unstandardized slope estimate's $SE$ just preserves the original scale of the predictor and response variables; it's otherwise equivalent to the $SE$ of the correlation estimate.

You can get the $SE$ of the correlation by standardizing both variables in your linear model (summary(lm(scale(y)~scale(x)))). E.g., with set.seed(1);x=rnorm(9);y=rnorm(9), $SE_{\beta_1}=.36$. Compare to sqrt((1-cor(x,y)^2)/(length(x)-2)).
For another way of getting this from cor.test(), check out How to compute P-value and standard error from correlation analysis of R's cor() on Stack Overflow.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.