plot.psbcSpeedUp {psbcSpeedUp} | R Documentation |
create a plot of estimated coefficients
Description
Plot point estimates of regression coefficients and 95% credible intervals
Usage
## S3 method for class 'psbcSpeedUp'
plot(x, type = "mean", interval = TRUE, ...)
Arguments
x |
an object of class |
type |
type of point estimates of regression coefficients. One of
|
interval |
logical argument to show 95% credible intervals. Default
is |
... |
additional arguments sent to |
Value
ggplot object
Examples
# Load the example dataset
data("exampleData", package = "psbcSpeedUp")
p <- exampleData$p
q <- exampleData$q
survObj <- exampleData[1:3]
# Set hyperparameters
mypriorPara <- list(
"groupInd" = 1:p, "eta0" = 0.02, "kappa0" = 1, "c0" = 2, "r" = 10 / 9,
"delta" = 1e-05, "lambdaSq" = 1, "sigmaSq" = runif(1, 0.1, 10),
"beta.prop.var" = 1, "beta.clin.var" = 1
)
# run Bayesian Lasso Cox
library("psbcSpeedUp")
set.seed(123)
fitBayesCox <- psbcSpeedUp(survObj,
p = p, q = q, hyperpar = mypriorPara,
nIter = 10, burnin = 0, outFilePath = tempdir()
)
plot(fitBayesCox, color = "blue")
[Package psbcSpeedUp version 2.0.7 Index]