# Define example parameters based on Castillo-Aguilar et al. (2025)
params <- list(alpha = 1000, beta = -380, lambda = -3, tau = 6,
c = 0.85, phi = -2, delta = 3)
# Simulate a time vector
t <- seq(0, 20, length.out = 150)
# Compute the dual-logistic model values
RRi_model <- dual_logistic(t, params)
# Plot the resulting model
library(ggplot2)
ggplot() +
geom_line(aes(t, RRi_model), linewidth = 1, col = "purple") +
labs(x = "Time (min)", y = "RRi (ms)",
title = "Dual-Logistic RRi Model",
caption = "Castillo-Aguilar et al. (2025)") +
theme_minimal()
Run the code above in your browser using DataLab