add_weights: Calculate weights for a weighted log-rank test.

Description Usage Arguments Value

View source: R/add_weights.R

Description

add_weights Calculate weights for a weighted log-rank test and add them to the risk table.

Usage

1
2
add_weights(risk_table, method = "fixed_c", delay = 6, rho = 0,
  gamma = 0, plot_weights = FALSE)

Arguments

risk_table

A risk table produced by the function get_risk_table.

method

The type of weighted log-rank test. "fixed_c" means that the scores c are fixed at 1 while t < delay. Thereafter, the weights w remain fixed. "fh" is a Fleming-Harrington test with parameters rho and gamma. "step" means that the weight w is fixed at 0 while t < delay. Thereafter, the weight is fixed at 1.

delay

Parameter used by the "fixed_c" and "step" methods.

rho

First parameter for the "fh" method.

gamma

Second parameter for the "fh" method.

Value

A risk table consisting of the original risk_table with 3 additional columns: c The scores in the score test corresponding to events (uncensored observations). w The weights for the weighted log-rank test. C The scores in the score test corresponding to censored observations.


dominicmagirr/modestWLRT documentation built on Sept. 16, 2020, 2:43 p.m.