CR Toolkit™ Overview

Displaying P-values on CR Toolkit Tables

The CR Toolkit™ supports display of statistical results from procedures controlled entirely by programmers. Any statistical method may be used. Results in the form of p-values are delivered to the CR Toolkit in the form of a SAS dataset that is referenced in the statdata parameter. The dataset must contain sufficient information for the CR Toolkit to be able to associate p-values with the appropriate table rows. Each CR Toolkit module has specific requirements for the dataset, these are documented in the User Manual. The code below demonstrates preparation of a statistical results dataset for use with the DEMOG macro. This dataset is subsequently used in DEMOG Example 2.

*calculate fishers exact for race, ods output to capture pvalues in _fexact dataset;
ods output fishersexact=_fexact;
proc freq data=demo0;
	tables race*dose/ exact missing;
run;

*set up DEMOG stats dataset structure;
data _fexact;set _fexact;
	length parameter $32 param_type $3;
	where upcase(name1) ="XP2_FISH";
	pval1=nvalue1;
	parameter="RACE";
	param_type="cat";
run;

*calculate Kruskal-Wallis for age, ods output to capture pvalues in _cmh dataset;
ods output CMH =_cmh;
proc freq data=demo0;
	tables age*dose /cmh scores=rank missing;
run;

*set up DEMOG stats dataset structure;
data _cmh;set _cmh;
	length parameter $32 param_type $3;
	where upcase(althypothesis)="ROW MEAN SCORES DIFFER";
	pval1=prob;
	parameter="AGE";
	param_type="con";
run;

*combine stats for age and sex;
	data _statsin;
	set _fexact _cmh;
	keep pval1 parameter param_type;
	label pval1 = 'P-Value*';
	format pval1 disp_pv.;
run;