Dear SAS community,
I have to assess the effect modification of a list of a list of approximately 350 potential effect modifiers (var1, var2.....var350) using a fine and gray competing risk survival model.
proc phreg data=survival ev plots(overlay=stratum)=cif out=estimates; model timedeath*death(0)= treat1 var1 treat1*var1 /alpha=0.05 RL rl ties=efron eventcode=1; ods output parameterestimates=ph_1; run;
proc phreg data=survival ev plots(overlay=stratum)=cif out=estimates; model timedeath*death(0)= treat1 var2 treat1*var2 /alpha=0.05 RL rl ties=efron eventcode=1; ods output parameterestimates=ph_2; run;
proc phreg data=survival ev plots(overlay=stratum)=cif out=estimates; model timedeath*death(0)= treat1 var3 treat1*var3 /alpha=0.05 RL rl ties=efron eventcode=1; ods output parameterestimates=ph_3; run;
........
proc phreg data=survival ev plots(overlay=stratum)=cif out=estimates; model timedeath*death(0)= treat1 var350 treat1*var350 /alpha=0.05 RL rl ties=efron eventcode=1; ods output parameterestimates=ph_350; run;
Would like to then organize the results into a sheet like this
parameter
DF
Estimate
StdErr
ChiSq
ProbChiSq
treat1*var1
1
0.012758892
0.054939925
0.053932405
0.816356649
treat1*var2
1
-0.904010573
0.620378183
2.12341063
0.145063189
treat1*var3
1
-14.43657849
0.733645689
387.2182456
3.33791E-86
....
....
treat1*var350
1
-1.282612357
0.69818998
3.374765614
0.066201996
to complicate matters, I have to consider t types of treatments (treat1, treat2, treat3, treat4, and treat5).
Other than timedeath*death, I also have to consider several other clinical outcomes:
1. timeAMI*AMI
2. timehearttransplant*hearttransplant
so is there a way to use a macro for this very large number of proc phreg's I need to run for these exploratiory analyses?
Very much appreciate it if you can share your expertise
... View more