Date: Sat, 16 Dec 2006 16:03:28 -0000
Reply-To: Ian Wakeling <ian.wakeling@HANANI.QISTATS.CO.UK>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Ian Wakeling <ian.wakeling@HANANI.QISTATS.CO.UK>
Subject: Re: Jacknife regressions
Content-Type: text/plain; format=flowed; charset="Windows-1252";
reply-type=original
Marina,
What happens if you use my code as I originally posted it?
I still think it gives you exactly the prediction that you want.
The on-line documentation for the PRESS output statistic is
misleading and it may be the reason David advised the amendent
to my code.
If you run something like.
proc reg data=test;
model y=z x;
output out=regout p=yhat1 r=res1 h=lever press=r_omited;
run;
quit;
data regout;
set regout;
res2=r_omited*(1-lever);
yhat2=y-res2;
run;
you should see that res2 and yhat2 are identical to
res2 and yhat1 from the regression using all the cases.
If you take the ith residual r(i) from the regression with
all the data and divide by (1-lever(i)), this is in fact exactly
what PRESS gives you, it's a remarkable fact that this is
also identical to the residual you get from fitting a model
without the ith case. If you want to check this for yourself,
look for a textbook that discusses updating formula for a
matrix inverse in the context of regression. So if all you
want are these "prediction residuals" then there is an elegant
mathematical shortcut.
Ian.
----- Original Message -----
From: "Marina Kekrou" <mkekrou@YAHOO.CO.UK>
To: <SAS-L@LISTSERV.UGA.EDU>
Sent: Saturday, December 16, 2006 11:39 AM
Subject: Re: Jacknife regressions
> David and Ian,
>
> Thanks so much for your help.
>
> I have compared Ian's (amended by David) code to the macro and the
> predicted values I get differ. So I am not really sure what's going on
> here. I have to look into it a bit further.
>
> Marina
>