CoOL_6_number_of_sub_groups: Number of subgroups
Description
Calculates the mean distance by several number of subgroups to determine the optimal number of subgroups.
Usage
CoOL_6_number_of_sub_groups(
risk_contributions,
low_number = 1,
high_number = 5,
ipw = 1,
restore_par_options = TRUE
)
Arguments
low_number
The lowest number of subgroups.
high_number
The highest number of subgroups.
ipw
a vector of weights per observation to allow for inverse probability of censoring weighting to correct for selection bias
Value
A plot of the mean distance by the number of subgroups. The mean distance converges when the optimal number of subgroups are found.
Examples
Run this code# NOT RUN {
#See the example under CoOL_0_working_example
# }
Run the code above in your browser using DataLab