APPENDIX B
SAS MACRO FOR ADAPTIVE TESTS
/* Notes:
- The variables that are used in the macro call are:
- No missing values are allowed in the dependent variables, independent variables, or blocking variables.
- If variables are formatted, then the formats will need to be placed before the macro.
- The number of observations must not exceed 10000.
- The number of dependent variables must not exceed 20.
*/ options nocenter linesize=80 nonotes ; %macro adaptall(dataset=, y=, nvars=l, xr=, classr=, xa=, classa=, blkvars=, ici=0, iestimat=0, iequalwt=0, seedl=1492, seed2=314, seed3=2718, nperm=2000, short=0); data _null_; /* The code in this data step is used to obtain a list of the variables in the keep list by deleting the interaction (*) characters. */ cxr=symget(‘xr’); listxr = translate(cxr,‘ ‘,’*| ()’); call symput(‘mlistxr’,listxr); cxa=symget(‘ xa’ ) ; listxa = translate(cxa,‘ ‘,’*1 O’); call symput(‘mlistxa’, listxa) ; data awlsdata(keep= &y &mlistxr &mlistxa); retain n 0; set &dataset; n=n+l; call symput(‘nobs’,left (n)); output awlsdata; proc glm data=awlsdata %if &short ne 0 %then noprint; ; classes &classr &classa; model &y=&xr &xa ; %if &nvars ne 1 %then manova h=&xa / printe printh;; title2 ‘ traditional analysis -- no adaptation’; /* Now begin adaptive analysis */ proc glm ...
Get Adaptive Tests of Significance Using Permutations of Residuals with R and SAS now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.