This function will create a ggplot2
figure with propensity scores on the
x-axis and the outcome on the y-axis. Three Loess regression lines will be plotted
based upon the propensity scores from model
. Since each model produces
propensity scores for two of the three groups, the propensity score for the third
group in each matched triplet will be the mean of the other two. If model
is not specified, the default will be to use the model that estimates the propensity
scores for the first two groups in the matching order.
loess3.plot(tmatch, outcome, model, ylab = "Outcome",
plot.connections = FALSE, connections.color = "black",
connections.alpha = 0.2, plot.points = geom_point, points.alpha = 0.1,
points.palette = "Dark2", ...)
the results of trimatch
.
a vector representing the outcomes.
an integer between 1 and 3 indicating from which model the propensity scores will be used.
the label for the y-axis.
boolean indicating whether lines will be drawn connecting each matched triplet.
the line color of connections.
number between 0 and 1 representing the alpha levels for connection lines.
a ggplot2
function for plotting points. Usually
geom_point
or geom_jitter
. If NULL
no points
will be drawn.
number between 0 and 1 representing the alpha level for the points.
the color palette to use. See scale_colour_brewer
and http://colorbrewer2.org/ for more information.
other parameters passed to geom_smooth
and
stat_smooth
.
a ggplot2
figure.