Every number the package computes is checked by its tests against an independent calculation. This vignette shows the main checks and lists the results that differ from version 0.6.0, with the reason for each change.
2 Closed forms against the exact decomposition
The analyses use Griffing’s closed forms. The package also contains the explicit least-squares projection of the cell means (DiallelAnalysisR:::.da_griffing_decompose()), used only to check them:
set.seed(seed =1)check <-function(P, m) { M <-matrix(data =rnorm(n = P * P, mean =50, sd =10), nrow = P, ncol = P)if (m %in%c(2, 4)) M[lower.tri(M)] <-NAif (m %in%c(3, 4)) diag(M) <-NA cf <- DiallelAnalysisR:::.da_griffing_closed(M, m) ex <- DiallelAnalysisR:::.da_griffing_decompose(M, m)max(abs(c(cf$ss - ex$ss, cf$g - ex$g, cf$ems - ex$ems)))}outer(X =5:9, Y =1:4, FUN =Vectorize(check))
The checks above compare the package with exact computations. The numerical example of Griffing (1956) adds a comparison with the published tables: the means of 36 maize crosses in Table 6 (data set Griffing56), analysed with Method 4 from the table of means by GriffingMeans() with the error mean squares of Table 7 divided by the 78 plants of a cross mean. The file reference.csv of the package holds 77 values from Tables 8, 9, 10 and 13: mean squares, variance components and standard errors of Model I and Model II for total yield, cob weight and shelled corn. da_reference() recomputes each of them:
The values that differ do so in the last printed digit, because Table 6 prints the means to one decimal place while Griffing worked from unrounded means:
Only Griffing’s own tables are used: the values printed in a book can be compared in the same way by adding rows to reference.csv (a call, the expression that extracts the number, the printed value and its number of decimals).
6 Summary
The analyses of variance, effects and components of version 0.6.0 are confirmed wherever they were right; the corrections above concern standard errors, three lines of Hayman’s analysis with other than four replicates, two genetic components and the use of the column arguments.
7 References
Griffing, B. (1956). Concept of general and specific combining ability in relation to diallel crossing systems. Australian Journal of Biological Sciences, 9(4), 463–493.
Hayman, B. I. (1954). The theory and analysis of diallel crosses. Genetics, 39(6), 789–809.
Hayman, B. I. (1954). The analysis of variance of diallel tables. Biometrics, 10(2), 235–244.