test_cutoff: Test survival differences at the variable cutoff.

View source: R/functions.R

test_cutoffR Documentation

Test survival differences at the variable cutoff.

Description

Tests for the differences in survival for observations stratified by the given variable cutoff. The testing ia accomplished by the survdiff function.

Usage

test_cutoff(data, time, event, variable, cutoff, ...)

Arguments

time

name of the survival time variables, needs to be numeric.

event

name of the binary event variable: 1 is event, 0 no event.

variable

name of the variable to be cut, needs to be numeric.

cutoff

the cutoff value.

...

additional arguments passed to survdiff.

Value

a data frame with the cutoff value, chi-squared test statistic, degrees of freedom, p value and n numbers in the low and high strata.


PiotrTymoszuk/kmOptimizer documentation built on May 10, 2022, 3:22 p.m.