University of Rochester Medical Center
SearchDirectoryNewsEventsStrong HealthURMC Home
 

SAS Helpful Hints

Biostat Macro Library

Kruskal-Wallis

%KrusWall resides in the departments SAS Macro Library and is enabled with the following SAS statements:

Libname biostat '\\BIO2\example\SASMacrosWindows';
Options Mstored SasMstore=biostat;

%KrusWall calls PROC NPAR1WAY to run the Kruskal-Wallis test on a list of dependent variables at each visit in the specified database. The output has been modified to include the Mean, Median, Quartiles, Standard Deviation and Standard Error.

Syntax:
%KrusWall(dataset,group,visit,varlist);
    dataset:    Dataset to use.
    group:      Class or treatment variable.(Numeric)
    visit:         Time variable: visit, week, month.(Numeric)
    varlist:      List of dependent variables.(Numeric)

Example:
%KrusWall(work.A,Treatment,Week,A B C D);

Several styles of HTML output can be requested by defining a macro variable named "HtmlStyle" before calling the procedure:

%Let HtmlStyle=URbw1;

Available styles include: URbw1, URpp1, BarrettsBlue, Beige, Brick, Brown, D3D, Default, Minimal, NoFontDefault, Printer, RTF, Statdoc, Theme, FancyPrinter, SansPrinter, SasdocPrinter and SerifPrinter.

The HTML output may be directed to a file by defining a macro variable named "HtmlFile" before calling the procedure:

%Let HtmlFile=c:/test.html;

The size of the text in the HTML output may be changed by defining a macro variable named "HtmlSize" before calling the procedure:

%Let HtmlSize=-1; *or;
%Let HtmlSize=+1;

Output:

 

Please send your comments and suggestions about this web page to A. Watts (watts@bst.rochester.edu)