plot.ivsacim {ivsacim}R Documentation

Plotting Estimated Cumulative Intensity function with Pointwise Confidence Intervals

Description

The function will plot the estimated cumulative intensity function of the treatment after fitting. Corresponding pointwise confidence intervals at level alpha are also included.

Usage

## S3 method for class 'ivsacim'
plot(x, gof = FALSE, ...)

Arguments

x

the fitting object after fitting IVSACIM model

gof

whether to draw the goodness-of-fit plot

...

the other arguments you want to put in the built-in plot function

Value

No return value, called for side effects

Examples

n = 400
event = rbinom(n, 1, 0.8)
IV = rbinom(n, 1, 0.5)
trt_init = IV
trt_shift = rep(0, n)
time = rexp(n)/(0.5 + trt_init * 0.2)
max_t = 3
max_t_bet = 3
n_sim = 100
fit <- ivsacim(time, event, IV, IV_valid = TRUE, trt_init, trt_shift, max_t, max_t_bet, n_sim)
plot(fit, main = "", xlab = "Time", ylab = "Cumulative Intensity Function")
plot(fit, gof = TRUE, xlab = "Time", ylab = "")

[Package ivsacim version 2.1.0 Index]