get_survdiff {dropR}R Documentation

Test Survival Curve Differences

Description

This function compares survival curves as modeled with do_kpm(). It outputs a contingency table and a Chisq measure of difference.

Usage

get_survdiff(kds, cond, test_type)

Arguments

kds

data set of a survival model such as do_kpm()

cond

character of experimental condition variable in the data

test_type

numeric (0 or 1) parameter that controls the type of test (0 means rho = 0; log-rank, 1 means rho = 1; Peto & Peto Wilcox)

Value

Returns survival test results as called from survival::survdiff().

Examples

kpm_est <- do_kpm(add_dropout_idx(dropRdemo, 3:54))
get_survdiff(kpm_est$d, "experimental_condition", 0)
get_survdiff(kpm_est$d, "experimental_condition", 1)



[Package dropR version 1.0.3 Index]