projection.test {nphPower}R Documentation

Projection test

Description

Perform projection test as proposed by Brendel (2014)

Usage

projection.test(dat, Wlist, base, alpha = 0.05)

Arguments

dat

a dataframe or matrix, of which the first three columns are survival time, event status indicator and group label. The status indicator, normally 0=alive, 1=dead/event. Other choices are TRUE/FALSE (TRUE=death) or 1/2 (2=death). The group label can be either numeric values like 0=control, 1=treatment or text like C=control, T=treatment.

Wlist

a list object with components of weight functions

base

a text must be one of c("KM","Combined","N"), Default: c("KM")

alpha

a number indicating type I error rate, Default: 0.05

Details

The base functions are the same as those described in function MaxLRtest. The method detail can be found in Brendel (2014) paper. The main idea is to map the multiple weighted logrank statistics into a chi-square distribution. The degree freedom of the chi-square is the rank of the generalized inverse of covariance matrix. Only two-sided test is supported in the current function.

Value

a list of components including

chisq

a numeric value indicating the chi-square statistic

df.chis

a numeric value indicating the degree freedom of the test

pvalue

a numeric value giving the p-value of the test

details

a data frame consisting of statistics from multiple weight functions and the variance-covariance matrix

References

Brendel, M., Janssen, A., Mayer, C. D., & Pauly, M. (2014). Weighted logrank permutation tests for randomly right censored life science data. Scandinavian Journal of Statistics, 41(3), 742-761.

See Also

MaxLRtest

Examples

# load and prepare data
data(lung)
tmpd <- with(lung, data.frame(time=SurvTime,stat=1-censor,grp=Treatment))
# two weight functions are defined.
# one is constant weight; the other emphasize diverging hazards
timef1 <- function(x){1}
timef2 <- function(x){(x)}
test1 <- projection.test(tmpd,list(timef1,timef2),base="KM")
test1$chisq; test1$pvalue; test1$df.chisq

[Package nphPower version 1.1.0 Index]