Description Usage Arguments Value See Also Examples

View source: R/CalcWeibullCalibP.R

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

1 | ```
CalcWeibullCalibP(w, w.res, point, weib.params)
``` |

`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 |

`point` |
The time point at which the probabilities are estimated. |

`weib.params` |
A bivariate vector. Shape and scale parameters of the Weibull calibration model. |

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

.

1 2 3 4 5 6 7 8 9 10 11 | ```
# 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 a Weibull calibration model for the covariate starting time distribution
calib.weib.params <- FitCalibWeibull(w = sim.data$w, w.res = sim.data$w.res)
# Calculate the conditional probabilities of binary covariate=1 at time one
probs <- CalcWeibullCalibP(w = sim.data$w, w.res = sim.data$w.res, point = 1,
weib.params = calib.weib.params)
summary(probs)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.