balance.plot: Balance plot for the given covariate.

Description Usage Arguments Details Value

View source: R/plot.balance.R

Description

If the covariate is numeric, boxplots will be drawn with red points for the mean and green error bars for the standard error. For non-numeric covariates a barplot will be drawn.

Usage

1
2
3
4
balance.plot(x, covar, model, nstrata = attr(attr(tmatch, "triangle.psa"),
  "nstrata"), label = "Covariate", ylab = "", xlab = NULL, se.ratio = 2,
  print = TRUE, legend.position = "top", x.axis.labels,
  x.axis.angle = -45, ...)

Arguments

x

results from trimatch.

covar

vector of the covariate to check balance of.

model

an integer between 1 and 3 indicating from which model the propensity scores will be used.

nstrata

number of strata to use.

label

label for the legend.

ylab

label of the y-axis.

xlab

label of the x-axis.

se.ratio

a multiplier for how large standard error bars will be.

print

print the output if the Freidman Rank Sum Test and repeated measures ANOVA (for continuous variables).

legend.position

the position of the legend. See theme.

x.axis.labels

labels for the x-axis.

x.axis.angle

angle for x-axis labels.

...

parameters passed to plot.balance.plots.

Details

A Friedman rank sum test will be performed for all covariate types, printed, and stored as an attribute to the returned object named friedman. If a continuous covariate a repeated measures ANOVA will also be performed, printed, and returned as an attribute named rmanova.

Value

a ggplot2 figure or a list of ggplot2 figures if covar is a data frame.


TriMatch documentation built on May 2, 2019, 12:37 p.m.