Hello, I'd like to know more about the details how the MR method is implemented under double zero events. Below is the data and code.
data test;
input strat trt $ responder $ count;
datalines;
1 Test Responder 4
1 Test NR 8
1 Pbo Responder 2
1 Pbo NR 11
2 Test Responder 0
2 Test NR 12
2 Pbo Responder 0
2 Pbo NR 13
;
run;
proc freq data=test;
weight count;
tables strat*trt * responder/commonriskdiff(column=2 cl=MR correct=NO);
run;
I have tried to do some adjustment for the double zero count like adding 0.5 to the zero cells, adding 1 to the zero cells, adding 0.5 to each cell. It seems the results from SAS output are closest to the one when adding 0.5 to the zero cells. Is this how it's been implemented? Thank you.
In the minimum risk weight computation, PROC FREQ add 0.5/n_hi to a zero-frequency table cell, where n_hi is the corresponding row sum (stratum h, row i).
For more information, see
Mehrotra, D. V. (2001). “Stratification Issues with Binary Endpoints.” Drug Information Journal 35:1343–1350.
Zhao et al (2001). "Confidence interval for the difference in binomial proportions from stratified 2x2 samples." JSM Proceedings 2001.
You can suppress this zero-cell adjustment by specifying COMMONRISKDIFF(CL=MR ADJUST=NO) in the TABLES statement.
Details of computation are to be found in the online help for that option in the Proc Freq section. https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/procstat/procstat_freq_details63.htm#procstat...
@helenjad wrote:
Hello, I'd like to know more about the details how the MR method is implemented under double zero events. Below is the data and code.
data test;
input strat trt $ responder $ count;
datalines;
1 Test Responder 4
1 Test NR 8
1 Pbo Responder 2
1 Pbo NR 11
2 Test Responder 0
2 Test NR 12
2 Pbo Responder 0
2 Pbo NR 13
;
run;proc freq data=test;
weight count;
tables strat*trt * responder/commonriskdiff(column=2 cl=MR correct=NO);
run;
I have tried to do some adjustment for the double zero count like adding 0.5 to the zero cells, adding 1 to the zero cells, adding 0.5 to each cell. It seems the results from SAS output are closest to the one when adding 0.5 to the zero cells. Is this how it's been implemented? Thank you.
The source document did not have the details if one of the strata is double zero events. If you check the formula, we have
If we have double zero events, p_{h1} and p_{h2} are zeros, and V_i^{-1} would be infinity. I'd like to know how it's been handled in SAS since I didn't get error/warning messages.
In the minimum risk weight computation, PROC FREQ adds 0.5/n_hi to any zero-frequency table cell. This adjustment is made when there's one zero-frequency cell or when there are multiple zero-frequency cells in the multiway (stratified) table. You can suppress the adjustment by specifying ADJUST=NO in the COMMONRISKDIFF option.
For anyone who are interested in the case, the weight computation is matched when adding 0.5 to each cell not 0.5/n_hi.
In the minimum risk weight computation, PROC FREQ add 0.5/n_hi to a zero-frequency table cell, where n_hi is the corresponding row sum (stratum h, row i).
For more information, see
Mehrotra, D. V. (2001). “Stratification Issues with Binary Endpoints.” Drug Information Journal 35:1343–1350.
Zhao et al (2001). "Confidence interval for the difference in binomial proportions from stratified 2x2 samples." JSM Proceedings 2001.
You can suppress this zero-cell adjustment by specifying COMMONRISKDIFF(CL=MR ADJUST=NO) in the TABLES statement.
Thank you! I can match the numbers.
In a follow-up question similar to the double zero case mentioned above, what if we have a double one case, i.e. both p_h1 and p_h2 are equal to 1, we would also have variance equal to zero. What SAS would do to handle this situation? Thank you.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.