Learn R Programming

nonrandom (version 1.42)

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

Description

Plot propensity score density in treatment groups

Usage

## 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
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).

See Also

plot

Examples

Run this code
## 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"))

Run the code above in your browser using DataLab