reduce_condition_pcnts: Reduce Condition Percents

View source: R/utils_reduce_condition_pcnts.R

reduce_condition_pcntsR Documentation

Reduce Condition Percents

Description

For each group, the sum of the "pcnt" value for each condition must not exceed 100 iterates reducing the percents equally of the other conditions.

Usage

reduce_condition_pcnts(conditions, current_conditions)

Arguments

conditions

the conditions (from params$groups[[.x]]$conditions)

current_conditions

the names of conditions to reduce by, initially all except the condition that has been changed

Details

If at any point the amount that we need to reduce (equally) by exceeds the smallest value, then we reduce all by the smallest group, then remove the smallest group and iterate.

Value

the altered conditions


The-Strategy-Unit/723_mh_covid_surge_modelling documentation built on April 13, 2022, 8:52 a.m.