Home > OS >  One-Sided Confidence Interval for Odds Ratio for Matched Paired Data in R
One-Sided Confidence Interval for Odds Ratio for Matched Paired Data in R

Time:02-15

I am conducting a propensity score matching analysis on the outcome of two different new cancer treatments where the outcome is binary (cancer-free or not cancer free). Following successful matching I get my paired 2x2 contingency table for my outcome between my matched pairs which looks like below;

                                                **Treatment 1** 
                                       Not-Cancer Free     Cancer Free   
 **Treatment 2**.   Not-Cancer Free           42               39
                    Cancer Free               53               50 

To get my odds ratios I use McNemars Exact Test using R package exact2x2 (function is called mcnemar.exact) and get the below results

Exact McNemar test (with central confidence intervals)
data:  MatchedCasesTable
b = 39, c = 53, p-value = 0.175
alternative hypothesis: true odds ratio is not equal to 1
95 percent confidence interval:
0.4738071 1.1339142
sample estimates:
odds ratio 
0.7358491 

I understand that the p-value and 95% confidence intervals are from a two.sided test approach however I would like to do a one-sided test for the matched pairs odds ratio ad I am only interested in only the lower confidence interval from a one-sided test. Is there any way to modify the test or any other way such that I can get a one-sided test that also provides an accurate lower odds ratio confidence interval? Thank you so much in advance!

CodePudding user response:

It's possible that what you want is this:

tt = data.table(tx1 = c(1,0,1,0), tx2 = c(0,0,1,1), n = c(53,42,50,39))[rep(1:.N,n)]
exact2x2(tt[,table(tx1,tx2)], paired=T, alternative = "greater")

Output

    Exact McNemar-type test

data:  tt[, table(tx1, tx2)]
b = 39, c = 53, p-value = 0.9413
alternative hypothesis: true odds ratio is greater than 1
95 percent confidence interval:
 0.507341      Inf
sample estimates:
odds ratio 
 0.7358491 
  • Related