antidepressants |>
cs_distribution(patient, measurement, mom_di, reliability = 0.80)
# Turn off the warning by providing the pre measurement time
cs_results <- antidepressants |>
cs_distribution(
patient,
measurement,
mom_di,
pre = "Before",
reliability = 0.80
)
summary(cs_results)
plot(cs_results)
# If you use data with more than two measurements, you always have to define a
# pre and post measurement
cs_results <- claus_2020 |>
cs_distribution(
id,
time,
hamd,
pre = 1,
post = 4,
reliability = 0.80
)
cs_results
summary(cs_results)
plot(cs_results)
# Set the rci_method argument to change the RCI method
cs_results_ha <- claus_2020 |>
cs_distribution(
id,
time,
hamd,
pre = 1,
post = 4,
reliability = 0.80,
rci_method = "HA"
)
cs_results_ha
summary(cs_results_ha)
plot(cs_results_ha)
# Group the analysis by providing a grouping variable
cs_results_grouped <- claus_2020 |>
cs_distribution(
id,
time,
hamd,
pre = 1,
post = 4,
group = treatment,
reliability = 0.80
)
cs_results_grouped
summary(cs_results_grouped)
plot(cs_results_grouped)
# Use more than two measurements
cs_results_hlm <- claus_2020 |>
cs_distribution(
id,
time,
hamd,
rci_method = "HLM"
)
cs_results_hlm
summary(cs_results_hlm)
plot(cs_results_hlm)
Run the code above in your browser using DataLab