Sample code from the prophet paper can be used to build logistic trends with potential changepoints: https://github.com/facebook/prophet/blob/main/R/inst/stan/prophet.stan. This requires a carrying capacity cap, which is on the scale of the outcome. Would likely need to take the log of trend for log-link models so it could be directly included in the likelihood functions, such as poisson_log_glm.
Sample code from the
prophet
paper can be used to build logistic trends with potential changepoints: https://github.com/facebook/prophet/blob/main/R/inst/stan/prophet.stan. This requires a carrying capacitycap
, which is on the scale of the outcome. Would likely need to take the log oftrend
for log-link models so it could be directly included in the likelihood functions, such aspoisson_log_glm
.