Learn R Programming

qgg (version 1.0.3)

gbayes: Genomic prediction models implemented using Bayesian Methods (small data)

Description

Genomic prediction models implemented using Bayesian Methods (small data). The models are implemented using empirical Bayesian methods. The hyperparameters of the dispersion parameters of the Bayesian model can be obtained from prior information or estimated by maximum likelihood, and conditional on these, the model is fitted using Markov chain Monte Carlo. These functions are currently under development and future release will be able to handle large data sets.

Usage

gbayes(y = NULL, W = NULL, sets = NULL, h2 = NULL, nsets = NULL,
  nsamp = 50, nburn = 10, nsave = 10000, tol = 0.001,
  method = "blasso", phi = c(0.999, 0.001))

Arguments

y

is a matrix of phenotypes

W

is a matrix of centered and scaled genotypes

sets

is a list of markers defining a group

h2

is the trait heritability

nsets

is a list of number of marker groups

nsamp

is the number of samples after burnin

nburn

is the number of burnin samples

nsave

is the number of samples to save

tol

is the tolerance

method

specifies the methods used (method="ssvs","blasso","blr")

phi

is the proportion of markers in each marker variance class (phi=c(0.999,0.001),used if method="ssvs")

Examples

Run this code
# NOT RUN {

# Simulate data and test functions

W <- matrix(rnorm(100000),nrow=1000)
set1 <- sample(1:ncol(W),5)
set2 <- sample(1:ncol(W),5)
sets <- list(set1,set2)
g <- rowSums(W[,c(set1,set2)])
e <- rnorm(nrow(W),mean=0,sd=1)
y <- g + e

gbayes(y=y, W=W, method="blasso", nsamp=50)
gbayes(y=y, W=W, method="ssvs", nsamp=50)
gbayes(y=y, W=W, method="blr", nsets=7, nsamp=50)

# }

Run the code above in your browser using DataLab