CalcCoxCalibP function

Calculating the probabilities of positive binary exposure status at a given time point using a proportional hazards calibration model

Calculating the probabilities of positive binary exposure status at a given time point using a proportional hazards calibration model

For a given time point, calculate the probability of positive exposure value for multiple observations (participants). The function uses the results of a proportional hazards calibration model fit, and given covariates and collected data on the history of the binary exposure for each participant.

CalcCoxCalibP(w, w.res, point, fit.cox, hz.times, Q)

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
  • point: The time point at which the probabilities are estimated
  • fit.cox: The result of icenReg::ic_sp on the interval-censored data
  • hz.times: Times used for calculating the baseline hazard function from PH calibration model
  • Q: Matrix of covariates for the PH calibration model

Returns

A vector of estimated probabilities of positive exposure status at time point.

Examples

sim.data <- ICcalib:::SimCoxIntervalCensCox(n.sample = 200, lambda = 0.1, alpha = 0.25, beta0 = 0, gamma.q = c(log(0.75), log(2.5)), gamma.z = log(1.5), mu = 0.2, n.points = 2) # The baseline hazard for the calibration model is calculated in observation times cox.hz.times <- sort(unique(sim.data$obs.tm)) # Fit proprtional hazards calibration model fit.cox <- FitCalibCox(w = sim.data$w, w.res = sim.data$w.res, Q = sim.data$Q, hz.times = cox.hz.times, n.int = 5, order = 2) # Calculate the conditional probabilities of binary covariate=1 at time one probs <- CalcCoxCalibP(w = sim.data$w, w.res = sim.data$w.res, point = 1, Q = sim.data$Q, fit.cox = fit.cox, hz.times = cox.hz.times) summary(probs)
  • Maintainer: Daniel Nevo
  • License: GPL (>= 2)
  • Last published: 2018-08-01

Useful links