Diff for "FAQ/randall" - CBU statistics Wiki
location: Diff for "FAQ/randall"
Differences between revisions 11 and 12
Revision 11 as of 2013-12-10 11:22:04
Size: 4304
Editor: PeterWatson
Comment:
Revision 12 as of 2013-12-10 11:27:45
Size: 4375
Editor: PeterWatson
Comment:
Deletions are marked like this. Additions are marked like this.
Line 67: Line 67:
Jasjeet S. Sekhon (2011). Multivariate and Propensity Score Matching Software with Automated Balance Optimization: The Matching Package for R. Journal of Statistical Software, 42(7), 1-52. URL http://www.jstatsoft.org/v42/i07/. Jasjeet S. Sekhon (2011). Multivariate and Propensity Score Matching Software with Automated Balance Optimization: The Matching Package for R. ''Journal of Statistical Software'', '''42(7)''', 1-52. URL http://www.jstatsoft.org/v42/i07/.
Line 69: Line 69:
To refer to the theory on which this package is based: To refer to the theory on which this package is based (full reference now available):
Line 71: Line 71:
Alexis Diamond and Jasjeet S. Sekhon Genetic Matching for Estimating Causal Effects: A General Multivariate Matching Method for Achieving Balance in Observational Studies. Review of Economics and Statistics. Forthcoming. Alexis Diamond and Jasjeet S. Sekhon Genetic Matching for Estimating Causal Effects: A General Multivariate Matching Method for Achieving Balance in Observational Studies. (2013) ''Review of Economics and Statistics''. '''95(3)''', 932-945.
Line 75: Line 75:
Jasjeet Singh Sekhon and Richard D. Grieve (2012). A Matching Method For Improving Covariate Balance in Cost-Effectiveness Analyses. Health Economics, 21(6), 695-714. Jasjeet Singh Sekhon and Richard D. Grieve (2012). A Matching Method For Improving Covariate Balance in Cost-Effectiveness Analyses. ''Health Economics'', '''21(6)''', 695-714.

Algorithms for matching and allocating randomly to groups during clinical trials

Matching Algorithms

It is often advantageous to match controls to cases prior to statistical analysis (e.g. matching controls to patients coming in for hospital admissions) to remove confounding effects. Bland and Altman (1994) mention that only individual matching should be regarded as yielding a matched study.

Exact matching, however, may not always be possible and a more pragmatic approach incorporated into the R Package 'Matching' (Sekhon (2011) - see also http://sekhon.berkeley.edu/matching) maximizes paired p-values from paired t-tests to match controls to cases. Other 1-1 matching criteria can be used.

The algorithm 'GenMatch' produces optimal matches which can be tested using paired t-tests ansd McNemar tests. An example below generates simulated data representing age and gender and matches the cases with the controls based upon these values.

install.packages(c("Matching"))
library(Matching)
Y <- rnorm(1:100)
X <- matrix(NA,100,2)
lds <- matrix(NA,100,1)
notlds <- matrix(NA,100,1)
x <- c(0,1)
gp <- rep(x,each=50)
X[,1] <- rep(x,each=2)
X[,2] <- round(rnorm(100,50,3))
mat <- GenMatch(Tr=gp,X=X) # 1-1 matching with replacement
mat <- GenMatch(Tr=gp,X=X,replace=F) #with no replacement matching gp on X
age <- X[,2]
gen <- X[,1]

id1 <- mat$matches[,1]
id2 <- mat$matches[,2]

row <- c(1:100)
for (k in 1:50) {
lds[k] <- age[id1[k]]
notlds[k] <- age[id2[k]]
}

t.test(lds,notlds, paired=TRUE) # stats sig! need a lot of non-lds compared to lds ; the last few matches have higher ages since fewer matches to choose from!

for (k in 1:50) {
lds[k] <- gen[id1[k]]
notlds[k] <- gen[id2[k]]
}

lds <- as.factor(lds)
notlds <- as.factor(notlds)

mcnemar.test(lds,notlds) # also stats.sig! (gender differences)

Minimisation (Random allocation in a Clinical Trial)

When the groups are determined by the researcher e.g. treatment/placebo in a clinical trial a randomized allocation procedure may be used for group allocation. A popular technique is minimization which attempts to allocate people to groups to best balance confounding group variables (stratifiers) such as age or gender. Minimisation computes an imbalance score within each factor should the patient be allocated to a particular treatment group. The various imbalances are added together to give the overall imbalance in the study. The treatment group that would minimise the imbalance can be chosen directly, or a random element may be added (perhaps allocating a higher chance to the groups that will minimise the imbalance, or perhaps only allocating a chance to groups that will minimise the imbalance). The technique allocates to each group as each new individual ebters the clinical trial.

QMinimP (Saghaei and Saghei 2011) is available both on-line or as free downloadable software. Minim is also free downloadable software available for use on MS DOS (See here).

References

Bland JM and Altham DG (1994) Statistics notes: Matching. BMJ 309 1128.

Saghaei, M & Saghaei, S (2011) Implementation of an open-source customizable minimization program for allocation of patients to parallel groups in clinical trials (2011) J. Biomedical Science and Engineering 4 734-739.

References for the Package Matching in R

(From http://cran.r-project.org/web/packages/Matching/citation.html)

To cite 'Matching' in publications use:

Jasjeet S. Sekhon (2011). Multivariate and Propensity Score Matching Software with Automated Balance Optimization: The Matching Package for R. Journal of Statistical Software, 42(7), 1-52. URL http://www.jstatsoft.org/v42/i07/.

To refer to the theory on which this package is based (full reference now available):

Alexis Diamond and Jasjeet S. Sekhon Genetic Matching for Estimating Causal Effects: A General Multivariate Matching Method for Achieving Balance in Observational Studies. (2013) Review of Economics and Statistics. 95(3), 932-945.

Further developing the theory and practice:

Jasjeet Singh Sekhon and Richard D. Grieve (2012). A Matching Method For Improving Covariate Balance in Cost-Effectiveness Analyses. Health Economics, 21(6), 695-714.

None: FAQ/randall (last edited 2015-01-28 11:26:08 by PeterWatson)