A wrapper to create a quadratic model for curve data.
Usage
create_quad_model(
curve_data,
conc_var,
signal_var,
dilution_data = lifecycle::deprecated()
)
Value
A linear model object from stats:lm()
with formula
signal_var ~ conc_var + I(conc_var * conc_var)
from data curve_data
.
Examples
concentration <- c(10, 20, 40, 60, 80, 100)
signal <- c(22561, 31178, 39981, 48390, 52171, 53410)
curve_data <- data.frame(Concentration = concentration,
Signal = signal)
quad_model <- create_quad_model(
curve_data,
"Concentration",
"Signal"
)
quad_model
#>
#> Call:
#> stats::lm(formula = quad_formula, data = curve_data)
#>
#> Coefficients:
#> (Intercept) Concentration
#> 15877.375 783.219
#> I(Concentration * Concentration)
#> -4.089
#>