plot.tsriadditive: Plotting Predicted Survival Function or Cumulative Incidence...

Description Usage Arguments Value Examples

View source: R/tsriadditive.R

Description

The function will plot the predicted survival function when fitting a survival model and the predicted cumulative incidence function when fitting a competing risks model. Corresponding pointwise confidence intervals at level alpha are also included.

Usage

1
2
3
## S3 method for class 'tsriadditive'
plot(x, newtreatment = NULL, newIV = NULL,
  newcovariates = NULL, alpha = 0.05, unit = "", ...)

Arguments

x

the fitting object after fitting our model

newtreatment

a new treatment value

newIV

a new instrumental variable value

newcovariates

a new observed covariates

alpha

the confidence level 1 - alpha for confidence interval

unit

the time unit we focus

...

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

Value

No return value, called for side effects

Examples

1
2
3
4
5
6
7
survtime <- rexp(100)
cause <- rbinom(100, 1, 0.7)
treatment <- rbinom(100, 1, 0.5)
IV <- rnorm(100)
covariates <- rnorm(100)
fit <- tsriadditive(survtime, cause, treatment, IV, covariates)
plot(fit, 1, 0, 0)

tsriadditive documentation built on April 28, 2020, 5:10 p.m.