Published on :
Statistical CREATION_INTERNE

Example 1 for PROC MULTTEST

This code is also available in: Deutsch Español Français
Awaiting validation
The script first creates a dataset 'a' representing animals, where S1 and S2 are tumor types and Dose is the treatment group. Then, it uses PROC MULTTEST to perform a one-sided upper Cochran-Armitage test to detect a linear trend in tumor incidence as a function of dose. Statistical significance is evaluated via a permutation method with 10,000 resamples to correct p-values. The permutation results are stored in a 'pmt' dataset which is then displayed.
Data Analysis

Type : CREATION_INTERNE


The data representing animals and tumors are created directly in the script using a DATA step and a 'datalines' statement.

1 Code Block
DATA STEP Data
Explanation :
This block creates the 'a' table in memory. Variables S1 and S2 represent two tumor types (0=absence, 1=presence) and 'Dose' is the grouping variable. Data is integrated directly into the code via 'datalines'.
Copied!
1title 'Cochran-Armitage Test with Permutation Resampling';
2 
3DATA a;
4 INPUT S1 S2 Dose;
5 DATALINES;
60 1 1
71 0 1
80 1 1
90 1 1
100 1 1
111 0 1
121 0 2
131 0 2
140 1 2
151 0 2
160 1 2
171 0 2
181 0 3
191 0 3
201 0 3
210 1 3
220 1 3
231 0 3
24;
25RUN;
2 Code Block
PROC MULTTEST Data
Explanation :
This procedure applies multiple tests to the data in table 'a'. It performs a Cochran-Armitage test (ca) for a linear trend on variables S1 and S2, using 'Dose' as the class variable. Significance is calculated by a permutation method (10,000 samples) to adjust p-values. Permutation results are saved in the 'pmt' table.
Copied!
1PROC MULTTEST DATA=a permutation nsample=10000 seed=36607 outperm=pmt;
2 test ca(S1 S2 / permutation=10 uppertailed);
3 class Dose;
4 contrast 'CA Linear Trend' 0 1 2;
5RUN;
3 Code Block
PROC PRINT
Explanation :
This block displays the content of the 'pmt' table, which was generated by the previous PROC MULTTEST step and contains the permutation results.
Copied!
1PROC PRINT DATA=pmt;
2RUN;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
Copyright Info : S A S S A M P L Y L I B R A R Y