timeroc_predict {parTimeROC}R Documentation

timeroc_predict

Description

Predict time-dependent ROC from fitted model.

Usage

timeroc_predict(
  obj,
  t,
  newx,
  cutoff = 100,
  B = 1,
  type = "standard",
  params.x,
  params.t,
  copula,
  method = "mle",
  definition = "c/d",
  seed,
  params.copula,
  params.ph,
  ci = 0.95,
  h = -1e-04
)

Arguments

obj

A 'fitTROC' or 'TimeROC' object.

t

A numeric/vector specifying time point of interest. (Default: Time-to-event at 50th quantile points)

newx

A numeric/vector specifying biomarker of interest.

cutoff

A numeric specifying total cutoff point on ROC curve.

B

An integer specifying bootstrap iteration. If B > 1, will also return confidence interval.

type

A string indicate type of analysis to run. (Default = 'standard')

params.x

A named vector for biomarker's parameter.

params.t

A named vector for time-to-event's parameter.

copula

A string indicating the type of copula to be used.

method

A string specifying method of estimation. (Default = 'mle')

definition

A string indicating ROC definition to use. (Default = 'c/d')

seed

A numeric to pass in set.seed.

params.copula

An integer specifying the copula's parameter.

params.ph

An integer specifying the PH parameter.

ci

An integer 0 to 1 for confidence level.

h

An integer specifying small change of time (To compute density from S(t|x))

Value

A list of ROC dataframe for each time-to-event.

Examples

# PH model
test <- timeroc_obj('normal-weibull-PH')
set.seed(23456)
rr <- rtimeroc(obj = test, censor.rate = 0.1, n=500,
               params.t = c(shape=1, scale=5),
               params.x = c(mean=5, sd=1),
               params.ph=0.5)
cc <- timeroc_fit(x=rr$x, t=rr$t, event=rr$event, obj = test)
start.t <- Sys.time()
jj <- timeroc_predict(cc)
print(Sys.time()-start.t)


# Copula model
test <- timeroc_obj(dist = 'gompertz-gompertz-copula', copula='clayton90',
params.t = c(shape=3,rate=1),
params.x = c(shape=1,rate=2),
params.copula=-5)
set.seed(23456)
rr <- rtimeroc(obj = test, censor.rate = 0.2, n=500)
cc <- timeroc_fit(x=rr$x, t=rr$t, event=rr$event, obj = test)
start.t <- Sys.time()
jj <- timeroc_predict(cc)
print(Sys.time()-start.t)


[Package parTimeROC version 0.1.0 Index]