lrtest {lrstat}R Documentation

Log-rank test of survival curve difference

Description

Obtains the log-rank test using the Fleming-Harrington family of weights.

Usage

lrtest(
  data,
  rep = "rep",
  stratum = "stratum",
  treat = "treat",
  time = "time",
  event = "event",
  rho1 = 0,
  rho2 = 0
)

Arguments

data

The input data frame that contains the following variables:

  • rep: The replication for by-group processing.

  • stratum: The stratum.

  • treat: The treatment.

  • time: The possibly right-censored survival time.

  • event: The event indicator.

rep

The name of the replication variable in the input data.

stratum

The name of the stratum variable in the input data.

treat

The name of the treatment variable in the input data.

time

The name of the time variable in the input data.

event

The name of the event variable in the input data.

rho1

The first parameter of the Fleming-Harrington family of weighted log-rank test. Defaults to 0 for conventional log-rank test.

rho2

The second parameter of the Fleming-Harrington family of weighted log-rank test. Defaults to 0 for conventional log-rank test.

Value

A data frame with the following variables:

Author(s)

Kaifeng Lu, kaifenglu@gmail.com

Examples


df <- lrtest(data = rawdata, rep = "iterationNumber",
             stratum = "stratum", treat = "treatmentGroup",
             time = "timeUnderObservation", event = "event",
             rho1 = 0.5, rho2 = 0)
head(df)


[Package lrstat version 0.2.6 Index]