Skip to contents

Applies the correction fitted by slope_bias() to new predictions.

Usage

# S3 method for class 'specproc_slope_bias'
predict(object, newdata, ...)

Arguments

object

The result of slope_bias().

newdata

Predictions of the model for new secondary spectra.

...

Not used.

Value

The corrected predictions.

See also

Examples

set.seed(1)
reference <- runif(20, 0.5, 4)
predicted <- 0.2 + 1.1 * reference + rnorm(20, sd = 0.05)
predict(slope_bias(predicted, reference), c(1.3, 2.4, 3.5))
#> [1] 0.9694174 1.9887610 3.0081046