marp_confint {marp} | R Documentation |
A function to apply model-averaged renewal process
Description
A function to apply model-averaged renewal process
Usage
marp_confint(data, m, t, B, BB, alpha, y, which.model)
Arguments
data |
input inter-event times |
m |
the number of iterations in nlm |
t |
user-specified time intervals (used to compute hazard rate) |
B |
number of bootstrap samples |
BB |
number of double-bootstrap samples |
alpha |
significance level |
y |
user-specified time point (used to compute time-to-event probability) |
which.model |
user-specified generating (or true underlying if known) model |
Value
returns list of point and interval estimation obtained from different renewal models (including model-averaged confidence intervals).
- par1
Estimated scale parameters (if applicable) of all six renewal models
- par2
Estimated shape parameters (if applicable) of all six renewal models
- logL
Negative log-likelihood
- AIC
Akaike information criterion (AIC)
- BIC
Bayesian information criterion (BIC)
- mu_hat
Estimated mean
- pr_hat
Estimated (logit) probabilities
- haz_hat
Estimated (log) hazard rates
- weights_AIC
Model weights calculated based on AIC
- weights_BIC
Model weights calculated based on BIC
- model_best
Model selected based on the lowest AIC
- mu_best
Estimated mean obtained from the model with the lowest AIC
- pr_best
Estimated probability obtained from the model with the lowest AIC
- haz_best
Estimated hazard rates obtained from the model with the lowest AIC
- mu_gen
Estimated mean obtained from the (true or hypothetical) generating model
- pr_gen
Estimated probability obtained from the (true or hypothetical) generating model
- haz_gen
Estimated hazard rates obtained from the (true or hypothetical) generating model
- mu_aic
Estimated mean obtained from model-averaging (using AIC weights)
- pr_aic
Estimated probability obtained from model-averaging (using AIC weights)
- haz_aic
Estimated hazard rates obtained from model-averaging (using AIC weights)
- mu_bstrp
Estimated mean obtained from model-averaging (using bootstrapped weights)
- pr_bstrp
Estimated probability obtained from model-averaging (using bootstrapped weights)
- haz_bstrp
Estimated hazard rates obtained from model-averaging (using bootstrapped weights)
- weights_bstp
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
- mu_gen
Median of the percentile bootstrap confidence interval of the estimated mean based on the generating model
- mu_gen_lower
Lower limit of the percentile bootstrap confidence interval of the estimated mean based on the generating model
- mu_gen_upper
Upper limit of the percentile bootstrap confidence interval of the estimated mean based on the generating model
- mu_best
Median of the percentile bootstrap confidence interval of the estimated mean based on the best model
- mu_best_lower
Lower limit of the percentile bootstrap confidence interval of the estimated mean based on the best model
- mu_best_upper
Upper limit of the percentile bootstrap confidence interval of the estimated mean based on the best model
- pr_gen
Median of the percentile bootstrap confidence interval of the estimated probabilities based on the generating model
- pr_gen_lower
Lower limit of the percentile bootstrap confidence interval of the estimated probabilities based on the generating model
- pr_gen_upper
Upper limit of the percentile bootstrap confidence interval of the estimated probabilities based on the generating model
- pr_best
Median of the percentile bootstrap confidence interval of the estimated probabilities based on the best model
- pr_best_lower
Lower limit of the percentile bootstrap confidence interval of the estimated probabilities based on the best model
- pr_best_upper
Upper limit of the percentile bootstrap confidence interval of the estimated probabilities based on the best model
- haz_gen
Median of the percentile bootstrap confidence interval of the estimated hazard rates based on the generating model
- haz_gen_lower
Lower limit of the percentile bootstrap confidence interval of the estimated hazard rates based on the generating model
- haz_gen_upper
Upper limit of the percentile bootstrap confidence interval of the estimated hazard rates based on the generating model
- haz_best
Median of the percentile bootstrap confidence interval of the estimated hazard rates based on the best model
- haz_best_lower
Lower limit of the percentile bootstrap confidence interval of the estimated hazard rates based on the best model
- haz_best_upper
Upper limit of the percentile bootstrap confidence interval of the estimated hazard rates based on the best model
- mu_lower_gen
Lower limit of the studentized bootstrap confidence interval of the estimated mean based on the generating model
- mu_upper_gen
Upper limit of the studentized bootstrap confidence interval of the estimated mean based on the generating model
- mu_lower_best
Lower limit of the studentized bootstrap confidence interval of the estimated mean based on the best model
- mu_upper_best
Upper limit of the studentized bootstrap confidence interval of the estimated mean based on the best model
- pr_lower_gen
Lower limit of the studentized bootstrap confidence interval of the estimated probabilities based on the generating model
- pr_upper_gen
Upper limit of the studentized bootstrap confidence interval of the estimated probabilities based on the generating model
- pr_lower_best
Lower limit of the studentized bootstrap confidence interval of the estimated probabilities based on the best model
- pr_upper_best
Upper limit of the studentized bootstrap confidence interval of the estimated probabilities based on the best model
- haz_lower_gen
Lower limit of the studentized bootstrap confidence interval of the estimated hazard rates based on the generating model
- haz_upper_gen
Upper limit of the studentized bootstrap confidence interval of the estimated hazard rates based on the generating model
- haz_lower_best
Lower limit of the studentized bootstrap confidence interval of the estimated hazard rates based on the best model
- haz_upper_best
Upper limit of the studentized bootstrap confidence interval of the estimated hazard rates based on the best model
- mu_lower_ma
Lower limit of model-averaged studentized bootstrap confidence interval of the estimated mean
- mu_upper_ma
Upper limit of model-averaged studentized bootstrap confidence interval of the estimated mean
- pr_lower_ma
Lower limit of model-averaged studentized bootstrap confidence interval of the estimated probabilities
- pr_upper_ma
Upper limit of model-averaged studentized bootstrap confidence interval of the estimated probabilities
- haz_lower_ma
Lower limit of model-averaged studentized bootstrap confidence interval of the estimated hazard rates
- haz_upper_ma
Upper limit of model-averaged studentized bootstrap confidence interval of the estimated hazard rates
Examples
# 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
alpha <- 0.05 # confidence level
y <- 304 # cut-off year for estimating probability
B <- 100 # number of bootstraps
BB <- 100 # number of double bootstraps
which.model <- 2 # specify the generating model
# construct confidence invtervals
res <- marp::marp_confint(data,m,t,B,BB,alpha,y,which.model)