Illustrative plots and tables (SAS macro)

Basic SAS macros for basic summary statistics and illustrative plots.

Features ttests, Van der Waerden and Wilcoxon tests for continuous variables and both chisq and Fisher tests for categorical variables.

Overall tests may be based on accumulated measures such as average integrated values, which are interpretable on original scale: %macro averageIntegral(values,timepoints,intlength,retval); &retval=(0 %local count;  %let count=0;  %let time_old=0;  %let val_old=0;  %do %while(%qscan(&values,&count+1,%str( )) ne %str());  %let time=%scan(&timepoints,&count+1,%str( ));   %let val=%scan(&values,&count+1,%str( ));   %if &count GT 0 %then +(&time-&time_old)*(&val_old+&val)/2;  %let time_old=&time;  %let val_old=&val;  %let count=%eval(&count+1);  %end;  )/(&intlength*1.0); %mend;

Table output for continuous data (contrasts between groups are evaluated using t-tests, van der waerden and Wilcoxon)

categorical data table (both chisq and Fishers test are displayed)

T-tests for contrasts, estimates and confidence limits. Inserted box displays result for overall comparison (in this case average integrated NRS score).

The SGPlot Procedure

Macro file download link

0 views0 comments

Recent Posts

See All

SAS University Edition load error solution

Using SAS University Edition with VirtualBox in Fedora requires kernel signing of 3 modules. Avoid this by disabling Secure Boot in BIOS settings. Secure Boot makes it impossible to load nonauthorized