| Title: | Disease Infection Intensity and Progress Analysis Tools |
|---|---|
| Description: | Analyzes plant disease intensity and its progression over time using the infection intensity index proposed by Czermainski (1999) <doi:10.1590/S0100-204X1999000900004> and the disease index associated with McKinney (1923) <https://babel.hathitrust.org/cgi/pt?id=uc1.b3610175>. Provides generalized estimating equation (GEE) models, area under the disease progress curve (AUDPC), area under the disease progress stairs (AUDPS), outlier detection, sensitivity analysis, estimated marginal means, temporal trend analysis, and graphical visualization. |
| Authors: | Carlos Augusto Dórea Bragança [aut, cre] (Universidade Federal do Recôncavo da Bahia (UFRB)), Malena Andrade Nogueira [aut] (Universidade Federal do Recôncavo da Bahia (UFRB)) |
| Maintainer: | Carlos Augusto Dórea Bragança <[email protected]> |
| License: | GPL-3 |
| Version: | 0.1.0 |
| Built: | 2026-11-28 22:15:15 UTC |
| Source: | https://github.com/cran/infectionIndex |
Calculates the generalized infection intensity index proposed by Czermainski (1999) for observations classified into ordered disease classes.
amaral_czermainski_I(freq_by_class, return_omega = FALSE)amaral_czermainski_I(freq_by_class, return_omega = FALSE)
freq_by_class |
Numeric vector of non-negative absolute frequencies ordered from class 0 (absence of disease) to class J (highest disease intensity). |
return_omega |
Logical. If |
Let F0, ..., FJ denote the absolute frequencies in J + 1 ordered disease classes, from absence of disease (F0) to maximum disease intensity (FJ). For j = 1, ..., J, the conditional frequency is
Let p{j-1,J} denote the cumulative relative frequency from class j - 1 through class J:
The weights k_j are defined so that their cumulative values satisfy
The angular quantity omega is calculated as
and the infection intensity index is
Calculations are performed in radians. Therefore, when
return_omega = TRUE, the returned value of omega is in radians.
The order of freq_by_class is essential: frequencies must be
supplied from the lowest disease class (F0) to the highest (FJ).
A numeric infection intensity index between 0 and 1. If
return_omega = TRUE, a named numeric vector containing omega
(in radians) and I.
Czermainski, A. B. C. (1999). Generalizacao de um indice de intensidade de infeccao em experimentos de avaliacao de doencas em plantas. Pesquisa Agropecuaria Brasileira, 34(9), 1545-1555. doi:10.1590/S0100-204X1999000900004
freq <- c(19, 9, 4, 5, 6, 7) amaral_czermainski_I(freq) amaral_czermainski_I(freq, return_omega = TRUE)freq <- c(19, 9, 4, 5, 6, 7) amaral_czermainski_I(freq) amaral_czermainski_I(freq, return_omega = TRUE)
Fits generalized estimating equation (GEE) models to angular-transformed disease intensity. Compares a model without treatment-by-time interactions against a model including these interactions. Supports single-factor and factorial experimental designs.
gee_di( data_longo, corstr = c("ar1", "exchangeable", "independence", "unstructured"), do_anova = TRUE, factors = "trat" )gee_di( data_longo, corstr = c("ar1", "exchangeable", "independence", "unstructured"), do_anova = TRUE, factors = "trat" )
data_longo |
Long-format data frame with |
corstr |
Working correlation structure: |
do_anova |
If |
factors |
Character vector naming treatment-factor columns.
The default |
The experimental unit is identified by unit; if absent, it is derived
from block and the combination of factors specified in factors.
Invisibly returns a list containing gee0 (model without
treatment-by-time interactions), gee1 (model with interactions),
comp (comparison result when do_anova = TRUE, otherwise NULL),
and predictions (prediction grid). When Wald inference is numerically
unreliable, such as under near-zero dispersion, its statistic and
p-value may be returned as NA rather than a spurious inference.
Calculates the disease index described by McKinney from absolute frequencies distributed among ordered disease classes.
mckinney_I(freq_by_class, scores = NULL)mckinney_I(freq_by_class, scores = NULL)
freq_by_class |
Numeric vector of non-negative absolute frequencies ordered from the lowest to the highest disease class. |
scores |
Optional numeric vector containing the scores assigned to
the disease classes. It must have the same length as
|
The index is calculated as
where F_j is the absolute frequency in class j, x_j is the score assigned to that class, n is the total number of observations, and x_max is the maximum score.
If scores = NULL, equally spaced scores from 0 to J are used.
The returned index is expressed on a 0 to 1 scale rather than as
a percentage.
A numeric disease index between 0 and 1.
McKinney, H. H. (1923). Influence of soil temperature and moisture on infection of wheat seedlings by Helminthosporium sativum. Journal of Agricultural Research, 26, 195–217. https://babel.hathitrust.org/cgi/pt?id=uc1.b3610175
freq <- c(19, 9, 4, 5, 6, 7) mckinney_I(freq) mckinney_I( c(10, 5, 3, 2, 1), scores = c(0, 0.75, 1, 2, 3) )freq <- c(19, 9, 4, 5, 6, 7) mckinney_I(freq) mckinney_I( c(10, 5, 3, 2, 1), scores = c(0, 0.75, 1, 2, 3) )
Plot treatment-specific curves over time
plot_curves_by_trat(data)plot_curves_by_trat(data)
data |
Data frame containing the columns |
A ggplot object.
Analyzes disease intensity and progression from an XLSX workbook in long or wide format. Computes the Czermainski or McKinney intensity index, angular transformation, generalized estimating equation (GEE) models, predictions, area under the disease progress curve (AUDPC) or area under the disease progress stairs (AUDPS), outlier detection, and sensitivity analysis with optional refitting.
run_di_pipeline( excel_file, sheet_prefer = NULL, index = c("czermainski", "mckinney"), corstr = c("ar1", "exchangeable", "independence", "unstructured"), progress_metric = c("audpc", "audps"), outdir = NULL, save_outputs = FALSE, outlier_action = c("flag", "remove_all"), factors = "trat" )run_di_pipeline( excel_file, sheet_prefer = NULL, index = c("czermainski", "mckinney"), corstr = c("ar1", "exchangeable", "independence", "unstructured"), progress_metric = c("audpc", "audps"), outdir = NULL, save_outputs = FALSE, outlier_action = c("flag", "remove_all"), factors = "trat" )
excel_file |
Path to the |
sheet_prefer |
Preferred worksheet name; automatically detected if |
index |
Disease intensity index: |
corstr |
GEE working correlation structure: |
progress_metric |
Disease progression metric used for summaries,
outlier detection, and subsequent analyses: |
outdir |
Output directory for CSV, PNG, and RDS files. Must be
explicitly provided when |
save_outputs |
Logical. If |
outlier_action |
Action for detected outliers: |
factors |
Character vector naming treatment-factor columns.
The default |
The design may contain one or several treatment factors. Experimental
units are identified by unit; when absent, this identifier is derived
from block and the combination of columns specified in factors.
A list with out (analysis of the complete data), out_clean
(sensitivity-analysis refit when outliers are removed), and outliers
(information on detected and optionally removed experimental units).
For legacy single-factor designs, nonparametric tests associated with
the progression metric are also provided. These tests are not
automatically computed for multiple treatment factors.