BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
helenjad
Calcite | Level 5

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.

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Watts
SAS Employee

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. 

View solution in original post

7 REPLIES 7
ballardw
Super User

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.

 

 

 


 

helenjad
Calcite | Level 5

The source document did not have the details if one of the strata is double zero events. If you check the formula, we have

helenjad_1-1684762142906.png

 

helenjad_0-1684761837432.png

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.

Watts
SAS Employee

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.

 

helenjad
Calcite | Level 5

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. 

Watts
SAS Employee

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. 

helenjad
Calcite | Level 5

Thank you! I can match the numbers.

helenjad
Calcite | Level 5

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: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is ANOVA?

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.

Discussion stats
  • 7 replies
  • 1126 views
  • 2 likes
  • 3 in conversation