NEWS
agriDQ 0.1.0
First CRAN release
New functions
check_outliers() — univariate outlier detection (IQR fence, Z-score,
Hampel identifier, Grubbs, Dixon Q-test) with consensus flagging.
S3 print and plot methods included.
check_outliers_mv() — Mahalanobis distance multivariate outlier
detection with optional robust (MCD) covariance and ridge regularisation
for near-singular matrices.
check_missing() — missing data analysis with Little's MCAR test
(internal implementation), pattern matrix, mechanism classification,
and missingness heatmap.
classify_missing() — per-variable logistic regression to classify
missingness as MCAR, MAR, or MNAR.
check_normality() — battery of six normality tests (Shapiro-Wilk,
Anderson-Darling, Kolmogorov-Smirnov, Lilliefors, Pearson chi-square,
Jarque-Bera) with skewness/kurtosis diagnostics and consensus
recommendation. Jarque-Bera is implemented internally with no external
dependency.
check_homogeneity() — Bartlett, Levene (Brown-Forsythe, center =
median), and Fligner-Killeen tests for homogeneity of variance with
practical variance ratio.
check_independence() — Durbin-Watson, Breusch-Godfrey, and
Wald-Wolfowitz runs tests for independence of residuals, with ACF plot.
check_design() — experimental design validation for CRD, RCBD, LSD,
and factorial designs: balance, completeness, error df (Gomez & Gomez
guideline), and missing treatment combinations.
check_qualitative() — categorical variable quality checks: case
inconsistency, whitespace, near-duplicate labels (Levenshtein, long
labels only), unexpected levels, and rare categories.
standardise_labels() — automatic label standardisation with case
conversion and lookup-table replacement.
run_dq_pipeline() — single-call full pipeline runner returning a
master summary data frame.
generate_dq_report() — automated self-contained HTML report with
green/amber/red scorecard.
Data
agri_trial — simulated RCBD wheat variety trial (20 plots, 4
treatments T1-T4, 5 blocks B1-B5) with one intentional outlier and
one missing value for demonstration.
Notes
- All skewness, kurtosis, and Jarque-Bera calculations are implemented
internally, eliminating the dependency on the
moments package.
- Grubbs and Dixon Q-tests are implemented internally, eliminating the
dependency on the
outliers package.
- Little's MCAR test is implemented internally, eliminating the
dependency on
BaylorEdPsych or MissMech.
- The package requires R >= 4.1.0.