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'.
title 'Cochran-Armitage Test with Permutation Resampling';
2
3
DATA a;
4
INPUT S1 S2 Dose;
5
DATALINES;
6
0 11
7
1 0 1
8
0 11
9
0 11
10
0 11
11
1 0 1
12
1 0 2
13
1 0 2
14
0 12
15
1 0 2
16
0 12
17
1 0 2
18
1 0 3
19
1 0 3
20
1 0 3
21
0 13
22
0 13
23
1 0 3
24
;
25
RUN;
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!
proc multtest data=a permutation nsample=10000 seed=36607 outperm=pmt;
test ca(S1 S2 / permutation=10 uppertailed);
class Dose;
contrast 'CA Linear Trend' 0 1 2;
run;
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!
proc print data=pmt;
run;
1
PROC PRINTDATA=pmt;
2
RUN;
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.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.