HOW to calculate the regression coefficient and p-value between Y and x, while excluding the effect of other variable?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
For example, I want to calculate the regression coefficient between Y and x, but other variable z have the effect on the relation between Y and x, how to calculate the regression coefficient while removing the effect of z, like the "partial correlation".
0 Kommentare
Antworten (1)
Jeff Miller
am 27 Jan. 2019
There are different ways to do this, depending on what you mean by "removing the effect of z".
One possibility: use regression to predict Y from z, and then find the residuals from this regression (when looking at the residuals, the effect of z on Y has been removed). Now run a second regression predicting the Y residuals from x.
Another possibility: use one regression to predict Y from z and another regression to predict x from z. Then find the residuals from both of these regressions (when looking at the two sets of residuals, the effect of z has been removed from both Y and x). Now run a third regression predicting the Y residuals from the X residuals.
I think the first possibility corresponds to what is usually called semi-partial correlation, and the second corresponds to partial correlation.
HTH
0 Kommentare
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!