bafit: Fitting various Bayesian models

Description Usage Arguments Value Examples

Description

baFit function can fit various Bayesian models including rrBLUP/GBLUP, BayesA/B, SSVS, single-step SSVS/BayesA/B, antedependence models and etc.

Usage

1
2
baFit(formula, data, geno, genoid, randomFormula = NULL, map = NULL,
  ped = NULL, options = NULL, train = NULL, GWA = c("No", "SNP", "Win"))

Arguments

formula

a formula for the fixed effects

data

a 'data.frame' containing the phenotypes, should have at least two columns including phenotype and id of the individual

geno

a matrix of genotypes with rownames correpsonds to the id in data

genoid

a forumla indicating the column of 'data' contains the IDs related to genotype

randomFormula

a formula for random effects

map

genomic map with column of chr (chromosome number) and pos (postion); for window based approach idw (window id) is also required. Refer to PigMap in the pig data as an example

ped

the inverse of the additive relationship matrix based on pedigree; this is for single-step approach only

options

the 'options' object created by 'create.options' function to run Bayesian models

train

a formula indicating the column of 'data' as reference for trainning and validation

GWA

a character of in one of c("No","SNP","GWA") indicating what type of GWA for the model; default is "No"; 'map' is required for both "SNP" and "Win"

Value

The result of the analysis as a 'ba' object, a list of estimate of fixed and random effects as well as variance components.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
#For GBLUP/rrBLUP:
demo(GBLUP)
demo(RR)

#For BayesA:
demo(BA)
demo(mapBA)

#For SSVS:
demo(SSVS)
demo(mapSSVS)

#For BayesB:
demo(BB)


## End(Not run)

chenchunyu88/BATools documentation built on May 19, 2019, 8:21 a.m.