O'Reilly logo

Adaptive Tests of Significance Using Permutations of Residuals with R and SAS by Thomas W. O'Gorman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

APPENDIX B

SAS MACRO FOR ADAPTIVE TESTS

/* Notes:

  1. The variables that are used in the macro call are:

    images

    images

  2. No missing values are allowed in the dependent variables, independent variables, or blocking variables.
  3. If variables are formatted, then the formats will need to be placed before the macro.
  4. The number of observations must not exceed 10000.
  5. 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required