set.options: create 'options' object

Description Usage Arguments Value Examples

Description

Create object for options of bayesian model

Usage

1
2
3
4
5
6
set.options(model = c("GBLUP", "rrBLUP", "BayesA", "BayesB", "SSVS",
  "ssGBLUP", "ssBayesA", "ssBayesB", "ssSSVS", "anteBayesA", "anteBayesB",
  "anteSSVS", "IWBayesA"), method = c("MCMC", "MAP", "REML"),
  ssGBLUPvar = c("homVAR", "hetVAR"), priors = NULL, init = NULL,
  D = "P", update_para = NULL, run_para = NULL, save.at = NULL,
  print_mcmc = NULL, ncore = 1, seed = 1, convcrit = 0.0001)

Arguments

model

string indicate the model for the analysis, model can be "GBLUP","rrBLUP,"BayesA", "BayesB","SSVS","ssBayesA", "ssBayesB", or "ssSSVS","anteBayesA" and "anteBayesB"

method

string indicate the method for the analysis, model can be "MCMC", "MAP" or "REML"

ssGBLUPvar

string indicate the variance component treatment in ssGBLUP ssGBLUPvar can be c("homVAR", "hetVAR"), default is "homVAR"

priors

list contains priors for the Bayesian model, elements in priors can be "nu_e","tau2_e",
"shape_scale","rate_scale","cdef","alphapi","betapi","mu_m_t","sigma2_m_t",
"df_var_t","scale_var_t"

nu_e numeric, prior degrees of freedom for residual variance, default value -1
tau2_e numeric, prior scale for residual variance,default value 0
shape_scale numeric, prior shape for scale parameter, default value 0.1
rate_scale numeric, prior rate for scale parameter, default value 0.1
cdef numeric, cdef is scale parameter for proposal density on df, default value 0.5
alphapi numeric, prior α for pi, default value 1
betapi numeric, prior β for pi, default value 9
mu_m_t numeric, prior mean for μ_t, default value 0
sigma2_m_t numeric, prior variance for μ_t, default value 0.01
df_var_t numeric, prior degrees of freedom for σ^2_t, default value -1
scale_var_t numeric, prior scale for σ^2_t, default value 0, the scale and degrees of freedom for σ^2_t are non-informative priors based on the original paper

init

list contains initial values for the Bayesian model, elements in init can be "df","scale","pi","mut","vart"
df numeric, the starting value of degrees of freedom parameter for SNP effect variance, default value 5
scale numeric, the starting value of scale parameter for SNP effect variance, default value 0.02
pi numeric, the starting value of π, which is the percentage of SNP that has variantion to the phenotype, default value 0.1 for BayesB, 1 for other models
mut numeric, the starting value of μ_t, default value 0
vart numeric, the starting value of σ^2_t, default value 0.5

D

string indicate use relative variances ("V") or relative precisions ("P") in MAP BayesA, default is "P"

update_para

list of logical indicate whether a parameter is sampled in the Bayesian model, elements in update_para can be "df","scale","pi","mut","vart" df logical, TRUE if degrees of freedom parameter for SNP effect variance needs to be sampled
scale logical, TRUE if scale parameter for SNP effect variance needs to be sampled
pi logical, TRUE if π needs to be sampled
mut logical, TRUE if μ_t needs to be sampled
vart logical, TRUE if σ^2_t needs to be sampled
vare logical, TRUE if σ^2_e needs to be sampled

run_para

list elements in run_para can be "niter","burnIn","skip" niter numeric, the number of iterates for MCMC sampling
burnIn numeric, burnIn period for MCMC sampling
skip numeric , skip for MCMC sampling

save.at

string define the directory to save the results

print_mcmc

list define the monitor options for the Bayesian model, elements in print_mcmc can be "piter","time_est","print_to"

piter numeric, print status every piter. If piter=0, the program don't print any status
time_est logical, TRUE mean display time left estimates
print_to string, "disk" means print to disk in file "log.txt"; "screen" means print to screen
ncore

numeric, the number of cpu cores for the analysis

seed

numeric, seed for random number generator

convcrit

numeric, convergence criteria for EM, default is 1E-4

Value

a object of options for BATools, it's basicaly a list

Examples

1
2
3
4
5
6
7
## Not run: 
  op=create.options(model="SSVS") #This will use the default settings

 #For set your values, check out one of the demos, for example
 demo(SSVS)
 
## End(Not run)

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