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!
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
-------------------------------------------------
ie
/SAVE Resid.
Ivo
"Jonathan Fry" <j...@spss.com> wrote in message
news:3B4DB3E6...@spss.com...