proprate2.ks {surv2sample}R Documentation

Kolmogorov–Smirnov Test of Proportional Rates in Two Samples of Censored Data

Description

Checks the assumption of proportional rates (proportional hazards, proportional odds) in two samples of right-censored data using the Kolmogorov–Smirnov test based on the simplified partial likelihood score process.

Usage

proprate2.ks(x, group, model = 0, nsim = 2000, nsim.plot = 50,
             beta.init = 0, maxiter = 20, eps = 1e-09)

Arguments

x a "Surv" object, as returned by the Surv function.
group a vector indicating to which group each observation belongs. May contain values 1 and 2 only.
model the type of model. Possible values are 0 for proportional hazards, 1 for proportional odds.
nsim the number of simulations to approximate the p-value. Must be positive.
nsim.plot the number of simulated paths of the test process to be returned (for possible plotting). Must be at most nsim.
beta.init the initial parameter value for iteration in the simplified partial likelihood estimation.
maxiter the maximum number of iterations.
eps the convergence tolerance parameter. The convergence criterion is |(l-l_old)/l|<eps.

Details

This function tests the hypothesis that transformation rates (currently hazard rates or odds functions) are proportional (their ratio is constant in time) in two samples of censored survival data.

The proportional rate model is estimated by a two-sample simplification of the partial likelihood. The test then uses the Kolmogorov–Smirnov supremum statistic based on the simplified partial likelihood score process. The p-value is computed using the martingale simulation technique.

Value

A list of class "proprate2.ks" and "lwy.test", with main components:

stat the test statistic.
pval.sim the simulation based p-value.
test.process the test process.
test.process.sim simulated paths of the test process (a matrix with nsim.plot columns).
time sorted times.

Some of input parameters and further components are included too.

Author(s)

David Kraus (http://www.davidkraus.net/)

References

Bagdonavicius, V. and Nikulin, M. (2000) On goodness-of-fit for the linear transformation and frailty models. Statist. Probab. Lett. 47, 177–188.

See Also

plot method inherited from the class "lwy.test"

proprate2.neyman, proprate2.gs for other tests of the proportional rate assumption

proprate2 for estimation

Examples

## chronic active hepatitis data
data(hepatitis)

## perform the Komogorov--Smirnov test of proportional odds
a = proprate2.ks(Surv(hepatitis$time, hepatitis$status),
    hepatitis$treatment, model = 1)
a
## plot the test process and simulated paths
plot(a)

[Package surv2sample version 0.1-2 Index]