Description Usage Arguments Author(s) See Also Examples
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.
1 2 |
x |
a |
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. |
K. Domijan
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.