Interpolates observed data based on simulated data.
addPredictedValues.RdThis function performs linear extrapolation for increasing yValues and logarithmic interpolation for decreasing yValues based on the specified grouping identifiers. It modifies the input dtObserved data.table by adding a new column with the predicted values.
Arguments
- dtObserved
A data.table containing observed data with columns `xValues`, `yValues`, and grouping identifiers.
- dtSimulated
A data.table containing simulated data with columns `xValues` and `yValues`.
- identifier
A character vector of column names used for grouping in the extrapolation and interpolation process.