simplify_likelihood_levels: Simplify likelihood levels

simplify_likelihood_levelsR Documentation

Simplify likelihood levels

Description

Collapse levels on a likelihood factor into smaller categories. For example "Likely improving" and "Very likely improving" are collapsed into a single level "Likely or very likely improving".

Usage

simplify_likelihood_levels(x)

Arguments

x

The vector with the likelihoods. Must be a factor or a character string

Value

A factor with simple categories

See Also

Other likelihood functions: get_likelihood_category, order_likelihood_levels

Examples

p <- seq(0, 1, length.out = 11)

get_likelihood_category(p) %>%
  order_likelihood_levels() %>%
  simplify_likelihood_levels()


StatisticsNZ/er.helpers documentation built on Oct. 2, 2023, 7:24 a.m.