# ptwiseELtest: The pointwise likelihood ratio test In EL2Surv: Empirical Likelihood (EL) for Comparing Two Survival Functions

## Description

ptwiseELtest gives pointwise EL statistic values at uncensored time span. The pointwise statistic considers only the decision on each single time point; thus, it is different from the integral type and sup type statistics.

## Usage

 1 2 3 ptwiseELtest(data, g1 = 1, t1 = 0, t2 = Inf, sided = 2, nboot = 1000, alpha = 0.05, compo = FALSE, seed = 1011, nlimit = 200) 

## Arguments

 data a data frame/matrix with 3 columns. The first column is the survival time. The second is the censoring indicator. The last is the grouping variable. An example as the input to data provided is hepatitis. g1 the group with longer survival in one-sided testing with the default value of 1. t1 pre-specified t_1 based on domain knowledge with the default value of 0 t2 pre-specified t_2 based on domain knowledge with the default value of ∞ sided 2 if two-sided test, and 1 if one-sided test. It assumes the default value of 2. nboot number of bootstrap replications in calculating critical values with the defualt value of 1000. alpha pre-specified significance level of the test with the default value of 0.05 compo FALSE if taking the standardized square of the difference as the local statisic for two-sided testing, and TRUE if constructing for one-sided testing, but only the positive part of the difference included. It assumes the default value of FALSE. seed the parameter with the default value of 1011 to set.seed for generating bootstrap-based critical values in R. The set.seed is used implicitly in intELtest. nlimit the splitting unit with the default value of 200. To deal with large data problems, the bootstrap algorithm is to split the number of bootstrap replicates into nsplit parts. The number nsplit is the smallest integer not less than ≤ft\| U\right\|/nlimit.

## Value

ptwiseELtest returns a list with four elements:

• time_pts the values of statistics at each uncensored time point

• decision logical values. See stat_ptwise.

• stat_ptwise the decision of the test in which the null hypothesis os rejected at a specific day if the decision exhibits 1 and not rejected if otherwise

• critval_ptwise the critical values of the statistic at each uncensored time point

## References

H.-w. Chang and I. W. McKeague, "Empirical likelihood based tests for stochastic ordering under right censorship," Electronic Journal of Statistics, Vol. 10, No. 2, pp. 2511-2536 (2016).

hepatitis, intELtest, supELtest
 1 2 3 4 5 6 7 8 library(EL2Surv) ptwiseELtest(hepatitis) ## It produces the estimates on 44 distinct uncensored days ## out of 57 possibly repeated uncensored days. ptwiseELtest(hepatitis, t1 = 30, t2 = 60) ## It produces the estimates on 12 distinct uncensored days ## on the restricted time interval [30, 60].