Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Partial Regression Plot

230 views
Skip to first unread message

Yuui

unread,
Jul 10, 2001, 3:03:35 PM7/10/01
to
When doing a multiple linear regression analysis, one can add some
subcommands to this procedure.
One subcommand is {/partial plot}.

It is easy to do that. But, when I want to construct this plot myself (i.e.
without the subcommand), I will get a different plot.

For those of you who don´t have a manual, here is what a partial regression
plot is:
"For the j-th independent variable, it is obtained by calculating the
residuals for the dependent variable when it is predicted from all the
independent variables excluding the j-th and by calculating the residuals
for the j-th independent variable when it is predicted from all of the other
independent variables." (page 351 of manual 6.0 Base system).

Example:
Regression model: y = c + a1*x1 + a2*x2 + a3*x3 + a4*x4.
(so y is the dependent variable and x1,x2,x3,x4 are the independent
variables)
I want a partial regression plot for variable x2.

First I calculate the residuals for the dependent variable (yresid =
ypred-y). Where ypred are the predicted values of y using regression:
****
regression
/noorigin
/dependent y
/method=ENTER x1 x3 x4
/save pred(ypred).
compute yresid=ypred-y.
***

Then I calculate the residuals for x2 (x2resid = x2pred-x2). Where x2pred
are the predicted values of x2 using regression.
***
regression
/noorigin
/dependent x2
/method=ENTER x1 x3 x4
/save pred(x2pred).
compute x2resid=x2pred-x2.
***

And finally do the plot:
graph
/scatterplot(bivar)=x2resid WITH yresid
/missing=listwise.

***************

Comparing the plot I constructed above, with the plot one would directly
obtain using the subcommand {/partial plot},
I see that yresid has been correctly calculated, but x2resid hasn´t. Can
anyone help me by telling me what is wrong in
my calculation of x2resid?


THANKS!


Jonathan Fry

unread,
Jul 12, 2001, 10:27:50 AM7/12/01
to
Might there be any cases that are missing on Y but not on X2, or missing on X2
but not on Y? You can select a subset of the data that has no missing values on
any relevant variable for testing using

select if nmiss(y, x1, x2, x3, x4) = 0.

If you see a difference using such a data set and a current version of SPSS,
please let us know.

Jonathan Fry
SPSS Inc.
SPSS questions to sup...@spss.com
-------------------------------------------------

Ken Reed

unread,
Jul 14, 2001, 9:55:58 PM7/14/01
to
Did you try it with SPSS saving the residuals directly, rather than using
COMPUTE?

ie
/SAVE Resid.

Yuui

unread,
Jul 15, 2001, 4:59:03 PM7/15/01
to
Hi Jonathan and Ken.
I got a bit stressy about this topic, so I dropped it.
Maybe you were right (there could be missing values or I could have saved
the residuals directly).
I will certainly keep this in mind. Thanks for the help!

Ivo


"Jonathan Fry" <j...@spss.com> wrote in message
news:3B4DB3E6...@spss.com...

0 new messages