Plots the results of a multilevel propensity score model.

Share:

Description

The plot created uses the ggplot2 framework. As such, additional modificaitons can be made. This plot is an extension of the circ.psa function in the PSAgraphics package for multilevel models.

Usage

1
2
3
4
5
6
7
8
9
mlpsa.circ.plot(x, xlab = names(multilevelPSA$level2.summary)[4],
  ylab = names(multilevelPSA$level2.summary)[5], legendlab = "Level 2",
  title = NULL, overall.col = "blue", overall.ci.col = "green",
  level1.plot = FALSE, level1.point.size = NULL, level1.rug.plot = NULL,
  level1.projection.lines = FALSE, level2.plot = TRUE,
  level2.point.size = NULL, level2.rug.plot = "tr",
  level2.projection.lines = TRUE, level2.label = FALSE,
  unweighted.means = FALSE, weighted.means = FALSE, fill.colors = NULL,
  ...)

Arguments

x

the results of mlpsa.

xlab

label for the x-axis.

ylab

label for the y-axis.

legendlab

the label for the legend, or NULL to exclude.

title

title for the figure.

overall.col

the color used for the overall results.

overall.ci.col

the color used for the confidence intervals.

level1.plot

logical value indicating whether level 1 points should be plotted.

level1.point.size

the size of level 1 points

level1.rug.plot

the placement for plotting a level 2 rug. Possible values are bl (for left and bottom), tr (for top and right), or NULL (to exclude).

level1.projection.lines

logical value indicating whether level 1 project lines (parallel to the unit line) are drawn.

level2.plot

logical value indicating whether level 2 points should be plotted.

level2.point.size

the size of level 2 points

level2.rug.plot

the placement for plotting a level 2 rug. Possible values are bl (for left and bottom), tr (for top and right), or NULL (to exclude).

level2.projection.lines

logical value indicating whether level 2 project lines (parallel to the unit line) are drawn.

level2.label

logical value indicating whether level 2 points should be labeled.

unweighted.means

logical value indicating whether horizontal and vertical lines are drawn representing the unweighted (i.e. unadjusted from phase I of PSA) means for each level 2, or cluster.

weighted.means

logical value indicating whether horizontal and vertical lines are drawn representing the weighted means for each level 2, or cluster.

fill.colors

if specified, the colors to use for level 2 points.

...

currently unused.

See Also

plot.mlpsa

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
data(pisana)
data(pisa.colnames)
data(pisa.psa.cols)
mlctree = mlpsa.ctree(pisana[,c('CNT','PUBPRIV',pisa.psa.cols)], 
                      formula=PUBPRIV ~ ., level2='CNT')
student.party = getStrata(mlctree, pisana, level2='CNT')
student.party$mathscore = apply(student.party[,paste0('PV', 1:5, 'MATH')], 1, sum) / 5
results.psa.math = mlpsa(response=student.party$mathscore, 
       treatment=student.party$PUBPRIV, 
       strata=student.party$strata, 
       level2=student.party$CNT, minN=5)
mlpsa.circ.plot(results.psa.math, legendlab=FALSE)

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.