This script creates a dataset simulating animal observations (tumor types, dose, time of death). It derives a stratification variable (B) based on the time of death (T). Then, the MULTTEST procedure is used to perform a one-sided (uppertailed) Peto test with 20 permutations, stratifying by B and analyzing the effect of dose through a linear contrast.
Data Analysis
Type : CREATION_INTERNE
Data is defined directly in the script via DATALINES (table 'a') and uses the continuous reading format ( @code_sas_json/8_SAS_Intro_ReadFile_MultiCol_@@.json).
1 Code Block
DATA STEP Data
Explanation : Creation of table 'a' from internal data. The INPUT statement uses ' @@' to read multiple observations on the same physical line. A stratification variable 'B' is conditionally calculated based on the value of 'T'.
INPUT S1-S3 T Dose @code_sas_json/8_SAS_Intro_ReadFile_MultiCol_@@.json;
3
IF T<=90THEN B=1; ELSE B=2;
4
DATALINES;
5
0 0 0 104 0 2 0 180 0 0 0 1104 0
6
0 0 0 104 0 0 2 0 100 0 1 0 0 104 0
7
2 0 0 85121 0 601 0 1 0 891
8
2 0 1961 0 0 0 9612 0 1991
9
2116022 0 0 5022 0 1802
10
0 0 2982 0 0 1992211502
11
;
2 Code Block
PROC MULTTEST Data
Explanation : Execution of the MULTTEST procedure to calculate adjusted probabilities. The 'peto' test is specified for variables S1 to S3, taking into account time T and using permutations. The 'out=p' option saves the results.
test peto(S1-S3 / permutation=20 time=T uppertailed);
3
class Dose;
4
strata B;
5
contrast 'mort-prev' 0 12;
6
RUN;
3 Code Block
PROC PRINT
Explanation : Display of the contents of output table 'p' containing statistical results (p-values).
Copied!
proc print data=p;
run;
1
PROC PRINTDATA=p;
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.
Copyright Info : SAS SAMPLE LIBRARY - NAME: MULTEX3
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.