FH_test {EventPredInCure}R Documentation

Fleming-Harrington weighted log-rank tests

Description

Calculating the Fleming-Harrington weighted log-rank tests

Usage

FH_test(survival, delta, trt, rho, gamma, test = c("Futility"))

Arguments

survival

Time to event or censoring.

delta

Event indicators.

trt

Treatment assignment indicator with 1 denoting the treated group, and 0 denoting the placebo group.

rho

First power parameter for the Fleming-Harrington weight which weighs on the early departures: S(t^-)^\rho(1-S(t^-))^\gamma.

gamma

Second power parameter for the Fleming-Harrington weight which weighs on the late departures: S(t^-)^\rho(1-S(t^-))^\gamma.

test

a character denotes the test type, include "Superiority","Futility","Two-sided"

Value

A list 3 different components

O1

Observed number of weighted events (with a multiplication of corresponding weights) in the treatment arm.

E1

Expected number of weighted events (with a multiplication of corresponding weights) in the treatment arm.

Z

Weighted log-rank test statistic.

pvalue

Weighted log-rank test statistic pvalue

Examples

n <- 500
event <- runif(n,1, 5)
osc<-1*(event<=4)
os <- pmin(event,4)
trt<-c(rep(0,n/2),rep(1,n/2))
FH_test(os,osc,trt,rho=1,gamma=0)


[Package EventPredInCure version 1.0 Index]