Description Usage Arguments Details Author(s) See Also Examples
Plot standardized differences of covariates
1 2 3 4 5 6 |
x |
an object of class 'bal.matched.data.frame',
'bal.matched.data.frames' or 'bal.matched.pscore'. The previous use of
|
sel |
a vector of strings indicating covariates to be
checked. The default is NULL, i.e. all variables selected previously
in |
plot.alpha |
a logical value indicating whether a vertical line
for the significance level chosen in |
mymar |
a graphical parameter, see |
pch.p |
a vector of two integers indicating the symbols. |
col.p |
a vector of two strings indicating symbol colors. |
colorspace |
a logical value indicating whether
|
cex.p |
a numeric indicating the size of symbols. |
line.stdf |
an integer indicating the line type connecting the sympols. |
line.alpha |
an integer indicating the line type presenting the significance level. |
with.legend |
a logical value indicating whether the legend is given. |
legend.label |
a vector of two strings indicating the labels. |
legend.cex |
a numeric indicating the size of the legend font. |
legend.xy |
a vector of two integers indicating x- and y-coordinates for legend position. |
... |
further arguments for graphics. |
Standardized difference are proposed to check the balance of
covariates after matching. The function plot.stdf()
offers a
graphical check of it presenting standardized differences of
covariates between treatment groups before and after matching.
The usage of plot.stdf()
requires the previous use of
ps.balance(..., method='stand.diff', ...)
and is only available
when matching is done before via ps.match()
.
Susanne Stampf susanne.stampf@usb.ch
plot
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## STU1
data(stu1)
stu1.ps <- pscore(data = stu1,
formula = therapie~tgr+age)
stu1.match <- ps.match(object = stu1.ps,
ratio = 2,
caliper = 0.5,
givenTmatchingC = FALSE,
matched.by = "pscore",
setseed = 38902)
stu1.bal.match <- ps.balance(object = stu1.match,
sel = c("tgr","age"),
method = "stand.diff",
alpha = 20)
plot.stdf(x = stu1.bal.match,
main = "Stu1 study: Standardized differences",
cex.axis = 1.2,
legend.cex = 1.3,
cex.main = 1.5,
las = 1,
col.p = c("black", "gray"))
|
Loading required package: lme4
Loading required package: Matrix
Argument 'givenTmatchingC'=FALSE: Treated elements were matched to each untreated element.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.