plot.pscore: Graphical check for propensity score distributions in...

Description Usage Arguments Details Author(s) See Also Examples

View source: R/plot.pscore.R

Description

Plot propensity score density in treatment groups

Usage

1
2
3
4
## S3 method for class 'pscore'
plot(x, par.dens=NULL, par.1=NULL, par.0=NULL,
  with.legend=FALSE, legend.cex=0.9, legend.label=NULL,
  main=NULL, ylim=NULL, xlim=NULL, ...)

Arguments

x

an object of class 'pscore'.

par.dens

a list of parameters needed for function density() internally used. The default is NULL, i.e. default parameters in density() are used.

par.1

a list of parameters needed for function lines() internally used for the presentation of the propensity score density for individuals labeled by treat='1'. The default is NULL, i.e. default parameter in lines() are used.

par.0

a list of parameters needed for function lines() internally used for the presentation of the propensity score density for individuals labeled by treat='0'. The default is NULL, i.e. 'lty=2' and remaining default parameter in lines() are used.

with.legend

a logical value for showing a legend.

legend.cex

a numeric value indicating the cex of the legend font.

legend.label

a vector of two strings labeling treated and untreated individuals. The default is NULL, i.e. c('treated', 'untreated') is used.

main

a string indicating the title of the plot.

ylim

a vector of two numerics indicating the limits of the y-axis.

xlim

a vector of two numerics indicating the limits of the x-axis.

...

further arguments for graphics.

Details

Propensity score methods aim to eliminate imbalances in covariate distributions between treatment groups. Therefore, individuals from both treatments are matched together or individuals are stratified based on their propensity score. To do so, the graphical check of propensity score distributions for treated and untreated individuals is useful.

The use of plot.pscore() requires the use of (pscore).

Author(s)

Susanne Stampf susanne.stampf@usb.ch

See Also

plot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## STU1
data(stu1)
stu1.ps <- pscore(data    = stu1, 
                  formula = therapie~tgr+age)

plot.pscore(x    = stu1.ps,
            main = "PS distribution",
            xlab = "",
            par.1=list(col="red"),
            par.0=list(lwd=2),
            par.dens=list(kernel="gaussian"))

Example output

Loading required package: lme4
Loading required package: Matrix
Loading required package: colorspace

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