intELtest: The integrated EL test

Description Usage Arguments Details Value References See Also Examples

View source: R/intELtest.R

Description

intELtest gives a class of integrated EL statistics:

∑_{i=1}^{m}w_i\cdot \{-2\log R(t_i)\},

where R(t) is the EL ratio that compares the survival functions at each given time t, w_i is the weight at each t_i, and 0<t_1<…<t_m<∞ are the (ordered) observed uncensored times at which the Kaplan–Meier estimate is positive and less than 1 for each sample.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
intELtest(
  formula,
  data = NULL,
  group_order = NULL,
  t1 = 0,
  t2 = Inf,
  sided = 2,
  nboot = 1000,
  wt = "p.event",
  alpha = 0.05,
  seed = 1011,
  nlimit = 200
)

Arguments

formula

a formula object with a Surv object as the response on the left of the ~ operator and the grouping variable as the term on the right. The Surv object involves two variables: the observed survival and censoring times, and the censoring indicator, which takes a value of 1 if the observed time is uncensored and 0 otherwise. The grouping variable takes different values for different groups.

data

an optional data frame containing the variables in the formula: the observed survival and censoring times, the censoring indicator, and the grouping variable. If not found in data, the variables in the formula should be already defined by the user or in attached R objects. The default is the data frame with three columns of variables taken from the formula: column 1 contains the observed survival and censoring times, column 2 the censoring indicator, and column 3 the grouping variable.

group_order

a k-vector containing the values of the grouping variable, with the j-th element being the group hypothesized to have the j-th highest survival rates, j=1,…,k. The default is the vector of sorted grouping variables.

t1

the first endpoint of a prespecified time interval, if any, to which the comparison of the survival functions is restricted. The default value is 0.

t2

the second endpoint of a prespecified time interval, if any, to which the comparison of the survival functions is restricted. The default value is .

sided

2 if two-sided test, and 1 if one-sided test. The default value is 2.

nboot

the number of bootstrap replications in calculating critical values for the tests. The default value is 1000.

wt

the name of the weight for the integrated EL statistics: "p.event", "dF", or "dt". The default is "p.event".

alpha

the pre-specified significance level of the tests. The default value is 0.05.

seed

the seed for the random number generator in R, for generating bootstrap samples needed to calculate the critical values for the tests. The default value is 1011.

nlimit

a number used to calculate nsplit= m/nlimit, the number of parts into which the calculation of the nboot bootstrap replications is split. The use of this variable can make computation faster when the number of time points m is large. The default value for nlimit is 200.

Details

There are three options for the weight w_i:

Value

intELtest returns a intELtest object, a list with 15 elements:

Methods defined for intELtest objects are provided for print and summary.

References

See Also

hepatitis, supELtest, ptwiseELtest, nocrossings, print.intELtest, summary.intELtest

Examples

1
2
3
4
5
6
7
8
9
library(survELtest)
intELtest(survival::Surv(hepatitis$time, hepatitis$censor) ~ hepatitis$group)

## OUTPUT:
## Call:
## intELtest(formula = survival::Surv(hepatitis$time, hepatitis$censor) ~ 
##     hepatitis$group)
## 
## Two-sided integrated EL test statistic = 1.42, p = 0.007

survELtest documentation built on Jan. 14, 2020, 1:07 a.m.