print {timeROC}R Documentation

Print objects in the timeROC library

Description

Printing of objects created with the timeROC function

Usage

## S3 method for class 'ipcwsurvivalROC'
print(x, No.lines=5,digits=2, ...)
## S3 method for class 'ipcwcompetingrisksROC'
print(x, No.lines=5,digits=2, ...)
## S3 method for class 'ipcwsurvivalSeSpPPVNPV'
print(x, No.lines=5,digits=2, ...)
## S3 method for class 'ipcwcompetingrisksSeSpPPVNPV'
print(x, No.lines=5,digits=2, ...)

Arguments

x

Object of class "ipcwsurvivalROC", "ipcwcompetingrisksROC", "ipcwsurvivalSeSpPPVNPV" or "ipcwcompetingrisksSeSpPPVNPV".

No.lines

The (maximum) number of lines printed. Each line corresponds to a time point included in the vector times of the object x. For example, if No.lines=5, then the function chooses the five time points corresponding to the quantiles of the vector times of the object x. If No.lines=10, it chooses the deciles, etc...

digits

The number of significant digits. Default value is digits = 2.

...

Not used.

Details

The print function recalls the sample size (after having removed missing data), the AUC estimates, and the estimated standard errors (only if they have been estimated) for at maximum No.lines time points. In addition, it displays the frequencies of :

Furthermore, the function recalls the method used to compute the inverse probability of censoring weights.

Author(s)

Paul Blanche pabl@sund.ku.dk

See Also

timeROC, SeSpPPVNPV

Examples

##-------------Without competing risks-------------------
library(survival)
data(pbc)
head(pbc)
pbc<-pbc[!is.na(pbc$trt),] # select only randomised subjects
pbc$status<-as.numeric(pbc$status==2) # create event indicator: 1 for death, 0 for censored

ROC.bili.cox<-timeROC(T=pbc$time,
                      delta=pbc$status,marker=pbc$bili,
                      other_markers=as.matrix(pbc[,c("chol","albumin")]),
                      cause=1,weighting="cox",
                      times=quantile(pbc$time,probs=seq(0.2,0.8,0.01)))

# prints descriptive statistics and AUC estimates (5,10 and 20 lines)
print(ROC.bili.cox)
print(ROC.bili.cox,No.lines=10)
print(ROC.bili.cox,No.lines=20,digits=1)

# Se, Sp, PPV and NPV computation for serum bilirunbin at threshold c=0.9(mg/dl) 
res.SeSpPPVNPV.bili <- SeSpPPVNPV(cutpoint=0.9,
                                  T=pbc$time,
                                  delta=pbc$status,marker=pbc$bili,
                                  other_markers=as.matrix(pbc[,c("chol","albumin")]),
                                  cause=1,weighting="cox",
                                  times=quantile(pbc$time,probs=seq(0.2,0.8,0.1)))

# prints descriptive statistics and Se, Sp, PPV and NPV
#  estimates for serum bilirunbin at threshold c=0.9(mg/dl) 
print(res.SeSpPPVNPV.bili,No.lines=20,digits=1)

ROC.bili.marginal<-timeROC(T=pbc$time,
                           delta=pbc$status,marker=pbc$bili,
                           cause=1,weighting="marginal",
                           times=quantile(pbc$time,probs=seq(0.1,0.9,0.2)),
                           iid=TRUE)

# prints descriptive statistics, AUC estimates and also standard errors
# of AUCs because weighting="marginal" and iid=TRUE were used.
print(ROC.bili.marginal)

##-------------With competing risks-------------------
data(Melano)
ROC.thick<-timeROC(T=Melano$time,delta=Melano$status,
                   marker=Melano$thick,cause=1,
                   weighting="marginal",
                   times=c(1500,2000,2500),iid=TRUE)

# prints descriptive statistics, AUC estimates and also standard errors
# of AUCs because weighting="marginal" and iid=TRUE were used.
print(ROC.thick)


# Se, Sp, PPV and NPV computation for tumor thickness at
#threshold c=3 (1/100 mm)
res.SeSpPPVNPV.thick <- SeSpPPVNPV(cutpoint=3,
                                  T=Melano$time,delta=Melano$status,
                                  weighting="marginal",
                                  marker=Melano$thick,cause=1,
                                  times=c(1800,2000,2200),
                                  iid=TRUE)
print(res.SeSpPPVNPV.thick,digits=1)

[Package timeROC version 0.4 Index]