An appropriate analysis must take into account the amount of data available
for analysis. For continuous outcomes, this may involve the number of
individuals with baseline covariates and primary outcomes, while binary and
time to events may additionally depend on the number of observed events.
plot_outcome_counts
provides a way to visualize the amount of data
available for analysis.
Usage
plot_outcome_counts(
prepared_data,
study_time = NULL,
type = "tc",
count_increment = 10,
time_increment = 30,
color_palette = NULL,
legend_placement = "topleft"
)
Arguments
- prepared_data
A prepeared dataset: see prepare_monitored_study_data
- study_time
A
numeric
scalar indicating the study time at which the data should be reconstructed and events should be counted- type
A
character
scalar containing "t" for the total number of observations, "c" for the number of complete observations, and "e" for the number of events (for time-to-event or binary outcomes)- count_increment
Plots have horizontal lines at regular increments to assist in reading of counts.
count_increment
is anumeric
scalar indicating the increment between horizontal lines on the count axis.- time_increment
Plots have horizontal lines at regular increments to assist in reading of counts.
time_increment
is anumeric
scalar indicating the increment between vertical lines on the time axis.- color_palette
A vector of colors for each event.
- legend_placement
Location of the plot legend. See
?legend