powered by
Calculates the score function of the log rank test for non-inferiority trial
sf(event, status, delta0, group, experiment, control)
Returns the value of score statistic.
event time vector from person level trial data.
numeric vector indicating the status of event from person level trial data.
Non-inferiority margin.
group string vector indicating the assignment of patients into control or experimental group.
name of experimental group as character string.
name of control group as character string.
Tushar Patni, Yimei Li, Jianrong Wu, and Arzu Onar-Thomas.
time<-c(20,65,12,50,58,65,45,44) event<-c(1,0,0,0,1,1,1,1) group<-c(rep("exp",4),rep("cont",4)) gg<-sf(event=time,status=event,delta0=1.3,group=group,experiment="exp",control="cont")
Run the code above in your browser using DataLab