FitCalibWeibullRS {ICcalib}R Documentation

Fitting Weibull Risk-Set Calibration Models

Description

Fits Weibull risk-set calibration models for time-to-exposure from interval-censored data. The exposure is a binary covariate measured in intermittent times. This function fits a calibration model at each main event time point, using only members of the risk set at that time point.

Usage

FitCalibWeibullRS(w, w.res, tm, event, lower = 1e-04, upper = 200)

Arguments

w

A matrix of time points when measurements on the binary covariate were obtained.

w.res

A matrix of measurement results of the binary covariate. Each measurement corresponds to the time points in w

tm

Vector of observed main event time or censoring time.

event

Vector of censoring indicators. 1 for event 0 for censored

lower

A value to replace zero in the left point of the interval, Default: 1e-04

upper

A value to replace infinity in the right point of the interval, Default: 200

Details

In case of an error in the model-fitting at a certain time point, a Weibull calibration model is fitted and used for that time point.

Value

A 2-column matrix with the shape and scale parameter for each time-point at which a calibration model was fitted.

See Also

fitdistcens, FitCalibWeibull

Examples

# Simulate data set
sim.data <- ICcalib:::SimCoxIntervalCensSingle(n.sample = 200, lambda = 0.1, 
                                               alpha = 0.25, beta0 = log(0.5), 
                                               mu = 0.2, n.points = 2, 
                                               weib.shape = 1, weib.scale = 2)
# Fit Weibull risk-set calibration models for the conditional covariate 
# starting-time distributions
ICcalib::FitCalibWeibullRS(w = sim.data$w, w.res = sim.data$w.res, 
                           tm = sim.data$obs.tm, event = sim.data$delta)

[Package ICcalib version 1.0.8 Index]