cstrata.psa {PSAgraphics} | R Documentation |
Supports Multiple Methods for Defining and Visualizing (PS) Strata
Description
Given propensity scores, allows strata to be directly user defined, possibly to: equalize sizes of strata, equalize the ranges of propensity scores, or to specify cut points on the unit interval. Once strata are created, a simple graphic is generated to visualize or judge strata for overlap and appropriateness. If a regression tree has been used, propensity scores are defined for each leaf of the tree.
Usage
cstrata.psa(
treatment,
propensity,
strata = NULL,
int = NULL,
tree = FALSE,
minsize = 2,
graphic = TRUE,
colors = c("dark blue", "dark green"),
xlab = "Estimated Propensity Scores with Random Heights",
pch = c(16, 16)
)
Arguments
treatment |
Binary vector or factor defining the two treatments |
propensity |
Vector of same length as |
strata |
Either a vector of same length as |
int |
Either a number |
tree |
Logical, default |
minsize |
Smallest allowable stratum-treatment size. If violated, rows in the stratum are removed. User may wish to redefine strata. |
graphic |
Logical, default |
colors |
2-ary color vector. Sets the colors of the points in the
graphic. Default = |
xlab |
Label for the x axis; default = |
pch |
2-ary vector; determines the shape of points in the graphic.
Default = |
Value
Original.Strata |
Table of strata-treatment sizes before
|
Used.Strata |
Table of strata-treatment
sizes after |
strata |
Vector of the same
length as |
Author(s)
James E. Helmreich James.Helmreich@Marist.edu
Robert M. Pruzek RMPruzek@yahoo.com
KuangNan Xiong harryxkn@yahoo.com
See Also
Examples
data(lindner)
attach(lindner)
lindner.ps <- glm(abcix ~ stent + height + female +
diabetic + acutemi + ejecfrac + ves1proc,
data = lindner, family = binomial)
ps <- lindner.ps$fitted
cstrata.psa(abcix, ps, strata = 5)
cstrata.psa(abcix, ps, strata = 10)
cstrata.psa(abcix, ps, int = c(.37, .56, .87, 1))