Professional Documents
Culture Documents
Trivariate Regression by Hand: R R R R
Trivariate Regression by Hand: R R R R
It is not totally unreasonable to conduct a multiple regression analysis by hand, as long as you
have only two predictor variables. Consider the analysis we did in PSYC 6430 (with the program
CorrRegr.sas) predicting attitudes towards animals (AR) from idealism and misanthropy. SAS gave
us the following univariate and bivariate statistics:
Variable N Mean Std Dev Sum Minimum Maximum
ar ideal misanth
Let us first obtain the beta weights for a standardized regression equation, Zˆ y 1Z1 2Z2
Look at the numerator of the ratio above. In computing the partial standardized slope for
predicting Y from X1, we remove from the standardized slope for predicting Y from X1 ignoring X2 (ry1)
the overlap among Y, X1, and X2 (-ry2r12).
i sy
bi a Y bX i
si
.0856(.535) .2326(.535)
b1 .086 b2 .185
.53278 .67346
The Multiple R2
Copyright 2014, Karl L. Wuensch - All rights reserved.
MultReg-ByHand.docx
2
r r
2 2
2r y 1r y 2 r12
.05312 .22064 2(.05312)(.22064)( 0.13975)
2 2
R y212 .0559
y1 y2
1 r 2
12 1 .13975 2
Look at the numerator above. We sum the portion of variance in Y that is explained by X 1
ignoring X2 (ry1) and the portion of variance in Y that is explained by X2 ignoring X1 (ry2) and then we
remove from that the portion of variance that has been counted twice.
Semipartials
ry 1 ry 2r12 r y 2 r y 1r12
sr1 sr2 (but easier to do by method below)
1 r122 1 r122
Partials
sr1 sr2
pr1 pr2
1 r 2
y2 1 r y21
sri 2
pri 2 for p 2
1 R y212...(i )...p
Testing the null that in the population I = 0 is absolutely equivalent to testing the null that the
semipartial or partial correlation coefficient is 0.
1 R y212 1
SE 1
N p 1 1 r122
H0: Pop. = 0 t df = N - p - 1 (but easier to get with next formula)
SE
N p 1
H0: Pop. sr = 0 t sr df = N - p - 1
1 R 2
3
154 2 1 154 2 1
t1 .085 1.07 t2 .230 2.91 df = 151
1 .0559 1 .0559
Shrunked (Adjusted) R2
(1 R 2 )(N 1) (1 .0559)(153)
shrunken R 1
2
1 .043
N p 1 151
Please re-read this document about shrunken R2.
Source SS df MS F p
Regression R2SSY p
Error (1-R2)SSY n-p-1
Total SSY n-1
It is possible to get the value of F without computing the Mean Squares. Just use this formula:
R n p 1
2
.0559153 2 1
F . For our data, F 4.47 . Do note that even small rounding
p 1 R 2
21 .0559
errors in the computation of R2 can have noticeable effects on the value of F here, so obtain the R2
with several decimal point precision.