Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

correlation vs linear model #27

Open
jerlich opened this issue Dec 14, 2020 · 0 comments
Open

correlation vs linear model #27

jerlich opened this issue Dec 14, 2020 · 0 comments

Comments

@jerlich
Copy link

jerlich commented Dec 14, 2020

First, just want to say that i love this! So thanks for the work.

Maybe you can add a little note for the section on correlations:
There is a difference between corr(x,y) and lm(y ~ 1 + x). Correlation is commutative corr(x,y) = corr(y,x) but lm(y ~ 1 + x) ≠ lm(x ~ 1 + y). It's especially relevant when both x and y contain measurement error.

A good reference for this is here:
https://elifesciences.org/articles/00638
The tls package in R provides one option for computing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant