ipcw.dcor: Calculates an inverse-probability-of-censoring weighted...

Description Usage Arguments Value References Examples

View source: R/distcovsurv.R

Description

Calculates an inverse-probability-of-censoring weighted (IPCW) distance correlation based on IPCW U-statistics \insertCitedatta2010inversedcortools.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
ipcw.dcor(
  Y,
  X,
  affine = FALSE,
  standardize = FALSE,
  timetrafo = "none",
  type.X = "sample",
  metr.X = "euclidean",
  use = "all",
  cutoff = NULL
)

Arguments

Y

A matrix with two columns, where the first column contains the survival times and the second column the status indicators (a survival object will work).

X

A vector or matrix containing the covariate information.

affine

logical; specifies if X should be transformed such that the result is invariant under affine transformations of X

standardize

logical; should X be standardized using the standard deviations of single observations?. No effect when affine = TRUE.

timetrafo

specifies a transformation applied on the follow-up times. Can be "none", "log" or a user-specified function.

type.X

For "distance", X is interpreted as a distance matrix. For "sample", X is intepreted as a sample.

metr.X

specifies the metric which should be used to compute the distance matrix for X (ignored when type.X = "distance").

Options are "euclidean", "discrete", "alpha", "minkowski", "gauss", "gaussauto", "boundsq" or user-specified metrics (see examples).

For "alpha", "minkowski", "gauss", "gaussauto" and "boundsq", the corresponding parameters are specified via "c(metric,parameter)", c("gaussian",3) for example uses a Gaussian metric with bandwith parameter 3; the default parameter is 2 for "minkowski" and "1" for all other metrics.

cutoff

If provided, all survival times larger than cutoff are set to the cutoff and all corresponding status indicators are set to one. Under most circumstances, choosing a cutoff is highly recommended.

Value

An inverse-probability of censoring weighted estimate for the distance correlation between X and the survival times.

References

\insertRef

bottcher2017detectingdcortools

\insertRef

datta2010inversedcortools

\insertRef

dueck2014affinelydcortools

\insertRef

huo2016fastdcortools

\insertRef

lyons2013distancedcortools

\insertRef

sejdinovic2013equivalencedcortools

\insertRef

szekely2007dcortools

\insertRef

szekely2009browniandcortools

Examples

1
2
3
4
5
6
7
X <- rnorm(100)
survtime <- rgamma(100,abs(X))
cens <- rexp(100)
status <- as.numeric(survtime<cens)
time <- sapply(1:100, function(u) min(survtime[u], cens[u]))
surv <- cbind(time,status)
ipcw.dcor(surv, X)

edelmand21/dcortools documentation built on Nov. 18, 2020, 12:28 p.m.