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 probablity
# fit Log-Logistic renewal model
result <- marp::loglogis_rp(data, t, m, y)
# print result
cat("par1 = ", result$par1, "\n")
cat("par2 = ", result$par2, "\n")
cat("logL = ", result$logL, "\n")
cat("AIC = ", result$AIC, "\n")
cat("BIC = ", result$BIC, "\n")
cat("mu_hat = ", result$mu_hat, "\n")
cat("pr_hat = ", result$pr_hat, "\n")
Run the code above in your browser using DataLab