CoOL_6_number_of_sub_groups: Number of subgroups

CoOL_6_number_of_sub_groupsR Documentation

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

risk_contributions

The risk contributions.

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

restore_par_options

Restore par options.

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

#See the example under CoOL_0_working_example

CoOL documentation built on May 24, 2022, 5:04 p.m.