risk: A helper function to estimate a nonparametric cumulative...

Description Usage Arguments Value Examples

View source: R/utilities.R

Description

A helper function to estimate a nonparametric cumulative incidence function to the level needed for plotting

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
risk(
  data = data,
  t = "t",
  delta = "y",
  level = 1,
  tau = 4,
  weights = "NULL",
  subvar = "NULL",
  subval = NA
)

Arguments

data

input data source containing main study data, specifically time variable and outcome type

t

character string denoting name of time variable

delta

character string denoting name of event type variable

tau

final follow-up time

weights

character string denoting name of variable containing weights (e.g., survey sampling weights, inverse probability weights, etc)

subvar

a character string denoting the name of any subsetting variable (not called by other functions in this package)

subval

the level of subvar of interest

Value

data frame with event times and cumulative incidence function for outcome of interest

Examples

1
 r1<-risk(data=part, t="t", delta="y", tau=tau, weights="new_weight")

edwardsjk/mccc documentation built on March 30, 2020, 4:13 p.m.