# \donttest{
library(CardioCurveR)
library(data.table)
# Simulate an example RRi signal:
set.seed(123)
t <- seq(0, 20, by = 0.01)
true_params <- c(alpha = 800, beta = -350, c = 0.80,
lambda = -3, phi = -2, tau = 6, delta = 3)
RRi_true <- dual_logistic(t, true_params)
RRi_sim <- RRi_true + rnorm(n = length(t), sd = 30)
# Estimate the model parameters:
fit <- estimate_RRi_curve(time = t, RRi = RRi_sim)
# Bootstrap the parameter estimates using 50% of the data per replicate and 100 replicates
boot_fit <- boot_RRi_parameters(fit = fit, prop_of_samples = 0.5, nboot = 100)
# View the bootstrap estimates
print(boot_fit)
# }
Run the code above in your browser using DataLab