cs_results <- antidepressants |>
cs_combined(
patient,
measurement,
pre = "Before",
mom_di,
reliability = 0.80,
m_functional = 15,
sd_functional = 8,
cutoff_type = "c"
)
# Plot the results "as is"
plot(cs_results)
# Change the axis labels
plot(cs_results, x_lab = "Before Intervention", y_lab = "After Intervention")
# Show the individual categories
plot(cs_results, show = category)
# Show a specific
plot(cs_results, show = recovered)
# Show groups as specified in the data
cs_results_grouped <- antidepressants |>
cs_combined(
patient,
measurement,
pre = "Before",
mom_di,
reliability = 0.80,
m_functional = 15,
sd_functional = 8,
cutoff_type = "c",
group = condition
)
plot(cs_results_grouped)
# To avoid overplotting, generic ggplot2 code can be used to facet the plot
library(ggplot2)
plot(cs_results_grouped) +
facet_wrap(~ group)
# Adjust the transparency of individual data points
plot(cs_results, point_alpha = 0.3)
# Adjust the fill and transparency of the "unchanged" (RCI) region
plot(cs_results, rci_fill = "firebrick", rci_alpha = 0.2)
# Control the overplotting
plot(cs_results, overplotting = 0.1)
# Or adjust the axis limits by hand
plot(cs_results, lower_limit = 0, upper_limit = 80)
Run the code above in your browser using DataLab