derive_outcome_sub Calculates new outcomes by subtracting one outcome from another. If function returns NULL then no derived data are present. Any observation outcome sets that already have a result outcome associated with them are removed.

derive_outcome_sub(Data, target = 120, subtract = 150, result = 124)

Arguments

Data

An ERA data.table (e.g. ERAg::ERA.Compiled).

target

ERA outcome code of target outcome (see ERAg::OutcomeCodes)

subtract

ERA outcome code of outcome that will be substracted from the target outcome (see ERAg::OutcomeCodes)

result

ERA outcome code for the resulting values (see ERAg::OutcomeCodes)