outcome1
/outcome2
) or subtracting (outcome1
- outcome2
). 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.Rd
derive_outcome
Calculates new outcomes by dividing (outcome1
/outcome2
) or subtracting (outcome1
- outcome2
). 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(
Data,
outcome_col = "Out.SubInd",
outcome1,
outcome2,
outcome_result,
operation = "subtract",
match_fields,
val_col1 = "MeanT",
val_col2 = "MeanC"
)
An ERA data.table (e.g. ERAg::ERA.Compiled
).
Column in Data
containing the outcome labels for outcome1
and outcome2
Set outcome1
name for dividing (outcome1
/outcome2
) or subtracting (outcome1
- outcome2
) outcomes
Set outcome2
name for dividing (outcome1
/outcome2
) or subtracting (outcome1
- outcome2
) outcomes
Set code of outcome to added to the Outcode
field
Choose subtract
or divide
Select fields within Data
that can match identical observation contexts for outcome1
and outcome2
Field in Data
that contains value of outcome1
Field in Data
that contains value of outcome2