plot.shrinkDSM {shrinkDSM} | R Documentation |
Graphical summary of posterior distribution of fitted dynamic survival model
Description
plot.shrinkDSM
generates plots visualizing the posterior distribution estimated
as a result from a call to shrinkDSM
.
Usage
## S3 method for class 'shrinkDSM'
plot(
x,
pars = c("beta"),
nplot = 3,
h_borders = c(0.05, 0.05),
w_borders = c(0.02, 0.02),
...
)
Arguments
x |
a |
pars |
a character vector containing the names of the parameters to be visualized.
The names have to coincide with the names of the list elements of the |
nplot |
positive integer that indicates the number of tvp plots to display on a single page before a new page is generated. The default value is 3. |
h_borders |
single real, positive number smaller than 0.5 or a vector containing two such numbers. Determines
the relative amount of space (the total amount summing up to 1) left blank on the left and right of the plot, in that order.
The default is |
w_borders |
single real, positive number smaller than 0.5 or a vector containing two such numbers. Determines
the relative amount of space (the total amount summing up to 1) left blank at the top and bottom of the plot, in that order.
The default is |
... |
further arguments to be passed to the respective plotting functions. |
Value
Called for its side effects and returns invisibly.
Author(s)
Peter Knaus peter.knaus@wu.ac.at
See Also
Other plotting functions:
plot.mcmc.dsm.tvp()
,
plot.shrinkDSM_pred()
Examples
set.seed(123)
data("gastric")
# Create intervals for piecewise exponential model
intervals <- divisionpoints(gastric$time, gastric$status, 2)
# Estimate model
mod <- shrinkDSM(time ~ radiation, gastric,
delta = gastric$status, S = intervals)
plot(mod)
# Will produce an error because 'hello' is not a parameter in the model
## Not run:
plot(mod, pars = c("beta", "hello"))
## End(Not run)