This function fits separate models for each distinct value of covariates and computes a likelihood ratio test to test whether there are significant differences between groups.
test_ditrunc_elife(
time,
covariate,
thresh = 0,
ltrunc1 = NULL,
rtrunc1 = NULL,
ltrunc2 = NULL,
rtrunc2 = NULL,
family = c("exp", "gp", "gomp", "gompmake", "weibull", "extgp", "extweibull", "perks",
"beard", "perksmake", "beardmake"),
weights = rep(1, length(time)),
arguments = NULL,
...
)
a list with elements
stat
: likelihood ratio statistic
df
: degrees of freedom
pval
: the p-value obtained from the asymptotic chi-square approximation.
excess time of the event of follow-up time, depending on the value of event
vector of factors, logical or integer whose distinct values are
vector of thresholds
string; choice of parametric family
weights for observations
a named list specifying default arguments of the function that are common to all elife
calls
additional arguments for optimization, currently ignored.