marp {marp} | R Documentation |
A function to apply model-averaged renewal process
marp(data, t, m, y, which.model = 1)
data |
input inter-event times |
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 estimates obtained from different renewal processes and after applying model-averaging
Estimated scale parameters (if applicable) of all six renewal models
Estimated shape parameters (if applicable) of all six renewal models
Negative log-likelihood
Akaike information criterion (AIC)
Bayesian information criterion (BIC)
Estimated mean
Estimated (logit) probabilities
Estimated (log) hazard rates
Model weights calculated based on AIC
Model weights calculated based on BIC
Model selected based on the lowest AIC
Estimated mean obtained from the model with the lowest AIC
Estimated probability obtained from the model with the lowest AIC
Estimated hazard rates obtained from the model with the lowest AIC
Estimated mean obtained from the (true or hypothetical) generating model
Estimated probability obtained from the (true or hypothetical) generating model
Estimated hazard rates obtained from the (true or hypothetical) generating model
Estimated mean obtained from model-averaging (using AIC weights)
Estimated probability obtained from model-averaging (using AIC weights)
Estimated hazard rates obtained from model-averaging (using AIC weights)
set.seed(42)
data <- rgamma(100,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 probability
which.model <- 2 # specify the generating model
# model selection and averaging
result <- marp::marp(data, t, m, y, which.model)