plot.ddhazard | R Documentation |
Plot of estimated state space variables from a ddhazard
fit.
## S3 method for class 'ddhazard' plot( x, xlab = "Time", ylab = "Hazard", type = "cov", plot_type = "l", cov_index, ylim, col = "black", add = FALSE, do_alter_mfcol = TRUE, level = 0.95, ddhazard_boot, ... )
x |
result of |
xlab, ylab, ylim, col |
arguments to override defaults set in the function. |
type |
type of plot. Currently, only |
plot_type |
the |
cov_index |
the index (indices) of the state space parameter(s) to plot. |
add |
|
do_alter_mfcol |
|
level |
level (fraction) for confidence bounds. |
ddhazard_boot |
object from a |
... |
arguments passed to |
Creates a plot of state variables or adds state variables to a plot with indices cov_index
. Pointwise 1.96 std. confidence intervals are provided with the smoothed co-variance matrices from the fit.
Returns NULL
using invisible
.
library(dynamichazard) fit <- ddhazard( Surv(time, status == 2) ~ log(bili), pbc, id = pbc$id, max_T = 3600, Q_0 = diag(1, 2), Q = diag(1e-4, 2), by = 50, control = ddhazard_control(method = "GMA")) plot(fit) plot(fit, cov_index = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.