LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (December 2006, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sat, 16 Dec 2006 04:39:01 -0500
Reply-To:     Marina Kekrou <mkekrou@YAHOO.CO.UK>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Marina Kekrou <mkekrou@YAHOO.CO.UK>
Subject:      Re: Jacknife macro

Ian,

Thanks for this. As I noted in a previous email I am want to get out of sample prediction for observation i without including this observation. Is this equivalent to what you are suggesting? What is the difference then between that and jacknife?

thanks marina

On Fri, 15 Dec 2006 16:59:19 -0000, Ian Wakeling <ian.wakeling@HANANI.QISTATS.CO.UK> wrote:

>Marina, > >Check out the documentation for the output statement >in proc reg. > >If all you want are the predictions when cases are left >out of the regression then there is no need to run your >macro at all. > >Just do something like > >PROC REG data=test; > MODEL y = x z; > output out=regout p=ypred press=r_omited; >RUN ; >quit; > >p=ypred gives you the normal predictions in the >output data set called regout. press=r_omited gives you >the residual without the current observation. To work >back to the prediction without the current observation >run a simple datastep after the PROC REG > >data regout; > set regout; > jkpred=y-r_omited; >run; > >Ian. > > >----- Original Message ----- >From: "Marina Kekrou" <mkekrou@YAHOO.CO.UK> >To: <SAS-L@LISTSERV.UGA.EDU> >Sent: Friday, December 15, 2006 3:58 PM >Subject: Jacknife macro > > >> Any ideas on how i can modify this code to get predicted values when >> running prog reg? >> >> thanks >> >> %MACRO JackReg ; >> %DO I = 1 %TO &ncases ; >> DATA temp&I ; >> SET one; >> IF _N_ NE &I ; >> RUN; >> >> PROC REG outest =loopIest; >> Omits&I: MODEL y = x z; >> *Specify your model in the line above; >> RUN ; >> >> PROC APPEND BASE = RegEsts NEW = loopIest ; >> RUN ; >> >> %END ; >> %MEND JackReg; >> *Macro portion of program ends here; >> >> %JackReg; >>


Back to: Top of message | Previous page | Main SAS-L page