# By default, cutoff type "a" is used
cs_results <- claus_2020 |>
cs_statistical(id, time, hamd, pre = 1, post = 4)
cs_results
summary(cs_results)
plot(cs_results)
# You can choose a different cutoff type but need to provide additional
# population summary statistics for the functional population
cs_results_c <- claus_2020 |>
cs_statistical(
id,
time,
hamd,
pre = 1,
post = 4,
m_functional = 8,
sd_functional = 8,
cutoff_type = "c"
)
cs_results_c
summary(cs_results_c)
plot(cs_results_c)
# You can use a different method to calculate the cutoff
cs_results_ha <- claus_2020 |>
cs_statistical(
id,
time,
hamd,
pre = 1,
post = 4,
m_functional = 8,
sd_functional = 8,
reliability = 0.80,
cutoff_type = "c",
cutoff_method = "HA"
)
cs_results_ha
summary(cs_results_ha)
plot(cs_results_ha)
# And you can group the analysis by providing a grouping variable from the data
cs_results_grouped <- claus_2020 |>
cs_statistical(
id,
time,
hamd,
pre = 1,
post = 4,
m_functional = 8,
sd_functional = 8,
cutoff_type = "c",
group = treatment
)
cs_results_grouped
summary(cs_results_grouped)
plot(cs_results_grouped)
Run the code above in your browser using DataLab