plot.bkpc: Plot bkpc Objects

Description Usage Arguments Author(s) See Also Examples

View source: R/plot.bkpc.R

Description

Plots realizations of the parameters from the joint posterior distribution in the BKPC model. The default plots show: medians, 10th and 90th percentiles. The "tracePlot" and "boxPlot" show the traceplots and boxplots of the samples.

Usage

1
2
## S3 method for class 'bkpc'
plot(x, type = "default", n.burnin = 0, ...)

Arguments

x

a bkpc object.

type

"tracePlot", "boxPlot" or default.

n.burnin

number of burn-in iterations from the thinned sample to discard.

...

options directly passed to the plot function.

Author(s)

K. Domijan

See Also

bkpc summary.bkpc

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
set.seed(-88106935)

data(microarray)

# consider only four tumour classes (NOTE: "NORM" is not a class of tumour)
y <- microarray[, 2309]
train <- as.matrix(microarray[y != "NORM", -2309])
wtr <- factor(microarray[y != "NORM", 2309], levels = c("BL" ,  "EWS" , "NB" ,"RMS" ))

n.kpc <- 6
n.class <- length(levels(wtr)) - 1

K <- gaussKern(train)$K

# supply starting values for the parameters
# use Gaussian kernel as input

result <- bkpc(K, y = wtr, n.iter = 10000,  thin = 100, n.kpc = n.kpc,  
initSigmasq = 0.001, initBeta = matrix(10, n.kpc *n.class, 1), 
initTau =matrix(10, n.kpc * n.class, 1), intercept = FALSE, rotate = TRUE)



plot(result, type = "tracePlot")
plot(result, type = "boxPlot", n.burnin = 20)
plot(result, n.burnin = 20)

BKPC documentation built on May 1, 2019, 9:10 p.m.