survBootOutliers: Extract the most outlying observations following a criteria...

Description Usage Arguments Value Examples

View source: R/survBootOutliers.R

Description

Extract the most outlying observations following a criteria based on the bootstrapped concordance with parallel processing

Usage

1
2
survBootOutliers(surv.object, covariate.data, sod.method, B, B.N = NULL,
  max.outliers, parallel.param = NULL)

Arguments

surv.object

An obect of type survival::Surv containing lifetimes and right-censoring status

covariate.data

A data frame containing the data with covariate values for each individual

sod.method

One of c("osd","bht","dbht","ld","martingale","deviance")

B

The number of bootstrap samples generated only applicable for "bht" and "dbht" methods. Typically at least 10x the size of the dataset, ideally should be increased until convergence.

B.N

the number of observations in each bootstrap sample

max.outliers

This parameter is only used for the "osd" method

parallel.param

(Optional) A BiocParallel object, examples: SerialParam(), MulticoreParam()

Value

For all methods except for "bht" and "dbht" the value returned is a data.frame containing the most outlying observations sorted by outlying score. For the "bht" method the value returned is a list of two members: "outlier_set": the most outlygin observations sorted by p-values; "histograms": histogram of concordance variation for each observation. For the "dbht" method the value returned is a list of two members: "outlier_set": the most outlygin observations sorted by p-values; "histograms": histogrms of concordance for each observations for the two types of bootstap: "poison" and "antidote".

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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
## One Step Deletion "osd" method
## Not run: 
whas <- get.whas100.dataset()
print( getwd() )
outliers_osd <- survBootOutliers( 
   surv.object=Surv(time = whas$times,event = whas$status ), 
   covariate.data = whas[,2:5], 
   sod.method = "osd", 
   max.outliers = 5
 )

## End(Not run)

## Bootstrap Hypothesis Test "bht" with 1000 bootstrap samples, 
## each with 100 individuals, running without parallelism.
## Not run:   
whas <- get.whas100.dataset()
outliers_bht <- survBootOutliers( 
     surv.object=Surv(time = whas$times,event = whas$status ), 
     covariate.data = whas[,2:5], 
     sod.method = "bht", 
     B = 1000, 
     B.N = 100,
     parallel.param = BiocParallel::MulticoreParam() 
)

## End(Not run)

## Dual Bootstrap Hypothesis Test "dbht" with 1000 bootstrap samples,
## each with 50 individuals and running on all available cores.
## Not run:  whas <- get.whas100.dataset()
outliers_dbht <- survBootOutliers( 
   surv.object=Surv(time = whas$times,event = whas$status ), 
   covariate.data = whas[,2:5], 
   sod.method = "dbht",
   B = 1000, 
   B.N = 50,
   parallel.param = BiocParallel::MulticoreParam() 
)

## End(Not run)
## One Step Deletion "osd" with an amount of 10 for maximum outlier count
whas <- get.whas100.dataset()
outliers_osd <- survBootOutliers( 
   surv.object=Surv(time = whas$times,event = whas$status ), 
   covariate.data = whas[,2:5], 
   sod.method = "osd", 
   max.outliers = 10
)

## Likelihood displacement criterion for outlier ranking
whas <- get.whas100.dataset()
outliers_ld <- survBootOutliers( 
   surv.object=Surv(time = whas$times,event = whas$status ), 
   covariate.data = whas[,2:5], 
   sod.method = "ld"
)

## Cox regression deviance residuals criterion for outlier ranking
whas <- get.whas100.dataset()
outliers_deviance <- survBootOutliers( 
   surv.object=Surv(time = whas$times,event = whas$status ), 
   covariate.data = whas[,2:5], 
   sod.method = "deviance"
)

## Cox regression Martingale residuals criterion for outlier ranking
whas <- get.whas100.dataset()
outliers_martingale <- survBootOutliers( 
   surv.object=Surv(time = whas$times,event = whas$status ), 
   covariate.data = whas[,2:5], 
   sod.method = "martingale"
)

jonydog/survBootOutliers documentation built on May 14, 2019, 8:54 a.m.