From ce8a807c1ee2f63f5a876c5aa777a5e7d156e22e Mon Sep 17 00:00:00 2001 From: Alistair Johnson Date: Wed, 17 May 2017 12:19:05 -0400 Subject: [PATCH] ATT instead of ATC --- notebooks/aline/aline_propensity_score.Rmd | 2 +- notebooks/aline/aline_propensity_score.html | 27 +++++++++++++++------------ 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/notebooks/aline/aline_propensity_score.Rmd b/notebooks/aline/aline_propensity_score.Rmd index 0ab9125..60f645c 100644 --- a/notebooks/aline/aline_propensity_score.Rmd +++ b/notebooks/aline/aline_propensity_score.Rmd @@ -145,7 +145,7 @@ library(Matching) set.seed(43770) -ps <- Match(Y=NULL, Tr=Tr, X=X, M=1, estimand='ATC', caliper=0.1, exact=FALSE, replace=FALSE); +ps <- Match(Y=NULL, Tr=Tr, X=X, M=1, estimand='ATT', caliper=0.1, exact=FALSE, replace=FALSE); # get pairs with treatment/outcome as cols outcome <- data.frame(aline_pt=y[ps$index.treated], match_pt=y[ps$index.control]) diff --git a/notebooks/aline/aline_propensity_score.html b/notebooks/aline/aline_propensity_score.html index 69050c0..b527994 100644 --- a/notebooks/aline/aline_propensity_score.html +++ b/notebooks/aline/aline_propensity_score.html @@ -715,16 +715,19 @@

May 15, 2017

## ##
set.seed(43770)
 
-ps <- Match(Y=NULL, Tr=Tr, X=X, M=1, estimand='ATC', caliper=0.1, exact=FALSE, replace=FALSE);
-
-# get pairs with treatment/outcome as cols
+ps <- Match(Y=NULL, Tr=Tr, X=X, M=1, estimand='ATT', caliper=0.1, exact=FALSE, replace=FALSE);
+
## Warning in Match(Y = NULL, Tr = Tr, X = X, M = 1, estimand = "ATT", caliper
+## = 0.1, : replace==FALSE, but there are more (weighted) treated obs than
+## control obs. Some treated obs will not be matched. You may want to estimate
+## ATC instead.
+
# get pairs with treatment/outcome as cols
 outcome <- data.frame(aline_pt=y[ps$index.treated], match_pt=y[ps$index.control])
 head(outcome)
##   aline_pt match_pt
-## 1        0        1
-## 2        1        0
-## 3        1        0
-## 4        0        0
+## 1        0        0
+## 2        0        1
+## 3        0        0
+## 4        0        1
 ## 5        1        0
 ## 6        0        0
# mcnemar's test to see if iac related to mort (test should use matched pairs)
@@ -732,18 +735,18 @@ 

May 15, 2017

tab.match1
##      Matched Control
 ## Aline   0   1
-##     0 578 122
-##     1 103  19
+## 0 582 118 +## 1 104 19
tab.match1[1,2]/tab.match1[2,1]
-
## [1] 1.184466
+
## [1] 1.134615
paste("95% Confint", round(exp(c(log(tab.match1[2,1]/tab.match1[1,2]) - qnorm(0.975)*sqrt(1/tab.match1[1,2] +1/tab.match1[2,1]),log(tab.match1[2,1]/tab.match1[1,2]) + qnorm(0.975)*sqrt(1/tab.match1[1,2] +1/tab.match1[2,1])) ),2))
-
## [1] "95% Confint 0.65" "95% Confint 1.1"
+
## [1] "95% Confint 0.68" "95% Confint 1.15"
mcnemar.test(tab.match1) # for 1-1 pairs
## 
 ##  McNemar's Chi-squared test with continuity correction
 ## 
 ## data:  tab.match1
-## McNemar's chi-squared = 1.44, df = 1, p-value = 0.2301
+## McNemar's chi-squared = 0.76126, df = 1, p-value = 0.3829

The above p-value, which is > 0.05, tells us that we cannot reject the null hypothesis of the aline/non-aline groups having the same mortality rate. Assuming all assumptions of our modelling process are correct, we can infer from this that the use of an indwelling arterial catheter is not associated with a mortality benefit in these patients.