Learn R Programming

ammiBayes (version 2.1-1)

predict.ammiBayes: Bayesian AMMI for continuous data

Description

Extract predict values and HPD interval

Usage

# S3 method for ammiBayes
predict(object, prob=0.95, ...)

Arguments

object

An object of class ammiBayes

prob

Probability for HPD interval. Default is 0.95

...

Potential further arguments (required by generic).

Author

Luciano A. Oliveira
Carlos P. Silva
Cristian T. E. Mendes
Alessandra Q. Silva
Joel J. Nuvunga
Marcio Balestre
Julio S. S. Bueno-Filho
Fabio M. Correa

References

OLIVEIRA,L.A.; SILVA, C. P.; NUVUNGA, J. J.; SILVA, A. Q.; BALESTRE, M. Credible Intervals for Scores in the AMMI with Random Effects for Genotype. Crop Science, v. 55, p. 465-476, 2015. doi: https://doi.org/10.2135/cropsci2014.05.0369

SILVA, C. P.; OLIVEIRA, L. A.; NUVUNGA, J. J.; PAMPLONA, A. K. A.; BALESTRE, M. A Bayesian Shrinkage Approach for AMMI Models. Plos One, v. 10, p. e0131414, 2015. doi: https://doi.org/10.1371/journal.pone.0131414.

Examples

Run this code

library(ammiBayes)
data(ammiData)

Env  <- factor(ammiData$amb)
Rep <- factor(ammiData$rep)
Gen  <- factor(ammiData$gen)
Y  <- ammiData$prod

model <- ammiBayes(Y=Y, Gen=Gen, Env=Env, Rep=Rep, iter=10, burn=1, jump=2, chains=2)

predict(model)

Run the code above in your browser using DataLab