Skip to main content
Log in

Bayesian inference of mixed models in quantitative genetics of crop species

  • Original Paper
  • Published:
Theoretical and Applied Genetics Aims and scope Submit manuscript

Abstract

The objectives of this study were to implement a Bayesian framework for mixed models analysis in crop species breeding and to exploit alternatives for informative prior elicitation. Bayesian inference for genetic evaluation in annual crop breeding was illustrated with the first two half-sib selection cycles in a popcorn population. The Bayesian framework was based on the Just Another Gibbs Sampler software and the R2jags package. For the first cycle, a non-informative prior for the inverse of the variance components and an informative prior based on meta-analysis were used. For the second cycle, a non-informative prior and an informative prior defined as the posterior from the non-informative and informative analyses of the first cycle were used. Regarding the first cycle, the use of an informative prior from the meta-analysis provided clearly distinct results relative to the analysis with a non-informative prior only for the grain yield. Regarding the second cycle, the results for the expansion volume and grain yield showed differences among the three analyses. The differences between the non-informative and informative prior analyses were restricted to variance components and heritability. The correlations between the predicted breeding values from these analyses were almost perfect.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2

Similar content being viewed by others

References

  • Bauer AM, Reetz TC, Léon J (2006) Estimation of breeding values of inbred lines using best linear unbiased prediction (BLUP) and genetic similarities. Crop Sci 46:2685–2691

    Article  CAS  Google Scholar 

  • Bauer AM, Reetz TC, Hoti F, Schuh WD, Léon J, Sillanpää MJ (2009) Bayesian prediction of breeding values by accounting for genotype-by-environment interaction in self-pollinating crops. Genet Res 91:193–207

    Article  CAS  Google Scholar 

  • Beaumont MA, Rannala B (2004) The Bayesian revolution in genetics. Nat Rev Genet 5:251–261

    Article  PubMed  CAS  Google Scholar 

  • Bink MCAM, Boer MP, ter Braak CJF, Jansen J, Voorrips RE, van de Weg WE (2008) Bayesian analysis of complex traits in pedigreed plant populations. Euphytica 161:85–96

    Article  Google Scholar 

  • Blasco A (2001) The Bayesian controversy in animal breeding. J Anim Sci 79:2023–2046

    PubMed  CAS  Google Scholar 

  • Bulmer MG (1980) The mathematical theory of quantitative genetics. Clarendon Press, Oxford

    Google Scholar 

  • Damgaard LH (2007) How to use WinBUGS to draw inferences in animal models. J Anim Sci 85:1363–1368

    Article  PubMed  CAS  Google Scholar 

  • Flachenecker C, Frisch M, Falke KC, Melchinger AE (2006) Modified full-sib selection and best linear unbiased prediction of progeny performance in a European F2 maize population. Plant Breed 125:248–253

    Article  Google Scholar 

  • García-Cortés LA, Sorensen D (1996) On a multivariate implementation of the Gibbs sampler. Genet Sel Evol 28:121–126

    Article  Google Scholar 

  • García-Cortés LA, Cabrillo C, Moreno C, Varona L (2001) Hypothesis testing for the genetic background of quantitative traits. Genet Sel Evol 33:3–16

    Article  PubMed  Google Scholar 

  • Geweke J (1992) Evaluating the accuracy of sampling-based approaches to the calculation of the posterior moments. In: Bernardo JM, Berger JO, Dawid AP, Smith AFM (eds) Bayesian Statistics 4. Oxford University Press, Oxford, pp 490–492

    Google Scholar 

  • Gilmour AR, Gogel BJ, Cullis BR, Thompson R (2009) ASReml User Guide Release 3.0. VSN International Ltd, Hemel Hempstead, HP1 1ES, UK

  • Hadfield JD (2010) MCMC methods for multi-response generalized linear mixed models: the MCMCglmm R package. J Stat Soft 33:1–22

    Google Scholar 

  • Hadfield JD, Nakagaw S (2010) General quantitative genetic methods for comparative biology: phylogenies, taxonomies and multi-trait models for continuous and categorical characters. J Evol Biol 23:494–508

    Article  PubMed  CAS  Google Scholar 

  • Hallander J, Waldmann P (2007) The effect of non-additive genetic interactions on selection in multi-locus genetic models. Heredity 98:349–359

    PubMed  CAS  Google Scholar 

  • Hallander J, Waldmann P, Wang C, Sillanpää MJ (2010) Bayesian inference of genetic parameters based on conditional decompositions of multivariate normal distributions. Genetics 185:645–654

    Article  PubMed  CAS  Google Scholar 

  • Harville DA, Carriquiry AL (1992) Classical and Bayesian prediction as applied to an unbalanced mixed linear model. Biometrics 48:987–1003

    Article  Google Scholar 

  • Hedges LV, Olkin I (1985) Statistical methods for meta-analysis. Academic Press, Orlando

    Google Scholar 

  • Henderson CR (1974) General flexibility of linear model for sire evaluation. J Dairy Sci 57:963–972

    Article  Google Scholar 

  • Littell RC, Milliken GA, Stroup WW, Wolfinger RD, Schabenberger O (2006) SAS for mixed models, 2nd edn. SAS Institute Inc., Cary

    Google Scholar 

  • Lunn D, Spiegelhalter D, Thomas A, Best N (2009) The BUGS project: evolution, critique and future directions (with discussion). Stat Med 28:3049–3082

    Article  PubMed  Google Scholar 

  • Marttinen P, Corander J (2010) Efficient Bayesian approach for multilocus association mapping including gene–gene interactions. BMC Bioinformatics 11:443

    Article  PubMed  Google Scholar 

  • Mathew B, Bauer AM, Koistinen P, Reetz TC, Léon J, Sillanpää MJ (2012) Bayesian adaptive Markov chain Monte Carlo estimation of genetic parameters. Heredity 109:235–245

    Article  PubMed  CAS  Google Scholar 

  • Meuwissen THE, Hayes BJ, Goddard ME (2001) Prediction of total genetic value using genome-wide dense marker maps. Genetics 157:1819–1829

    PubMed  CAS  Google Scholar 

  • Meyer K (2007) WOMBAT: a tool for mixed model analyses in quantitative genetics by restricted maximum likelihood (REML). J Zhejiang Univ Sci B 8:815–821

    Article  PubMed  Google Scholar 

  • Misztal I, Tsuruta S, Strabel T, Auvray B, Druet T, Lee DH (2002) BLUPF90 and related programs (BGF90). In: Proceedings of 7th world congress of genetics applied to livestock production. Montpellier, France. Communication No. 28-07

  • Oakey H, Verbyla AP, Cullis BR, Wei X, Pitchford WS (2007) Joint modeling of additive and non-additive (genetic line) effects in multi-environment trials. Theor Appl Genet 114:1319–1332

    Article  PubMed  Google Scholar 

  • Patterson HD, Thompson R (1971) Recovery of inter-block information when blocks sizes are unequal. Biometrika 58:545–554

    Article  Google Scholar 

  • Pérez P, de los Campos G, Crossa J, Gianola D (2010) Genomic-enabled prediction based on molecular markers and pedigree using the Bayesian Linear Regression Package in R. Plant Genome 3:106–116

    Article  PubMed  Google Scholar 

  • Piepho HP, Möhring J, Melchinger AE, Büchse A (2008) BLUP for phenotypic selection in plant breeding and variety testing. Euphytica 161:209–228

    Article  Google Scholar 

  • Plummer M (2012) JAGS: Just Another Gibbs Sampler v.3.3.0. http://mcmc-jags.sourceforge.net/. Accessed 12 November 2012

  • Plummer M, Best N, Cowles K, Vines K, Sarkar D, Almond R (2012) Package ‘coda’ v.016-1. http://cran.r-project.org/web/packages/coda/coda.pdf. Accessed 12 November 2012

  • Pritchard JK, Stephens M, Donnelly P (2000) Inference of population structure using multilocus genotype data. Genetics 155:945–959

    PubMed  CAS  Google Scholar 

  • R Development Core Team (2012) R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. ISBN 3-900051-07-0, http://www.R-project.org/

  • Raftery AL, Lewis S (1992) How many iterations in the Gibbs sampler? In: Bernardo JM, Berger JO, Dawid AP, Smith AFM (eds) Bayesian Statistics 4. Oxford University Press, Oxford, pp 763–774

    Google Scholar 

  • Rodriguez MC, Toro M, Silió L (1996) Selection on lean growth in a nucleus of Landrace pigs: an analysis using Gibbs sampling. Anim Sci 63:243–253

    Article  Google Scholar 

  • Schenkel FS, Schaeffer LR, Boettcher PJ (2002) Comparison between estimation of breeding values and fixed effects using Bayesian and empirical BLUP estimation under selection on parents and missing pedigree information. Genet Sel Evol 34:41–59

    Article  PubMed  Google Scholar 

  • Smith BJ (2007) Boa: an R package for MCMC output convergence assessment and posterior inference. J Stat Softw 21:1–37

    Google Scholar 

  • Sorensen D (2009) Developments in statistical analysis in quantitative genetics. Genetica 136:319–332

    Article  PubMed  Google Scholar 

  • Sorensen D, Gianola D (2002) Likelihood, Bayesian and MCMC methods in quantitative genetics. Springer, New York

    Google Scholar 

  • Su YS, Yajima M (2012) Package ‘R2jags’ v.0.03-8. http://cran.r-project.org/web/packages/R2jags/R2jags.pdf. Accessed 12 November 2012

  • Van Tassell CP, Van Vleck LD (1996) Multiple-trait Gibbs sampler for animal models: flexible programs for Bayesian and likelihood-based (co)variance component inference. J Anim Sci 74:2586–2597

    PubMed  Google Scholar 

  • Van Tassell CP, Casela G, Pollak EJ (1995) Effects of selection on estimates of variance components using Gibbs sampling and restricted maximum likelihood. J Dairy Sci 78:678–692

    Article  Google Scholar 

  • Viana JMS, Almeida IF, Resende MDV, Faria VR, Silva FF (2010a) BLUP for genetic evaluation of plants in non-inbred families of annual crops. Euphytica 174:31–39

    Article  Google Scholar 

  • Viana JMS, Sobreira FM, Resende MDV, Faria VR (2010b) Multi-trait BLUP in half-sib selection of annual crops. Plant Breed 129:599–604

    Article  Google Scholar 

  • Viana JMS, Almeida RV, Faria VR, Resende MDV, Silva FF (2011a) Genetic evaluation of inbred plants based on BLUP of breeding value and general combining ability. Crop Pasture Sci 62:515–522

    Article  Google Scholar 

  • Viana JMS, Faria VR, Silva FF, Resende MDV (2011b) Best linear unbiased prediction and family selection in crop species. Crop Sci 51:2371–2381

    Article  Google Scholar 

  • Viana JMS, Valente MSF, Scapim CA, Resende MDV, Silva FF (2011c) Genetic evaluation of tropical popcorn inbred lines using BLUP. Maydica 56:273–281

    Google Scholar 

  • Viana JMS, DeLima RO, Faria VR, Mundim GB, Resende MDV, Silva FF (2012a) Relevance of pedigree, historical data, dominance, and data unbalance for selection efficiency. Agron J 104:722–728

    Article  Google Scholar 

  • Viana JMS, Faria VR, Silva FF, Resende MDV (2012b) Combined selection of progeny in crop breeding using best linear unbiased prediction. Can J Plant Sci 92:1–10

    Article  Google Scholar 

  • Viana JMS, DeLima RO, Mundim GB, Condé ABT, Vilarinho AA (2013) Relative efficiency of the genotypic value and combining ability effects on reciprocal recurrent selection. Theor Appl Genet doi. doi:10.1007/s00122-012-2023-3

    Google Scholar 

  • Waldmann P (2009) Easy and flexible Bayesian inference of quantitative genetic parameters. Evolution 63:1640–1643

    Article  PubMed  Google Scholar 

  • Waldmann P, Ericsson T (2006) Comparison of REML and Gibbs sampling estimates of multi-trait genetic parameters in Scots pine. Theor Appl Genet 112:1441–1451

    Article  PubMed  Google Scholar 

  • Waldmann P, Hallander J, Hoti F, Sillanpää MJ (2008) Efficient Markov chain Monte Carlo implementation of Bayesian analysis of additive and dominance genetic variances in noninbred pedigrees. Genetics 179:1101–1112

    Article  PubMed  Google Scholar 

  • Wang CS, Rutledge JJ, Gianola D (1993) Marginal inference about variance components in a mixed linear model using Gibbs sampling. Genet Sel Evol 21:41–62

    Article  Google Scholar 

Download references

Acknowledgments

We thank the anonymous reviewer for the relevant comments and the Foundation for Research Support of Minas Gerais State (Fapemig), the Brazilian Federal Agency for Support and Evaluation of Graduate Education (Capes) and the National Council for Scientific and Technological Development (CNPq) for financial support.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to José Marcelo Soriano Viana.

Additional information

Communicated by M. Sillanpaa.

Appendix

Appendix

(1) Code for JAGS

$$\begin{gathered} {\text{model }} \hfill \\ {\text{\{ }} \hfill \\ {\bf{\# likelihood function }} \hfill \\ \, \underbrace {\text{Y}} \sim {\text{dmnorm(mu[1:N,1],I[1:N,1:N]*tau}}\_{\text{e) }}_{{}} \hfill \\ {\text{ y}}|\beta , {\text{u}}_{ 1} , {\text{ u}}_{ 2} , { }\sigma_{{{\text{u}}}_{ 1} }^{ 2} , { }\sigma_{{{\text{u}}_{ 2} }}^{ 2} , { }\sigma_{\text{e}}^{ 2} \sim {\text{N}}(\mu ,{\text{I}}\sigma_{\text{e}}^{ 2} ) {\text{ Eq}} . { (1} . 1 )\hfill \\\# \underbrace {\text{Y}} \sim {\text{dt(mu[1:N,1],I[1:N,1:N]*tau}}\_{\text{e,v)}}_{{}} \hfill \\ {\text{ y}}|\beta , {\text{u}}_{ 1} , {\text{ u}}_{ 2} , { }\sigma_{{{\text{u}}_{ 1} }}^{ 2} , { }\sigma_{{{\text{u}}_{ 2} }}^{ 2} , { }\sigma_{\text{e}}^{ 2} , {\text{v}}\sim {\text{Student - t}}(\mu ,{\text{I}}\sigma_{\text{e}}^{ 2} , {\text{v) (assuming the Student - t distribution for the data)}} \hfill \\\# \underbrace {\text{Y}} \sim {\text{dmnorm(mu[1:N,1],I[1:N,1:N]*(1 - h}}^{ 2} ) * {\text{tau}}\_{\text{p) }}_{{}} \hfill \\ {\text{ y}}|\beta ,{\text{u}}_{ 1} , {\text{ u}}_{ 2} , {{\upsigma}}_{{{\text{u}}_{ 1} }}^{ 2} , {{\upsigma}}_{\text{p}}^{ 2} , {\text{ h}}_{{}}^{ 2} \sim{\text{N}}(\mu ,{\text{I(1 - h}}^{ 2} ) {{\upsigma}}_{\text{p}}^{ 2} ) {\text{ (assuming a reparameterization in terms of h}}^{ 2} {\text{ and}}\; \sigma _{\text{p}}^{ 2} )\hfill \\ \hfill \\ \, \underbrace {{{\text{mu[1:N,1] < - X[1:N,1:nbeta]\% *\% beta[1:nbeta,1] + Z1[1:N,1:nu1]\% *\% u1[1:nu1,1] + Z2[1:N,1:nu2]\% *\% u2[1:nu2,1]}}}}_\mu ={\text{X}}\beta + {\text{Z}}_{ 1} {\text{u}}_{ 1}+{\text{Z}}_{ 2} {\text{u}}_{ 2} \begin{array}{*{20}c} { \, } \\ \end{array}\hfill \\ \hfill \\ \end{gathered}$$
$$ \begin{gathered} \underbrace {{\text{tau}}}\_{\text{e}} \sim {\text{dgamma(ve/2, Se/2) }}\hfill \\ \, {{\upsigma}}_{\text{e}}^{ 2} | {{\upnu}}_{\text{e}} , {\text{S}}_{\text{e}} {{\sim \nu }}_{\text{e}} {\text{S}}_{\text{e}} {{\upchi}}_{{{{\upnu}}_{\text{e}} }}^{ - 2} {\text{ Eq}} . { (1} . 7 ) { } \hfill \\ \, \# {\text{ sd}}\_{\text{p}} \sim {\text{dunif (a, b)}} \hfill \\ \, {\underbrace {\#{\text{tau}}}}\_{\text{p}} < - {\text{sd}}\_p*{\text{sd}}\_{\text{p}} \hfill \\ {{\upsigma}}_{\text{p}} | {\text{a,b}} \sim {\text{U[a,b] (assuming a uniform prior for the phenotypic standard deviation)}} \hfill \\ \underbrace \# {\text{ h2}} \sim{\text{ dbeta(c,d)}} \hfill \\ {\text{ h}}^{ 2} | {\text{c,d}} \sim {\text{Beta[c,d] (assuming a Beta prior for h}}^{ 2} )\hfill \\ \underbrace \# {\text{ v}} \sim {\text{dunif(e,f)}} \hfill \\ {\text{ v}}|{\text{e,f }}\sim {\text{U[e,f] (assuming a uniform prior for degrees of freedom when using a Student - t for the data)}} \hfill \\ \hfill \\ {\bf {\# definition of variance components}} \hfill \\ {\text{ sigma2}}\_{\text{e}} < - 1/{\text{tau}}\_{\text{e }} \hfill \\ {\text{ sigma2}}\_{\text{u1}} < - 1/{\text{tau}}\_{\text{u1}} \hfill \\ {\text{ sigma2}}\_{\text{u2}} < - 1/{\text{tau}}\_{\text{u2}} \hfill \\ {\text{ sigma2}}\_{\text{a}} < - 4*{\text{sigma2}}\_{\text{u1}} \hfill \\ {\text{ h2}} < - {\text{sigma2}}\_{\text{u1}} / {\text{(sigma2}}\_{\text{u1}} + {\text{sigma2}}\_{\text{e/2 )}} \hfill \\ {\bf{\# assuming a reparametrization in terms of h}}^{ 2} {\text{ and}} \;\sigma _{\text{p}}^{ 2} \hfill \\ \#{\text{sigma2}}\_{\text{p}} < - 1/{\text{tau}}\_{\text{p }} \hfill \\ \#{\text{sigma2}}\_{\text{u1}} < -{\text{ sigma2}}\_{\text{p}}*{\text{h2 }} \hfill \\ {\text{\} }} \hfill \\ \end{gathered} $$
$$\begin{gathered} {\bf{\# prior distributions for the inverse of variance components}} \hfill \\ \, \underbrace {\text{ tau}}\_{\text{u1}} \sim {\text{dgamma(vu1/2, Su1/2)}} \hfill \\ {{\upsigma}}_{\text{u1}}^{ 2} | {{\upnu}}_{\text{u1}} , {\text{S}}_{\text{u1}} {{\sim \nu }}_{\text{u1}} {\text{S}}_{\text{u1}} {{\upchi}}_{{{{\upnu}}_{\text{u1}} }}^{ - 2} {\text{ Eq}} . { (1} . 5 )\hfill \\ \hfill \\ \, \underbrace {\text{tau}}\_{\text{u2}} \sim {\text{dgamma(vu2/2, Su2/2)}} \hfill \\ {{\upsigma}}_{\text{u2}}^{ 2} | {{\upnu}}_{\text{u2}} , {\text{S}}_{\text{u2}} {{\sim \nu }}_{\text{u2}} {\text{S}}_{\text{u2}} {{\upchi}}_{{{{\upnu}}_{\text{u2}} }}^{ - 2} {\text{ Eq}} . { (1} . 6 )\hfill \\ \end{gathered}$$
$$ \begin{gathered} {\begin{gathered} \, \underbrace {\text{tau}}\_{\text{e}} \sim {\text{dgamma(ve/2, Se/2) }}\hfill \\ {{\upsigma}}_{\text{e}}^{ 2} | {{\upnu}}_{\text{e}} , {\text{S}}_{\text{e}} {{\sim \nu }}_{\text{e}} {\text{S}}_{\text{e}} {{\upchi}}_{{{{\upnu}}_{\text{e}} }}^{ - 2} {\text{ Eq}} . { (1} . 7 ) { } \hfill \\ \# {\text{ sd}} \_{\text{p}} \sim {\text{dunif (a, b)}} \hfill \\ \underbrace {\#{\text{tau}}} \_{\text{p}} < - {\text{sd}} \_p*{\text{sd}} \_{\text{p}} \hfill \\ \end{gathered} } \hfill \\ {{\upsigma}}_{\text{p}} | {\text{a,b}} \sim {\text{U[a,b] (assuming a uniform prior for the phenotypic standard deviation)}} \hfill \\ \underbrace \# {\text{ h2}} \sim{\text{ dbeta(c,d)}} \hfill \\ {\text{ h}}^{ 2} | {\text{c,d}} \sim {\text{Beta[c,d] (assuming a Beta prior for h}}^{ 2} )\hfill \\ \underbrace \# {\text{ v}} \sim {\text{dunif(e,f)}} \hfill \\ {\text{ v}}|{\text{e,f }}\sim {\text{U[e,f] (assuming a uniform prior for degrees of freedom when using a Student - t for the data)}} \hfill \\ \hfill \\ {\bf {\# definition of variance components}} \hfill \\ {\text{ sigma2}}\_{\text{e}} < - 1/{\text{tau}}\_{\text{e }} \hfill \\ {\text{ sigma2}}\_{\text{u1}} < - 1/{\text{tau}}\_{\text{u1}} \hfill \\ {\text{ sigma2}}\_{\text{u2}} < - 1/{\text{tau}}\_{\text{u2}} \hfill \\ {\text{ sigma2}}\_{\text{a}} < - 4*{\text{sigma2}}\_{\text{u1}} \hfill \\ {\text{ h2}} < - {\text{sigma2}}\_{\text{u1}} / {\text{(sigma2}}\_{\text{u1}} + {\text{sigma2}}\_{\text{e/2 )}} \hfill \\ {\bf{\# assuming a reparametrization in terms of h}}^{ 2} {\text{ and}} \;\sigma _{\text{p}}^{ 2} \hfill \\ \#{\text{sigma2}}\_{\text{p}} < - 1/{\text{tau}}\_{\text{p }} \hfill \\ \#{\text{sigma2}}\_{\text{u1}} < -{\text{ sigma2}}\_{\text{p}}*{\text{h2 }} \hfill \\ {\text{\} }} \hfill \\ \end{gathered} $$

where Y is the phenotypic values vector; X, Z1, and Z2 are, respectively, incidence matrices for β, u 1, and u 2; N, nbeta, nu1, and nu2 are, respectively, the numbers of observations, of fixed effects, of families and of blocks; mean_beta, mean_u1, and mean_u2 are, respectively, the mean vectors of prior distributions for β, u 1, and u 2; I, Ibeta, A, Ib are, respectively, matrices related with covariance of prior distributions for e, β, u 1, and u 2; and ν. and S. are the hyperparameters for the inverse of the variance components.

(2) Code for R2jags

Y = as.matrix(read.table(“Yp1.txt”)) #reading phenotypic observations (Y)

X = as.matrix(read.table(“X.txt”)) #reading incidence matrix of β

Z1 = as.matrix(read.table(“Z.txt”)) #reading incidence matrix of u 1

Z2 = as.matrix(read.table(“Jp.txt”)) #reading incidence matrix of u 2

#specifying dimensions

N = nrow(Y) # number of observations in Y

nbeta = ncol(X) # number of fixed effects (β)

nu1 = ncol(Z1) # number of families (u 1)

nu2 = ncol(Z2) # number of blocks (u 2)

#mean vectors of prior distributions for location parameters

mean_beta = matrix(100,nbeta,1) # μ β in Eq. 1.2

mean_u1 = matrix(0,nu1,1) # 0 in Eq. 1.3

mean_u2 = matrix(0,nu2,1) # 0 in Eq. 1.4

#matrices related with covariance of prior distributions for location parameters

I = diag(N) # I in Eq. 1.1

Ibeta = diag(nbeta) # \(I_{{{\upbeta}}}\)in Eq. 1.2

A = as.matrix(read.table(“A.txt”)) # A in Eq. 1.3

Ib = diag(nu2) # I b in Eq. 1.4

#specifying hyperparameters for the inverse of variance components (non-informative prior)

v1 = 0.001; v2 = 0.001; ve = 0.001; S1 = v1*1; S2 = v2*1; Se = ve*1;

library(R2jags) #loading R2jags package

#listing JAGS input

jags.data = list(“Y”,“X”,“Z1”,“Z2”,“N”,“nbeta”,“nu1”, “nu2”,“mean_beta”, “mean_u1”,“mean_u2”, “Ibeta”, “A”, “Ib”, “I”,“v1”,“v2”,“ve”,“S1”,“S2”,“Se”)

#listing JAGS output

jags.params = c(“beta”,“u1”,“u2”,“sigma2_u1”,“sigma2_a”,“sigma2_u2”, “sigma2_e”,“h2”)

#listing initial values for MCMC simulation

jags.inits = function() {

list(“beta” = structure(.Data = c(4500,100,300),.Dim = c(nbeta, 1)), “u1” = structure(.Data = mean_u1,.Dim = c(nu1, 1)),

“u2” = structure(.Data = mean_u2,.Dim = c(nu2, 1)), “tau_u1” = c(0.0001), “tau_u2” = c(0.001), “tau_e” = c(0.00001))}

#calling jags function of R2jags package

bayes = jags(data = jags.data, jags.params, inits = jags.inits, n.chains = 1, n.iter = 70000, n.burnin = 20000, n.thin = 5, model.file = ”bayes_model.txt”) # “bayes_model.txt” is txt file containing model specified in Code for JAGS

#saving MCMC output

write.table(as.mcmc(bayes), “prod_noninf.txt”,row.names = FALSE,quote = FALSE)

Rights and permissions

Reprints and permissions

About this article

Cite this article

e Silva, F.F., Viana, J.M.S., Faria, V.R. et al. Bayesian inference of mixed models in quantitative genetics of crop species. Theor Appl Genet 126, 1749–1761 (2013). https://doi.org/10.1007/s00122-013-2089-6

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00122-013-2089-6

Keywords

Navigation