In the Advanced Bayesian Multilevel Modeling with the R Package brms vignette,
Example 3 covers a model for Insurance Loss Payments using a non-linear growth model. Since this is modeling cumulative payments over time, it makes sense to try adding in some error correlation between development ages dev
for a given year AY
.
Looking through the documentation, it seems like this could be done by adding
autocor = cor_ma(formula = ~ dev|AY, q = 1, cov = TRUE)
to the brm
function. The warning says I have to use cov = TRUE
for a non-linear model.
Is this the best way to implement the correlation?