This functions uses ggplot2to create drop out curves.
Please note that you should use add_dropout_idx() and compute_stats() on your
data before running this function as it needs a certain data structure and variables to
work properly.
Returns a ggplot object containing the dropout curve plot. Using the Shiny App version of
dropR, this plot can easily be downloaded in different formats.
Arguments
do_stats
data.frame containing dropout statistics table computed by compute_stats().
Make sure your do_stats table contains a q_idx column indexing all question-items sequentially.
linetypes
boolean Should different line types be used? Defaults to TRUE.
stroke_width
numeric stroke width, defaults to 1.
full_scale
boolean Should y axis range from 0 to 100? Defaults to TRUE,
FALSE cuts off at min percent remaining (>0).
show_points
boolean Should dropout curves show individual data points? Defaults to FALSE.
show_confbands
boolean Should there be confidence bands added to the plot? Defaults to FALSE.
color_palette
character indicating which color palette to use. Defaults to 'color_blind',
alternatively choose 'gray' or 'default' for the ggplot2 default colors.
See Also
add_dropout_idx() and compute_stats() which are necessary for the proper data structure.