dropout_weibull: Use the Weibull distribution to specify the dropout process

View source: R/missing_data.R

dropout_weibullR Documentation

Use the Weibull distribution to specify the dropout process

Description

Used as input to the dropout-argument in study_parameters

Usage

dropout_weibull(proportion, rate)

Arguments

proportion

Total proportion of subjects that have dropped out at the last time point. Must be less than 1.

rate

Indicates the "shape" of the dropout process, if > 1 then dropout is concentrated at the end of the study, if rate < 1 more dropout occurs at the beginning of the study. If rate == 1 the risk of dropout is constant.

Details

N.B a constant (rate = 1) hazard of dropout does not mean dropout is linear over time. It means that the risk of dropping out at the next time point is constant over the study period.

Value

A plcp_weibull named list, with the first element containing the dropout function.

References

Galbraith, S., Stat, M., & Marschner, I. C. (2002). Guidelines for the design of clinical trials with longitudinal outcomes. Controlled clinical trials, 23(3), 257-273.

See Also

dropout_manual, per_treatment

Examples

p <- study_parameters(n1 = 11,
                      n2 = 5,
                      n3 = 6,
                      T_end = 10,
                      icc_pre_subject = 0.5,
                      icc_pre_cluster = 0,
                      var_ratio = 0.03,
                      icc_slope = 0.05,
                      dropout = dropout_weibull(proportion = 0.3, rate = 3),
                      cohend = -0.8)

get_dropout(p)
plot(p, plot = 2)

# Different per treatment
tx <- dropout_weibull(proportion = 0.3, rate = 3)
cc <- dropout_weibull(proportion = 0.3, rate = 1/3)
dropout <- per_treatment(control = cc,
                         treatment = tx)

p <- study_parameters(n1 = 11,
                      n2 = 5,
                      n3 = 6,
                      T_end = 10,
                      icc_pre_subject = 0.5,
                      icc_pre_cluster = 0,
                      var_ratio = 0.03,
                      icc_slope = 0.05,
                      dropout = dropout,
                      cohend = -0.8)

plot(p, plot = 2)

# Compare power for different dropout amounts
dropout <- c(dropout_weibull(proportion = 0.3, rate = 3),
             dropout_weibull(proportion = 0.5, rate = 3),
             dropout_weibull(proportion = 0.5, rate = 1/3))

p <- study_parameters(n1 = 11,
                      n2 = 5,
                      n3 = 6,
                      T_end = 10,
                      icc_pre_subject = 0.5,
                      icc_pre_cluster = 0,
                      var_ratio = 0.03,
                      icc_slope = 0.05,
                      dropout = dropout,
                      cohend = -0.8)

get_power(p)

rpsychologist/powerlmm documentation built on May 11, 2023, 12:24 a.m.