percent_confint {marp} | R Documentation |
A function to calculate percentile bootstrap confidence interval
percent_confint(data, B, t, m, y, which.model = 1)
data |
input inter-event times |
B |
number of bootstrap samples |
t |
user-specified time intervals (used to compute hazard rate) |
m |
the number of iterations in nlm |
y |
user-specified time point (used to compute time-to-event probability) |
which.model |
user-specified generating (or true underlying if known) model |
returns list of percentile bootstrap intervals (including the model-averaged approach).
Model weights calculated by bootstrapping, that is, the frequency of each model being selected as the best model is divided by the total number of bootstraps
Median of the percentile bootstrap confidence interval of the estimated mean based on the generating model
Lower limit of the percentile bootstrap confidence interval of the estimated mean based on the generating model
Upper limit of the percentile bootstrap confidence interval of the estimated mean based on the generating model
Median of the percentile bootstrap confidence interval of the estimated mean based on the best model
Lower limit of the percentile bootstrap confidence interval of the estimated mean based on the best model
Upper limit of the percentile bootstrap confidence interval of the estimated mean based on the best model
Median of the percentile bootstrap confidence interval of the estimated probabilities based on the generating model
Lower limit of the percentile bootstrap confidence interval of the estimated probabilities based on the generating model
Upper limit of the percentile bootstrap confidence interval of the estimated probabilities based on the generating model
Median of the percentile bootstrap confidence interval of the estimated probabilities based on the best model
Lower limit of the percentile bootstrap confidence interval of the estimated probabilities based on the best model
Upper limit of the percentile bootstrap confidence interval of the estimated probabilities based on the best model
Median of the percentile bootstrap confidence interval of the estimated hazard rates based on the generating model
Lower limit of the percentile bootstrap confidence interval of the estimated hazard rates based on the generating model
Upper limit of the percentile bootstrap confidence interval of the estimated hazard rates based on the generating model
Median of the percentile bootstrap confidence interval of the estimated hazard rates based on the best model
Lower limit of the percentile bootstrap confidence interval of the estimated hazard rates based on the best model
Upper limit of the percentile bootstrap confidence interval of the estimated hazard rates based on the best model
# generate random data
set.seed(42)
data <- rgamma(30, 3, 0.01)
# set some parameters
m <- 10 # number of iterations for MLE optimization
t <- seq(100,200,by=10) # time intervals
y <- 304 # cut-off year for estimating probablity
B <- 100 # number of bootstraps
BB <- 100 # number of double bootstraps
which.model <- 2 # specify the generating model
# construct percentile bootstrap confidence invtervals
marp::percent_confint(data, B, t, m, y, which.model)