AIPWmeasures: Estimate standard measures of predictive accuracy for...

Description Usage Arguments Value Note Examples

Description

Estimate measures of predictive accuracy using augmented inverse probability weights (ipw) or true ipw for two-phase biomarker validation studies

Usage

1
2
3
4
AIPWmeasures(time, event, X, subcohort, aug.weights.x = NULL, risk.threshold,
  landmark.time, weight.method = c("Aug", "True"), design = c("CCH", "NCC"),
  calculate.sd = TRUE, smoothing.par = 0.7, pnf.threshold = 0.5,
  pcf.threshold = 0.2, ncc.nmatch = NULL)

Arguments

time

vector of time to event

event

status indicator (1 for observed failure, 0 for censoring)

X

matrix or data frame of covariates

subcohort

indicator for selection into the subcohort (1 for selected, 0 for not selected)

aug.weights.x

vector of variable to be used to derive augmented inverse probability weights.

risk.threshold

vector of risk thresholds on the absolute risk scale used to calcuate cutoff-based summary measures.

landmark.time

numeric value specifying landmark time at which to estimate the performance measures.

weight.method

either "Aug" for augmented ipw or "True" for true ipw.

design

either "CCH" for case-cohort or "NCC" for nested case control specifying the subcohort design used.

calculate.sd

should analytic standard errors be calculated.

smoothing.par

nearest neighbor smoothing parameter used in locfit (default = 0.7)

pnf.threshold

value used to calculate proportion needed to follow (PNF) such that pnf.threshold percent of the cases are classified high risk.

pcf.threshold

value used to calculate proportion of cases followed (PCF) if pcf.threshold percent of the population are classified high risk.

ncc.nmatch

For design = "NCC", specify the number of controls matched per case.

Value

data.frame with estimates of AUC, IDI, ITPR, IFPR, TPR, FPR, PPV, NPV and net benefit (NB) and standard errors.

Note

variance calculations are unavailable for the NB measure.

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
31
32
33
34
data(CCHsimdata)

predict.time <- 0.75

## augmented ipw
AIPWmeasures( time = CCHsimdata$xi, event = CCHsimdata$di,
             X = cbind(CCHsimdata$y1, CCHsimdata$y2),
            subcohort = CCHsimdata$vi,
             aug.weights.x =   CCHsimdata$y1,
             risk.threshold  =  c(.05, .3),
             landmark.time = predict.time,
             weight.method = 'Aug',
             design = "CCH",
             smoothing.par = 0.9,
             calculate.sd  = TRUE,
             pnf.threshold = 0.85,
             pcf.threshold = 0.2)


#simulated data from a ncc design with nmatch = 2
data("NCCsimdata")
AIPWmeasures( time = NCCsimdata$xi, event = NCCsimdata$di,
             X = cbind(NCCsimdata$y1, NCCsimdata$y2),
             subcohort = NCCsimdata$vi,
             aug.weights.x =   NCCsimdata$y1,
             risk.threshold  =  c(.01, .03),
             landmark.time = predict.time,
             weight.method = 'Aug',
             design = "NCC",
             smoothing.par = 0.9,
             calculate.sd  = TRUE,
             pnf.threshold = 0.85,
             pcf.threshold = 0.2,
             ncc.nmatch = 2)

mdbrown/AIPWmeasures documentation built on May 22, 2019, 3:22 p.m.