Learn R Programming

QualityMeasure (version 2.0.1)

plotPerformance: Plot measure performance across accountable entities

Description

This function creates a plot of measure performance across accountable entities, using the perf.results dataframe from calcPerformance() output.

Usage

plotPerformance(df, plot.type = "p")

Value

A ggplot figure

Arguments

df

perf.results dataframe from calcPerformance() output

plot.type

specifies which plot to return:

  • p: plots the entity-level unadjusted outcome rates

  • oe: plots the entity-level observed-to-expected risk-standardized rates

  • pe: plots the predicted-to-expected risk-standardized rates

  • OR: plots the odds ratios comparing each entity with the average entity; i.e., exponentiated random intercepts from the hierarchical logistic regression model.

  • correlation: plot of standardization ratios against the entity random intercepts

  • multiple: plot of measure performance across different risk-adjustment methods

Author

Kenneth Nieser (nieser@stanford.edu)

Examples

Run this code
# simulate data
df <- simulateData(n.entity = 50, n.obs = 100, mu = .2, r = .7)

# calculate measure performance
out <- calcPerformance(df = df, entity = 'entity', y = 'y')

# plot performance
plotPerformance(out$perf.results, plot.type = 'p')

Run the code above in your browser using DataLab