Apply calibration
iso_apply_calibration( dt, predict, calibration = last_calibration(dt), predict_range = NULL, calculate_error = FALSE, predicted_value = suffix(enexpr(predict), "_pred"), predicted_error = suffix(sym(predicted_value), "_se"), quiet = default(quiet) )
dt | nested data table with |
---|---|
predict | which value to calculate, must be the regression's independent variable (regression is applied directly) or one of the independent variables (regression will be automatically inverted). |
calibration | name of the calibration to apply, must match the name used in iso_generate_calibration (if any) |
predict_range | vector of 2 numbers. Only relevant for predicting dependent variables (regression inversion). If provided will be used for finding the solution for the predict variable. By default uses the range observed in the calibration variables. Specifying the |
calculate_error | whether to estimate the standard error from the calibration. Stores the result in the new |
predicted_value | the name of the column for the predicted value. By default the name of the |
predicted_error | the name of the column for the predicted error. By default |
quiet | whether to display (quiet=FALSE) or silence (quiet = TRUE) information messages. |
the data table with the following columns added to the nested all_data
\:
predicted_value
column, usually predict
column name with suffix _pred
: the predicted value from applying the calibration
codepredicted_value column, usually predict
column name with suffix _pred_se
: the error of the predicated value propagated from the calibration. Only created if calculate_error = TRUE
.
Other calibration functions:
iso_add_standards()
,
iso_evaluate_calibration_range()
,
iso_generate_calibration()
,
iso_get_calibration_coefficients()
,
iso_get_calibration_data()
,
iso_get_calibration_range()
,
iso_get_calibration_summary()
,
iso_get_problematic_calibrations()
,
iso_prepare_for_calibration()
,
iso_remove_problematic_calibrations()