dose.survfit: Calculate a dose-survival curve from a dose titration study,...

Description Usage Arguments Details Value Author(s) See Also Examples

Description

The 'dose-survival curve' is nothing other than an empirical cumulative distribution for MTDi in the sampled population. The term 'survival' is suggested in part by our application of the Kaplan-Meier estimator to interval-censored toxicity information.

Usage

1
dose.survfit(de, method = "rothman", avoid.degeneracy = TRUE)

Arguments

de

A dose titration experiment of the form produced by de.sim

method

The method to be used by package:km.ci when calculating CI

avoid.degeneracy

When TRUE, this parameter directs the function to introduce artificial events into the dose titration experiment, to avoid degeneracies at the lower and upper ends of the dose-survival curve.

Details

TODO: Describe details of degeneracy avoidance, once these have stabilized.

Value

An object of class survfit.

Author(s)

David C. Norris

See Also

dose.survival, ~~~

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (de, method = "rothman", avoid.degeneracy = TRUE) 
{
    artif.x <- 0.5
    artif.o <- 0.25
    weights <- rep(1, length(unique(de$id)))
    if (avoid.degeneracy) {
        if (with(de, !sum(dlt[dose == 1]))) {
            de <- rbind(data.frame(id = 0, period = 0, dose = 1, 
                dlt = TRUE), de)
            weights <- c(artif.x, weights)
        }
        if (with(subset(de, dose == max(dose)), all(dlt))) {
            de <- rbind(de, data.frame(id = Inf, period = max(de$period), 
                dose = max(de$dose), dlt = FALSE))
            weights <- c(weights, artif.o)
        }
    }
    de.inspect <<- de
    S <- dose.survival(de)
    S.inspect <<- S
    fit <- survfit(S ~ 1, weights = weights)
    fit.inspect <<- fit
    stopifnot(max(fit$time) == max(de$dose) || !avoid.degeneracy)
    fit <- km.ci(fit, method = method, conf.level = getOption("ds.conf.level"))
  }

dcnorris/DTAT documentation built on May 7, 2019, 10:45 p.m.