Skip to contents

Every statistic of AgriDesign is checked against an independent implementation: functions of base R, established R packages, worked examples of textbooks and software manuals, and closed-form results. The checks are scripts in the validation/ folder of the source repository; each prints one line per comparison and the number of checks passed. At the time of writing all 540 checks pass. The package itself depends on no other package: the reference packages are used only by these scripts.

Script Checks Compared with
v01-anova.R 29 aov() with Error() strata, car (Type III), emmeans, agricolae (sp.plot)
v02-assumptions-nonpar.R 38 shapiro.test, nortest, car (Levene, Durbin-Watson), MASS (boxcox), friedman.test, kruskal.test, oneway.test, PMCMRplus, ARTool, rcompanion
v03-means.R 47 TukeyHSD, pairwise.t.test, agricolae, mvtnorm, PMCMRplus, emmeans, lmerTest
v04-figures.R 17 the numbers of each analysis against what is drawn; file formats and resolution
v05-generator.R 31 structure over many seeds, uniformity tests, power.t.test
v06-report.R 30 the figures of the analysis in the HTML, well-formed and self-contained pages
v07a-designs.R 63 closed forms of efficiency factors, agricolae designs, lme4 + emmeans (REML)
v07b-breeding.R 199 agricolae, lm, svd, lme4, exact enumeration of F2 populations and of rank distributions
v07c-tests-pathology.R 86 a SAS manual example, an independent double integral, PMCMRplus, chisq.test, fisher.test, agricolae

Notes on the comparisons

Different programs may follow different conventions, formulas or numerical approximations. When two of them gave different numbers, the validation looked for a third, independent answer (an exact enumeration, a closed form or a high-precision computation), and the script states the reason. The notes below are meant to help users who compare AgriDesign with other software; they refer to the versions used in the validation.

  • Dunnett’s critical value. AgriDesign integrates the multivariate t with Gauss-Legendre quadrature, using the exact correlation of every pair, and agrees with mvtnorm at high precision (2.7273 for four comparisons and 15 error degrees of freedom). Quasi-Monte Carlo integration with its default tolerance, as in multcomp, gives values within about 1e-3 (2.7251).
  • Efficiency of alpha designs. agricolae::design.alpha() reports the upper bound of Patterson and Williams for the parameters of the design. design_efficiency() reports both the efficiency factor of the layout itself and that bound (0.5946 and 0.6471 for 12 treatments in blocks of 3 with 2 replicates).
  • Latin squares. Permuting the rows, columns and symbols of a cyclic square reaches 432 of the 576 Latin squares of order 4. AgriDesign draws them uniformly with the Jacobson-Matthews chain.
  • North Carolina design III. AgriDesign estimates the dominance variance as the males x testers component, which an exact enumeration of an F2 population confirms; implementations that define this component per interaction effect report twice that value.
  • Line x tester. The average covariance of half-sibs uses the factor (l + t - 2) of the weighted mean square, the covariance of full-sibs keeps every term of the formula of Singh and Chaudhary, and the dominance variance is 4 sigma2_SCA / (1 + F)^2.
  • Huehn’s S(1). Its variance includes the factor (K^2 - 1) / K^2, as the exact null distribution confirms.
  • Waller-Duncan. The critical t agrees with the SAS manual example and with an independent double integral. Series approximations may differ in the third decimal when the treatments have one degree of freedom or when F is large.
  • Median test. The continuity correction is compared with chisq.test() on the same tables. When comparing with other implementations, check that the correction is applied in both.
  • van der Waerden test. Rounding the ranks before the normal scores changes the statistic in the fourth significant digit; AgriDesign does not round.
  • Power. AgriDesign uses the noncentral t. A shifted central t gives lower power with few error degrees of freedom (0.21 instead of 0.245 for a CV of 15 %, a difference of 15 % and four replicates).