Macro bootstrap help

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

Macro bootstrap help

Hi can anyone tell me what is wrong with this macro? It always shows error:Apparent invocation of macro BOOT not resolved.  Statement is not valid or it is used out of proper order. Thank you!!

%include data(gaap);

title 'Bootstrap robust regression';

%macro robreg (data=, out=);

ods listing close;

proc robustreg data=&data outest=&out(drop=OI);

model OI=X Y X*Y ;

%bystmt;

*-- analyze BY _sample_;

run;

ods listing;

%mend;

%boot(data=gaap, random=123, stat=X Y X*Y, analyze=robreg);

%bootci(stat=X Y X*Y, method=pctl);


Accepted Solutions
Solution
‎03-14-2014 06:48 PM
Super User
Posts: 10,473

Re: Macro bootstrap help

The line

%boot(data=gaap, random=123, stat=X Y X*Y, analyze=robreg);

Calls the macro %boot. If it has not been compiled in the current session and is not in a location referenced by the SAS option SASAUTOS with the option MAUTOSOURCE set then you get this type of error.

You need to compile that macro and likely your BOOTCI macro as well before calling them.

View solution in original post


All Replies
Solution
‎03-14-2014 06:48 PM
Super User
Posts: 10,473

Re: Macro bootstrap help

The line

%boot(data=gaap, random=123, stat=X Y X*Y, analyze=robreg);

Calls the macro %boot. If it has not been compiled in the current session and is not in a location referenced by the SAS option SASAUTOS with the option MAUTOSOURCE set then you get this type of error.

You need to compile that macro and likely your BOOTCI macro as well before calling them.

SAS Super FREQ
Posts: 3,475

Re: Macro bootstrap help

For an example, see 24982 - Jackknife and Bootstrap Analyses. (Click the "Results" tab.)  As Ballardw says, you need to %INCLUDE the source code for the %boot and %bootci macros.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 220 views
  • 0 likes
  • 3 in conversation