View source: R/functional_dsp.R
| functional_contrast | R Documentation |
Calculates functional contrast curves (Disease Suppression Profiles - DSP) between a reference treatment (e.g., untreated control) and other fungicide treatments over time. The DSP is defined by default as:
DSP(t) = y_{control}(t) - y_{treatment}(t)
where y(t) is the disease intensity at time t. The goal is to evaluate
the intensity, timing, and persistence of the fungicide protection.
functional_contrast(
data,
time = "time",
response = "response",
treatment = "treatment",
reference = "Control",
group = NULL,
smooth = FALSE,
grid = NULL,
contrast = c("difference", "relative"),
keep_reference = FALSE,
...
)
data |
A data frame containing disease progress observations, or an object of class |
time |
Character string naming the time variable. |
response |
Character string naming the response variable. |
treatment |
Character string naming the treatment variable. |
reference |
Character string specifying the reference treatment level. Default is |
group |
Optional character vector of grouping variables (e.g., |
smooth |
Logical; if |
grid |
Optional numeric vector of common time points for interpolation. If provided, curves are interpolated. |
contrast |
Character specifying the contrast type. Currently |
keep_reference |
Logical; if |
... |
Additional arguments. |
An object of class "functional_dsp" (inheriting from "tbl_df"), containing:
grouping variables (if any)
treatment variable
time variable
y_reference: disease intensity of the reference
y_treatment: disease intensity of the treatment
DSP: the computed contrast
contrast_type: type of contrast used
reference: name of the reference treatment
functional_summary, plot_dsp
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.