# Data preparation
df <- cp025q01.treated
df$categ <- cut(df$PV1CPRO, c(0, 423, 488, 553, 900))
df.dataplot <- df[, c("top", "categ")]
df.dataplot[, 1] <- as.factor(df.dataplot[, 1])
df.dataplot[, 2] <- as.factor(df.dataplot[, 2])
# Function demonstration
m2$PlotStrategybyCatPerformance(
df.dataplot, top, categ,
"Proficiency levels", "Percentage"
)
Run the code above in your browser using DataLab