BCHMplot_post_value {BCHM} | R Documentation |
Plot the posterior response of subgroups.
Description
plot the posterior response rate with its highest probability density (HPD) interval by subgroup ID
Usage
BCHMplot_post_value(
res,
col = res$Result[, 4],
pch = c(19, 4),
cex = 2,
HPD = 0.95,
xlim = c(0, dim(res$Result)[1] + 2),
ylim = c(0, 1),
ObsMean = FALSE,
...
)
Arguments
res |
BCHM calculation results. |
col |
Color vector |
pch |
pch vector pch[1] Posterior mean pch[2] Observed mean |
cex |
size of points |
HPD |
Highest Posterior Density level for drawing (NA: No HPD drawing ) |
xlim |
X-axis range |
ylim |
Y-axis range |
ObsMean |
Draw the observed mean of subgroups if this parameter is TRUE |
... |
other options |
Value
None
See Also
BCHM Perform the analysis based on the BCHM design.
BCHMplot_cluster Plot the clustering results of subgroups.
BCHMplot_post_dist Plot the posterior distributions of subgroups.
Examples
nDat = c(25, 25, 25, 25) # total number of patients
xDat = c(2, 3, 8, 6) # number of responses
alpha <- 1e-20
d0 <- 0.0
alpha1 = 50
beta1 = 10
tau2 <- 0.1
phi1 <- 0.1
deltaT <- 0.2
thetaT <- 0.60
res <- BCHM(nDat = nDat,
xDat = xDat,
alpha = alpha,
d0 = d0,
alpha1 = alpha1,
beta1 = beta1,
tau2 = tau2,
phi1 = phi1,
deltaT = deltaT,
thetaT = thetaT,
burnIn = 100,
MCIter = 200,
MCNum = 1000,
seed = 1000
)
print(res$SMatrix)
print(res$Result)
col <- res$Result[,4]
BCHMplot_post_value(res, col, HPD = 0.8)
[Package BCHM version 1.00 Index]