nonrandom-package: A tool for a comprehensive data analysis from observational...

Description Details The estimation of the propensity score Propensity score methods Balance checks Effect estimation Author(s) Examples

Description

nonrandom offers a comprehensive data analysis if stratification, matching and covariate adjustment by the propensity score should be applied. Several functions are implemented, starting from the selection of the propensity score model up to estimating propensity score based treatment effects. All functions can be applied separately as well as combined.

Details

Package: nonrandom
Type: Package
Version: 1.3
Date: 2012-10-05
License: What license is it under?

The estimation of the propensity score

The propensity score is the conditional probability of receiving a certain treatment given patient's covariates. It is generally unknown and has to be estimated, e.g. using logistic regression. The selection of an appropriate propensity score model is mostly difficult. A measure describing the extent to which a covariate is confounding the treatment effect on outcome is implemented in relative.effect(). pscore estimates the propensity score.

Propensity score methods

Propensity score methods aims to balance covariate distributions between treatment groups and allow for estimating marginal effects. Stratification (ps.makestrata()) and matching (ps.match)) by the estimated propensity score are the most popular methods to eliminate imbalances in covariate distributions. ps.estimate also offers covariate adjustment by the propensity score.

Balance checks

An important, but often neglected issue in propensity score based data analyses is the check of covariate distributions between treatment groups after stratification and matching. Both graphical checks (dist.plot and plot.stdf) as well as classical statistical tests and standardized differences (ps.balance) can be used to examine covariate distributions.

Effect estimation

After stratification and matching by the propensity score, treatment effects are estimated in the stratified an matched data, respectively. ps.estimate estimates those effects depending on the data structure. It offers an additional adjustment for residual imbalances in the stratified or matched data as well as the estimation of effect using traditional regression models including covariate adjustment by the propensity score.

Author(s)

Susanne Stampf

Maintainer: Susanne Stampf <susanne.stampf@usb.ch>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
## data on quality of life
data(stu1)

## estimate relative effects for covariates 'tgr' and 'age' regarding
## the effect of treatment 'therapie' on response 'pst'
rel.eff <- relative.effect(data    = stu1,
                           formula = pst~therapie+tgr+age)


## estimate the propensity score
ps <- pscore(data    = stu1,
             formula = therapie~tgr+age)


## stratify data
strata <- ps.makestrata(object = ps)


## match data in a ratio of 1:1 with a caliper size of 0.5
match <- ps.match(object  = ps,
                  ratio   = 1,
                  caliper = 0.5,
                  givenTmatchingC = FALSE)


## graphical check of distribution of both covariates between
## treatment groups in the matched data
bal.plot1 <- dist.plot(object = strata,
                      sel     = c("tmass"))

bal.plot2 <- dist.plot(object    = match,
                       sel       = c("alter"),
                       plot.type = 2,
                       compare   = TRUE)      


## calculate standardized differences of both covariates
## in case of matched data
bal.table <- ps.balance(object  = match,
                        sel     = c("tgr","age"),
                        method  = "stand.diff",
                        alpha   =  20)


## estimate propensity score based effects and in comparion the
## regression based treatment effect on response
ps.est <- ps.estimate(object = strata,
                      resp   = "pst",
                      regr   = pst~therapie+tgr+age)

Example output

Loading required package: lme4
Loading required package: Matrix
Argument 'givenTmatchingC'=FALSE: Treated elements were matched to each untreated element.
Loading required package: colorspace

nonrandom documentation built on May 29, 2017, 11:41 p.m.