Version 1.0.0 replaces the sampler of version 0.2.0. This vignette lists what changed and why. It then checks the new sampler on its building blocks, against a plain R version of itself, on simulated data, and on the published analysis (vignette 3).
2 Corrections to version 0.2.0
Version 0.2.0
Now
bayes_ammi() read the earlier trial from objects in the workspace (n0, mu0, tau0, lambdas0, …) and stopped with “object ‘n0’ not found” without them
the earlier trial is the argument .prior_data; vague priors without it
the singular values were computed once and never sampled
drawn every iteration from their truncated normal conditional (eq. 2.15)
tau1 held a precision drawn from a residual matrix computed once before the loop
tau1 holds the draws of \(\sigma^2\), from the current residuals
the scores were drawn without their constraints and orthogonalised afterwards
von Mises-Fisher draws on the constrained spheres, with pair moves when all terms are fitted
help page of cultivo2009 described another data set
900 rows: site, rep, entry, y
The tables and effects (bys_ls_means(), bys_ls_var(), bys_ls_gen_effects(), bys_ls_env_effects(), bys_ls_ge_effects(), bys_ls_ammi(), bys_contrasts(), bys_orthonormal()) return the numbers of version 0.2.0 (test test-helpers.R).
Vignette 3 compares the 38 linear effects of Table B.1, \(\sigma\), the singular values and the significant scores of Table 2. The test test-perez2012.R repeats the comparison of Table B.1 and \(\sigma\).
quantity
<char>
1: posterior mean of mu with the first year as prior and equal weights: the average of the two yearly grand means
2: posterior mean of alpha_7: the average of the yearly genotype effects
3: posterior mean of beta_5: the average of the yearly environment effects
value computed agrees
<int> <num> <lgcl>
1: 3848 3848.2749 TRUE
2: 499 499.1293 TRUE
3: 1536 1535.5777 TRUE
7 References
Perez-Elizalde, S., Jarquin, D. and Crossa, J. (2012). A general Bayesian estimation method of linear-bilinear models applied to plant breeding trials with genotype x environment interaction. Journal of Agricultural, Biological, and Environmental Statistics, 17, 15–37. doi:10.1007/s13253-011-0063-9
Crossa, J., Perez-Elizalde, S., Jarquin, D., Cotes, J. M., Viele, K., Liu, G. and Cornelius, P. L. (2011). Bayesian estimation of the additive main effects and multiplicative interaction model. Crop Science, 51(4), 1458–1469. doi:10.2135/cropsci2010.06.0343
Hoff, P. D. (2009). Simulation of the matrix Bingham-von Mises-Fisher distribution, with applications to multivariate and relational data. Journal of Computational and Graphical Statistics, 18(2), 438–456.
Wood, A. T. A. (1994). Simulation of the von Mises Fisher distribution. Communications in Statistics - Simulation and Computation, 23(1), 157–164.