Computes a two sample weighted integrated survival function log-rank statistic with events weighted according to one of the available weighting function choices
IntSurvDiff(formula =formula(data), data =parent.frame(), WtFun =c("FH", "SFH", "Ramp"),
param = c(0, 0), sided = c(2, 1), subset, na.action, w = FALSE)
An object of class survtest
containing components
sample size
internal representation of the WtFun
argument
internal representation of the param
argument
unique times of events accross all arms
number at risk accross all arms at each event time
Number at risk in the experimental arm at each event time
Number of events accross all arms at each event time
Number of events in the experimental arm at each event time
Values of the weight function at each event time
Number of event times
The un-normalized weighted log-rank statistic, i.e. the summed weighted observed minus expected differences at each event time
Variance estimate for the above
person units of follow-up time in the control arm
person units of follow-up time in the intervention arm
events in the control arm
events in the intervention arm
sample size, same as pn
the call that created the object
a formula of the form Surv(Time, Event) ~ arm
where arm
is a dichotomous variable with values 0 and 1.
a dataframe
a selection from the available list: “FH” (Fleming-Harrington),
“SFH” (stopped Fleming-Harrington) or “Ramp”. See param
in
the following line.
Weight function parameters. Length and interpretation depends upon
the selected value of WtFun
:
If WtFun
==“FH” then param
is a length 2 vector specifying
the power of the pooled (across arms) kaplan meier estimate and its complement.
If WtFun
==“SFH” then param
is a length 3 vector with first
two components as in the “FH” case, and third component the time (in the same
units as the time to event) at which the “FH” weight function is capped off
at its current value.
If WtFun==SFH
then param
is of length 1 specifying the time
(same units as time to event) at which events begin to get equal weight. The
“Ramp” weight function is a linearly increasing deterministic weight function
which is capped off at 1 at the user specified time.
One or Two sided test? Set to 1 or 2
Analysis can be applied to a subset of the dataframe based upon a logical expression in its variables
Method for handling NA
values in the covariate, arm
currently no effect
Grant Izmirlian <izmirlian@nih.gov
Weiand S, Gail MH, James BR, James KL. (1989). A family of nonparametric statistics for comparing diagnostic makers with paired or unpaired data. Biometrika 76, 585-592.
wtdlogrank
library(PwrGSD)
data(lung)
fit.isd<-IntSurvDiff(Surv(time,I(status==2))~I(sex==2), data=lung, WtFun="SFH", param=c(0,1,300))
Run the code above in your browser using DataLab