Greetings, and thank you for your question.
I apologize in advance for the long response, but I hope you will find it useful. I've tried to include links to relevant sections of the documentation in case you want additional information.
First, on PROC POWER. Setting NSUBINTERVAL=2 is much too low. The fact that doing so produces a result of 28 events (close to the R output of 29 events) is pure coincidence. In fact, even the default value of NSUBINTERVAL=12 seems a bit too low in this case. Setting that value much higher (on the order of 1000) will produce a result that is accurate to well within 1%.
As to why the PROC POWER result (ceiling of 37 events) differs from your R analysis (29 events), my guess is that there are some options/methods/etc that differ somewhere. These power and sample size computations (particularly for survival endpoints), even when nominally similar in their options specifications, can use different underlying statistical models and computational approximations. This leads to different results. That said, here is a code snippet that uses PROC SEQDESIGN to produce a fixed-sample design and agrees with your other result (29 events):
%let Lambda_cnt=0.01005; %let AT = 1; %let FUT=1; %let HR=0.3; %let alpha=0.025; %let beta=0.1;
%let HR_thresh = 1;
proc seqdesign altref=%sysfunc(log(&HR.));
FixedSample: design nstages=1 alpha=&alpha. beta=&beta. alt=upper;
samplesize model=twosamplesurvival
(nullhazard=%sysevalf(&Lambda_cnt.*&HR_thresh.) &Lambda_cnt.
acctime=&AT. accrual=UNIFORM foltime=&FUT.);
run;
The computations performed by PROCs POWER and SEQDESIGN are summarized in the SAS/STAT documentation (PROC POWER > Details > Computational Methods and Formulas > Analyses in the TWOSAMPLESURVIVAL Statement; PROC SEQDESIGN > Details > Applicable Two-Sample Tests and Sample Size Computation).
Notice that, in the code above, I specified ALT=UPPER. I also removed the HAZARDRATIO suboption in the SAMPLESIZE statement. To understand why, compare the outputs from the following two analyses:
proc seqdesign altref=1.203973;
FixedSample: design nstages=1 alpha=&alpha. beta=&beta. alt=upper;
samplesize model=twosamplesurvival
(nullhazard=%sysevalf(&Lambda_cnt.*&HR_thresh.) &Lambda_cnt.
acctime=&AT. accrual=UNIFORM foltime=&FUT.);
run;
proc seqdesign altref=1.203973;
FixedSample: design nstages=1 alpha=&alpha. beta=&beta. alt=lower;
samplesize model=twosamplesurvival
(nullhazard=%sysevalf(&Lambda_cnt.*&HR_thresh.) &Lambda_cnt.
acctime=&AT. accrual=UNIFORM foltime=&FUT.);
run;
Here I have replaced the %sysfunc macro with the hard-coded numerical value just for transparency. The only difference between these two invocations is ALT=UPPER vs ALT=LOWER on the DESIGN statement.
Compare the Design Information tables. You can see that the value of the alternative reference has changed signs, even though I specified the same alternative reference both times! This is because of the way SEQDESIGN handles the ALTREF= option--it uses the absolute value of the user-specified value; then the correct sign (+/-) is applied based upon the ALT=option.
Now compare the Sample Size Summary tables. The hazard rates for Group A are different (they are reciprocals of each other). These hazard rates are calculated from the alternative reference (see the documentation: SEQDESIGN > Syntax > SAMPLESIZE Statement > Two-Sample Models > MODEL=TWOSAMPLESURVIVAL Subsection). If you use ALTREF=1.203973 you get one value, if you use ALTREF=-1.203973 you get the reciprocal value. You can see that your intended analysis (Hazard Ratio for Group A is 0.3) occurs when ALT=UPPER.
So why is this an ALT=UPPER test when we want to compare an assumed effect of 0.3 against a null hypothesis of 1.0? Because the power analysis is not based on the hazard rates but rather on the negative log of the hazard ratio. For you, this means -log(0.3/1.0) = 1.203973. This is explained in greater details in the previously linked sections of the SEQDESIGN documentation.
The next question is: why did I need to remove the HAZARDRATIO suboption in the SAMPLESIZE statement? The truth is: I did not *have* to remove it. The following code will work just fine:
proc seqdesign;
FixedSample: design nstages=1 alpha=&alpha. beta=&beta. alt=upper;
samplesize model=twosamplesurvival
(nullhazard=%sysevalf(&Lambda_cnt.*&HR_thresh.) &Lambda_cnt.
hazardratio=%sysevalf(&HR.)
acctime=&AT. accrual=UNIFORM foltime=&FUT.);
run;
Notice that this time I removed the ALTREF= option. That is because the ALTREF option is extraneous--the value of the alternative reference can be computed from the information provided on the SAMPLESIZE statement. And this is the key to understand the warning message that you received (in which the SAMPLESIZE statement was ignored because of the ALT=LOWER option). In your code, SEQDESIGN realizes that it has enough information (on the SAMPLESIZE statement) to compute the alternative reference, so it does. The result of that computation is positive (1.203973). This means setting ALT=LOWER does not make any sense; SEQDESIGN prints a warning and then ignores the SAMPLESIZE statement.
(When printing the warning message, SEQDESIGN *prints* the value of the ALTREF= option if one is provided. That is why, in your screenshot, you see "WARNING: The alternative reference -1.204 is derived...". In fact, the value that is derived by SEQDESIGN is 1.204 (positive) while the value of -1.204 (negative) was provided in the ALTREF= option. This is a bug in the code that prints the warning message.)
I hope this explains why ALT=UPPER is the correct hypothesis test for your use case.
On the final issue, when you set HR_thresh = 0.9. What version of SAS are you running? In my hands, I obtain the 35 events that you are expecting:
... View more