# Create a primarycensored object with gamma delay and uniform primary
pcens_obj <- new_pcens(
pdist = pgamma,
dprimary = dunif,
dprimary_args = list(min = 0, max = 1),
shape = 3,
scale = 2
)
# Compute quantile for a single probability
pcens_quantile(pcens_obj, p = 0.8, pwindow = 1)
# Compute quantiles for multiple probabilities
pcens_quantile(pcens_obj, p = c(0.25, 0.5, 0.75), pwindow = 1)
# Compute quantiles for multiple probabilities with truncation
pcens_quantile(pcens_obj, p = c(0.25, 0.5, 0.75), pwindow = 1, D = 10)
Run the code above in your browser using DataLab