 # Adjusted proportion difference and confidence interval in stratified randomized trials ## (PDF) Adjusted proportion difference and confidence interval in stratified randomized trials

{amp}lt; Adjusted proportion difference and confidence interval in stratified randomized trials {amp}gt;, continued

/* start to caculate Newcombe */

* 1. calculate z_gamma;

partz_a1 = J(n_strata,3,1);partz_a2 =J(n_strata,3,1);

partz_b1 = J(n_strata,3,1);partz_b2 = J(n_strata,3,1);

do i=1 to n_strata;

do j=1 to 3;

partz_a1[i,j] = (sq_w[i,j]/n_trt1[i,1]) # (p[i,1] # (1p[i,1]));

partz_a2[i,j] = (sq_w[i,j]/n_trt2[i,1]) # (p[i,2] # (1p[i,2]));

partz_b1[i,j] = w[i,j] # sqrt(p[i,1] # (1-p[i,1])/n_trt1[i,1]);

partz_b2[i,j] = w[i,j] # sqrt(p[i,2] # (1-p[i,2])/n_trt2[i,1]);

end;

end;

z_value1=(probit({amp}amp;alpha) * sqrt(partz_a1[ ,]) / partz_b1[ ,])`;

z_value2=(probit({amp}amp;alpha) * sqrt(partz_a2[ ,]) / partz_b2[ ,])`;

* 2. calculate L1 L2 U1 U2 based on stratified Wilson CI;

wilson_part1a= J(n_strata,3,1); wilson_part1b= J(n_strata,3,1);

wilson_part2a= J(n_strata,3,1); wilson_part2b= J(n_strata,3,1);

do i=1 to n_strata;

do j=1 to 3;

wilson_part1a[i,j]=(n[i,1] # p[i,1] 0.5 # (Z_value1[j,1] ## 2)) / (n[i,1] Z_value1[j,1] ## 2);

wilson_part1b[i,j]=((n[i,1] # Z_value1[j,1])/(n[i,1] Z_value1[j,1]##2))

# (sqrt(4 # n[i,1] # p[i,1] # (1-p[i,1]) Z_value1[j,1] ##2)/(2 # n[i,1]) );

wilson_part2a[i,j]=(n[i,2] # p[i,2] 0.5 # (Z_value2[j,1] ## 2)) / (n[i,2] Z_value2[j,1] ## 2);

wilson_part2b[i,j]=((n[i,2] # Z_value2[j,1])/(n[i,2] Z_value2[j,1]##2))

# (sqrt(4 # n[i,2] # p[i,2] # (1-p[i,2]) Z_value2[j,1] ##2)/(2 # n[i,2]) );

end;

end;

wilson_L1 = w # ( wilson_part1a — wilson_part1b);

wilson_U1 = w # ( wilson_part1a wilson_part1b);

wilson_L2 = w # ( wilson_part2a — wilson_part2b);

wilson_U2 = w # ( wilson_part2a wilson_part2b);

newcombe_L1 = wilson_L1[ ,];

newcombe_U1 = wilson_U1[ ,];

newcombe_L2 =wilson_L2[ ,];

newcombe_U2 =wilson_U2[ ,];

* 3. Calculate lambda1 and 2;

lam1= sq_w / n_trt1; lam2 = sq_w / n_trt2;

lambda1 = lam1[ ,]; lambda2 = lam2[ ,];

* 4. calculate lower/upper limit for newcombe CI;

NEWCOMBE_L = wald_part1 — probit({amp}amp;alpha) # sqrt(lambda1 # newcombe_L1

# (1 newcombe_L1) lambda2 # newcombe_U2 # (1-newcombe_U2));

NEWCOMBE_U = wald_part1 probit({amp}amp;alpha) # sqrt(lambda2 # newcombe_L2

# (1newcombe_L2) lambda1 # newcombe_U1 # (1-newcombe_U1));

Newcombe_Lower=newcombe_L`; Newcombe_Upper=newcombe_U`;

/* end of Newcombe CI */

Stratum_nm = {‘Strata’,‘Sample size in Trt1’,‘Sample size in Trt2’,‘Proportion in Trt1’,

‘Proportion in Trt2’,‘Proportion difference (Trt1 — Trt2)’,‘CMH weight’,

‘Inverse of Variance weight’, ‘Minimum risk weight’ };

«Newcombe CI (lower)»,«Newcombe CI (upper)»} ;

Weights= { «CMH», «Inverse of Variance», «Minimum risk»};

CI = {«Crude CI (lower)»,«Crude CI (upper)»};

Strata_sum = (1:n_strata)`||n_trt1|| n_trt2 || prop1 || prop2 || r_diff || CMH_weight ||

invar_weight || min_weight;

Adj_sum = wald_part1`||wald_Lower || Wald_Upper ||newcombe_Lower || newcombe_Upper ;

Crude_CI = crude_Lower` || crude_Upper`;

file print;

put @35«Summary for dataset «/;

put @30«Sample size « @75 totaln /

@30«Number of strata « @75 n_strata;

1 PharmaSUG Paper SP04 Adjusted proportion difference and confidence interval in stratified randomized trials ABSTRACT Yeonhee Kim, Gilead Sciences, Seattle, WA Seunghyun Won, University of Pittsburgh, Pittsburgh, PA Stratified randomization is widely used in clinical trials to achieve treatment balance across strata. In the analysis, investigators are often interested in the estimation of common treatment effect adjusting for stratification factors. We developed the macro for stratified analysis when the primary endpoint is a difference in proportions between two treatment groups. The %strataci macro estimates proportion difference using three different weighting schemes and calculates Wald and Newcombe confidence intervals. Keywords: Stratified analysis, weight-adjusted proportion, Minimum risk weight, Wald, Newcombe confidence interval INTRODUCTION Stratified randomization is often used when treatment outcome is presumed to be affected by baseline characteristics such as gender and disease severity. Another example of stratification can be found in multicenter trials in which patients are randomly assigned to the treatments within each center. In the analysis, treatment effects are not only assessed separately by each center but also combined after adjusting for center effect. This paper focuses on the stratified analysis for binary outcomes (success or failure) when the primary endpoint is a proportion difference between two treatment groups. Starting from the stratum-specific proportion difference, we consider the point estimate and corresponding confidence interval for the strata-adjusted proportion difference. The adjusted effect is obtained by weighted average of stratum specific rate differences. For treatment comparison, we present Wald type confidence interval as well as stratified Newcombe confidence interval. METHOD STRATUM-SPECIFIC PROPORTION DIFFERENCE Let p ij is the proportion of success in treatment i (i = 1, 2) and stratum j (j = 1,…, s), then the stratum-specific proportion difference is defined as d j = p 1j p 2j. In the below 2×2 contingency table for the j th stratum, one can estimate the proportion of success = x ij/n ij, and the stratum-specific proportion difference = x 1j/n 1j — x 2j/n 2j. ADJUSTED PROPORTION DIFFERENCE Stratum j Treatment 1 Treatment 2 Failure x 1j x 2j No failure n 1j x 1j n 2j x 2j Total n 1j n 2j Table 1 2×2 contingency table (j th stratum) Strata-adjusted proportion difference (d adj) can be obtained by weighted average of stratum-specific proportion differences, that is,, where w j is the weight assigned to stratum j. Several weighting strategies have been developed such as Cochran-Mantel-Haenszel, inverse of variance and minimum risk weights (Mehrotra and Railkar, 2000). Cochran-Mantel-Haenszel weight is given by 1

2 ( ) ( ) It assigns more weight to the stratum with large sample size than the stratum of small size. The Cochran-Mantel- Haenszel weight is especially powerful to detect treatment difference when the odds ratio is constant across strata. While the Cochran-Mantel-Haenszel weight does not take variability of into account, inverse of variance weight considers heterogeneity between strata. The inverse of variance weight has the form ( ) ( ) which implies that the stratum with high precision for the risk difference (i.e. smaller variance of ) has more weights. Minimum risk weight is driven from the risk function so that the squared error loss is minimized. The minimum risk weight is given as [ ] [ ], where, ( ), and ( ). CONFIDENCE INTERVAL FOR ADJUSTED PROPORTION DIFFERENCE Confidence interval is frequently reported along with the point estimate in comparative studies. If the confidence interval for does not include value of zero, difference between two groups are considered statistically different. The Wald-type 100 x (1-α)% confidence interval is constructed as ( ) where the 100 x (1 — α/2) th percentile of the standard normal distribution. Although Wald-type confidence interval has been widely used in practice due to computational simplicity, coverage probability is not always good, especially when approaches to 0 or 1 (Agresti and Coull, 1998; Agresti and Caffo, 2000). Stratified Newcombe confidence interval is shown to give better coverage probabilities. The stratified Newcombe confidence interval proposed by Yan and Su (2010) has the form [ ], where each is the Wilson confidence interval for,. Each is computed as ( ( ) ), where ( ( ) ) 2

3 SAS MACRO IMPLEMENTATION For demonstration purpose, we use the following example dataset that contains subject id, response (success = 1, failure = 0), treatment group (1, 2), and stratum number (1, 2, 3). Display 1. Example dataset (first 12 observations) To execute the macro %strataci, users need to define the SAS dataset that will be analyzed and the variables representing treatment group, strata, response and type 1 error. %strataci(data=, treatment=, strata=, response=, level= ); Variable data treatment strata response level Description Input SAS dataset name The dataset should contain variables for subject id, treatment, strata and response. Variable name for treatment in the SAS dataset Data type for treatment is numeric, e.g., 1 for Treatment and 0 for control Variable name for strata in the SAS dataset Data type for strata is numeric, e.g., 1, 2, 3, Variable name for response in the SAS dataset Data type for response is numeric, e.g., 1 for success and 0 for failure Type I error Table 2 Description of input variables The %strataci macro generates summary of strata-adjusted proportion difference along with stratum-specific proportion difference using PROC FREQ and PROC IML. For comparison, the program also calculates confidence interval for crude proportion difference. The stratum-specific summary output (Table 3) includes sample sizes (n 1j and n 2j), proportions of success (p 1j and p 2j), proportion difference between two treatment groups (d j) and weights (w j) assigned in each stratum j (j = 1, 2, 3). In the summary output, for example, the highest weight is assigned to the second stratum. Stratum-specific summary Strata Sample size in Trt1 Sample size in Trt2 Proportion in Trt1 Proportion in Trt2 Proportion difference (Trt1 — Trt2) CMH weight Inverse of Variance weight Minimum risk weight ROW ROW ROW Table 3 Output of stratum-specific summary 3 