Calculating the probabilities of positive binary exposure status at a given time point using a nonparametric risk-set calibration models
Calculating the probabilities of positive binary exposure status at a given time point using a nonparametric risk-set calibration models
For a given time point, calculate the probability of positive exposure value for multiple observations (participants). The function first fits the nonparametric risk-set calibration models at each main event time point and then calculates the probabilities of positive binary exposure status.
CalcNpmleRSP(w, w.res, point, obs.tm)
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
obs.tm: Vector of observed main event time or censoring time
Returns
A vector of estimated probabilities of positive exposure status at time point.
Details
This function calculates the NPMLE at each main event time point and then provides the estimated probabilities for positive exposure status at time point.
Examples
# Simulate data setsim.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)# Calculate the conditional probabilities of binary covariate=1 at time one# Unlike CalcNpmle, CalcNpmleRSP includes the calibration model fittingprobs <- CalcNpmleRSP(w = sim.data$w, w.res = sim.data$w.res, point =1, obs.tm = sim.data$obs.tm)summary(probs)