nocrossings {survELtest}R Documentation

The test that excludes the possibility of crossings or alternative orderings among the survival functions

Description

The test nocrossings should be used before one-sided testing via intELtest or supELtest to exclude the possibility of crossings or alternative orderings among the survival functions.

Usage

nocrossings(
  formula,
  data = NULL,
  group_order = NULL,
  t1 = 0,
  t2 = Inf,
  sided = 2,
  nboot = 1000,
  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 11 if the observed time is uncensored and 00 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 kk-vector containing the values of the grouping variable, with the jj-th element being the group hypothesized to have the jj-th highest survival rates, j=1,,kj=1,\ldots,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 00.

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 \infty.

sided

22 if two-sided test, and 11 if one-sided test. The default value is 22.

nboot

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

alpha

the pre-specified significance level of the tests. The default value is 0.050.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 10111011.

nlimit

a number used to calculate nsplit= mm/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 mm is large. The default value for nlimit is 200.

Value

nocrossings returns a nocrossings object, a list with 12 elements:

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

References

See Also

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

Examples

library(survELtest)
nocrossings(survival::Surv(hepatitis$time, hepatitis$censor)~
    hepatitis$group, sided = 1)

## OUTPUT:
## Call:
## nocrossings(formula = survival::Surv(hepatitis$time, hepatitis$censor) ~ 
##     hepatitis$group, sided = 1)
## 
## Decision = 1

[Package survELtest version 2.0.1 Index]