Published on :
Statistical CREATION_INTERNE

Peto's Mortality and Prevalence Test with PROC MULTTEST

This code is also available in: Español Français
Awaiting validation
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'.
Copied!
1DATA a;
2 INPUT S1-S3 T Dose @code_sas_json/8_SAS_Intro_ReadFile_MultiCol_@@.json;
3 IF T<=90 THEN B=1; ELSE B=2;
4 DATALINES;
50 0 0 104 0 2 0 1 80 0 0 0 1 104 0
60 0 0 104 0 0 2 0 100 0 1 0 0 104 0
72 0 0 85 1 2 1 0 60 1 0 1 0 89 1
82 0 1 96 1 0 0 0 96 1 2 0 1 99 1
92 1 1 60 2 2 0 0 50 2 2 0 1 80 2
100 0 2 98 2 0 0 1 99 2 2 1 1 50 2
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.
Copied!
1PROC MULTTEST DATA=a notables out=p stepsid;
2 test peto(S1-S3 / permutation=20 time=T uppertailed);
3 class Dose;
4 strata B;
5 contrast 'mort-prev' 0 1 2;
6RUN;
3 Code Block
PROC PRINT
Explanation :
Display of the contents of output table 'p' containing statistical results (p-values).
Copied!
1PROC PRINT DATA=p;
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 : SAS SAMPLE LIBRARY - NAME: MULTEX3