baplot: plot result for baFit

Description Usage Arguments Examples

Description

Plot the results for the Bayesian models

Usage

1
2
baplot(BAout = NULL, type = c("pre", "trace"), op = NULL,
  iterStart = NULL, col = c("black", "red"), ...)

Arguments

BAout

ba object contains all the output of the Bayesian model

type

string defines the type of the plot, which can be "pre","trace"

"pre" plot the predicted value against the true value
"trace" Traceplot
op

op object created by 'create.options' that is used for the analysis

iterStart

the starting iteration for traceplot

col

color for the plot in cross-validation

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 
 rm(list=ls())
 library(BATools)
 data("Pig")
 #Standardize genotype matrix
 #or set your own starting values using 
 #init=list(df=5,scale=0.01,pi=1) 
 run_para=list(niter=2000,burnIn=1000,skip=10)
 print_mcmc=list(piter=500)
 update_para=list(df=FALSE,scale=TRUE,pi=F)
 op<-create.options(model="SSVS",method="MCMC",seed=1,priors=NULL,init=init,
                  update_para=update_para,run_para=run_para,save.at="SSVS",print_mcmc=print_mcmc)
 #### Cross-validation using BATools
 set.seed(1234)
 PigPheno=createCV(data = PigPheno,k=5,"driploss")
 cvSSVS<-baFit(driploss~sex,data=PigPheno,geno=geno ,genoid = ~id,options = op, train=~cv1)
 par(mfrow=c(1,1))
 plot(cvSSVS)

## End(Not run)

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