rsquaredacademy / olsrr

Tools for developing OLS regression models
https://olsrr.rsquaredacademy.com/
Other
102 stars 23 forks source link

incorrect semi-partial (part correlations) #43

Closed klh281 closed 6 years ago

klh281 commented 6 years ago

Your part correlations aren't correct. For a model in which y is regressed on x1, x2, and x3; the part correlation for y and x1 in your output is the correlation between y and x1 partialled for x2 and x3 - rather than x1 and y partialted for x2 and x3 as it should be.

aravindhebbali commented 6 years ago

Hi @klh281 .. Can you add an example with the correct part correlations? It would help in testing.

klh281 commented 6 years ago

I am so sorry, in prepping an example, I realized that the function I was comparing it to (spcor.test) uses x = for the dv in the reg model, and y = for the iv in the model, which is opposite to what i expected. Please disregard my comment. Thank you for your great packages.