Fits a cumulative odds model for discrete time-to-event data, handling interval censoring where the event time is known only to lie within an interval \((t_l, t_r]\). The model assumes: $$ \text{logit}(P(T \leq t | x)) = \log(G(t)) + x \beta $$ where \(G(t)\) is the baseline cumulative odds function and \(\beta\) are the regression coefficients. This is equivalent to: $$ P(T \leq t | x) = \frac{G(t) \exp(x \beta)}{1 + G(t) \exp(x \beta)} $$
interval_logitsurv_discrete(
formula,
data,
beta = NULL,
no.opt = FALSE,
method = "NR",
stderr = TRUE,
weights = NULL,
offsets = NULL,
exp.link = 1,
increment = 1,
...
)An object of class "cumoddsreg" containing:
Estimated coefficients (baseline time effects and covariate effects).
Standard errors of the coefficients.
Variance-covariance matrix.
Influence function (IID) decomposition for robust variance estimation.
Number of distinct time intervals.
Unique time points.
Log-likelihood at convergence.
Optimization results.
Original function call.
Formula with an Interval object (e.g., Interval(entry, time))
on the left-hand side and covariates on the right. Can include cluster() for
correlated data.
Data frame containing the variables in the formula.
Starting values for the optimization (vector of length \(p + k\), where \(p\) is the number of covariates and \(k\) is the number of time intervals).
Logical; if TRUE, skips optimization and returns estimates based on
the provided beta (useful for initialization).
Optimization method: "NR" (Newton-Raphson, default) or "nlm".
Logical; if FALSE, returns only the coefficient estimates.
Observation weights (follows ID).
Offsets (follows ID).
Logical; if TRUE, parameterizes increments as \(\exp(\alpha) > 0\).
Logical; if TRUE, uses increments \(dG(t) = \exp(\alpha)\) as parameters.
Additional arguments passed to the optimizer (lava::NR or nlm).
Thomas Scheike
The baseline \(G(t)\) is parameterized as the cumulative sum of exponentials (\(G(t) = \sum \exp(\alpha)\)), ensuring positivity. The regression coefficients describe the log-odds of the event occurring by time \(t\).
The likelihood is maximized over the observed intervals: $$ L = \prod_i [ P(T_i > t_{il} | x_i) - P(T_i > t_{ir} | x_i) ] $$ where \(t_{il}\) and \(t_{ir}\) are the left and right endpoints of the interval for subject \(i\). Right-censored intervals have \(t_{ir} = \infty\).
Scheike, T. H. (2024). Discrete time survival analysis with interval censoring. mets package documentation.
cumoddsreg, predictlogitSurvd, simlogitSurvd
data(ttpd)
dtable(ttpd,~entry+time2)
out <- interval_logitsurv_discrete(Interval(entry,time2)~X1+X2+X3+X4,ttpd)
summary(out)
head(iid(out))
pred <- predictlogitSurvd(out,se=FALSE)
plotSurvd(pred)
ttpd <- dfactor(ttpd,fentry~entry)
out <- cumoddsreg(fentry~X1+X2+X3+X4,ttpd)
summary(out)
Run the code above in your browser using DataLab