data_prep: Prepare Data for Interval-Censored Model

View source: R/iclogcondist_functions.R

data_prepR Documentation

Prepare Data for Interval-Censored Model

Description

This function processes interval-censored data and prepares various components needed for model fitting, including unique time points, censoring intervals, and weights.

Usage

data_prep(X)

Arguments

X

A matrix or data frame of interval-censored data where each row contains the lower and upper bounds of the interval for each observation.

Value

A list containing:

tau

Unique time points.

m

The number of unique time points (excluding infinity if present).

L_Rc

Indices of observations where the event is in the intersection of L group and the complement of R group. The L group consists of samples with left intervals time <= min(all right intervals time). The R group consists of samples with infinity right interval time.

Lc_R

Indices of observations where the event is in the intersection of the complement of L group and R group.

Lc_Rc

Indices of observations where the event is in the intersection of the complement of L group and the complement of R group.

ri

Indices corresponding to the right bounds of the intervals in tau.

li

Indices corresponding to the left bounds of the intervals in tau.

tau_no_Inf

Unique time points excluding infinity.

weight

Weights for each unique interval.

X

Processed matrix of interval-censored data with unique rows.


iclogcondist documentation built on April 4, 2025, 5:18 a.m.