The coefficients calculated by Edwards (1997) and returned by
edwards_coefs()
were designed to produce reasonable results
for several general cases, however each source water will have
a set of empirical coefficients that produce more accurate
predictions than the general case. This function calculates
the optimal coefficients given a test set of known initial
values (DOC)
fit_edwards_optim(
data,
initial_coefs = edwards_coefs("Al"),
optim_params = list()
)
fit_edwards_coefs(coefs, data = edwards_data("empty"))
# S3 method for edwards_fit_optim
coef(object, ...)
# S3 method for edwards_fit_coefs
coef(object, ...)
# S3 method for edwards_fit_base
predict(object, newdata = NULL, ...)
coagulate_grid(
object,
DOC,
UV254,
dose = seq(0.01, 2, length.out = 50),
pH = seq(5, 8, length.out = 50)
)
# S3 method for edwards_fit_base
fitted(object, ...)
# S3 method for edwards_fit_base
residuals(object, ...)
# S3 method for edwards_fit_base
tidy(x, ...)
# S3 method for edwards_fit_base
glance(x, ...)
# S3 method for edwards_fit_base
print(x, ...)
# S3 method for edwards_fit_base
plot(x, ...)
A data frame with columns
DOC
(mg/L), dose
(mmol/L), pH
(pH units), UV254
(1/cm), and
DOC_final
(mg/L). See coagulate()
for more information.
Additional arguments to be passed to stats::optim()
.
A set of initial coefficients from which to
start the optimisation. Most usefully one of the coefficient
sets returned by edwards_coefs()
.
A fit objected created with fit_edwards_optim()
.
Not used.
A data frame with columns
DOC
(mg/L), dose
(mmol/L), pH
(pH units), and UV254
(1/cm). If
omitted, the data used to fit the model is used.
The initial DOC concentration (mg/L).
The absorbance of UV254 (1/cm). With DOC
,
used to calculate SUVA.
The coagulant metal concentration (Al3+ or Fe3+) in mmol/L.
The pH of coagulation.
An S3 of type "edwards_fit_optim" with components:
References to inputs.
The fit object returned by stats::optim()
.