ff_auc: Function for AUC estimation

View source: R/04_predict.R

ff_aucR Documentation

Function for AUC estimation

Description

Function for AUC estimation

Usage

ff_auc(params, x_new, curve, fixed_params = NA, n_points = 1000)

Arguments

params

A vector of parameter values.

x_new

A vector of size 2 given the interval to calculate the area under.

curve

A string. The name of the function used for curve fitting.

fixed_params

A vector of fixed parameter values. NA by default.

n_points

Numeric value giving the number of points to use in the trapezoidal method.

Value

Area under the fitted curve.

Examples

library(flexFitR)
data(dt_potato)
mod_1 <- dt_potato |>
  modeler(
    x = DAP,
    y = Canopy,
    grp = Plot,
    fn = "fn_lin_plat",
    parameters = c(t1 = 45, t2 = 80, k = 0.9),
    subset = c(15, 2, 45)
  )
print(mod_1)
# AUC Prediction
predict(mod_1, x = c(0, 108), type = "auc", id = 2)

flexFitR documentation built on April 16, 2025, 5:09 p.m.