3
$\begingroup$

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?

$\endgroup$
  • 1
    $\begingroup$ Why would you want that? What would it tell you that isn't in the summary of linmod? $\endgroup$ – Peter Flom Apr 5 '14 at 11:21
  • 1
    $\begingroup$ 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. $\endgroup$ – Peter Flom Apr 5 '14 at 11:28
  • $\begingroup$ It would allow me to t-test whether r might be 0. $\endgroup$ – Clyde Frog Apr 5 '14 at 13:31
  • $\begingroup$ So would cor.test(), and the $t$-test of the slope coefficient (same test regardless of whether the variables are standardized). $\endgroup$ – Nick Stauner Apr 5 '14 at 21:10
3
$\begingroup$

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.

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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