Age structured sir model for Sars-Cov-2 in Lombardia (Italy)

Hi, I am new in the bayesian world. I am doing my thesis about a mathematical model that describes the epidemic of Sars-Cov-2 in Lombardaia, a region in Italy.
I would like to fit the new recovered (= hospitalized) for day.

My fitting says:

Warning messages:
1: In system(paste(CXX, ARGS), ignore.stdout = TRUE, ignore.stderr = TRUE) :
β€˜-E’ not found
2: There were 5999 divergent transitions after warmup. See
http://mc-stan.org/misc/warnings.html#divergent-transitions-after-warmup
to find out why this is a problem and how to eliminate them.
3: Examine the pairs() plot to diagnose sampling problems

4: The largest R-hat is NA, indicating chains have not mixed.
Running the chains for more iterations may help. See
http://mc-stan.org/misc/warnings.html#r-hat
5: Bulk Effective Samples Size (ESS) is too low, indicating posterior means and medians may be unreliable.
Running the chains for more iterations may help. See
http://mc-stan.org/misc/warnings.html#bulk-ess
6: Tail Effective Samples Size (ESS) is too low, indicating posterior variances and tail quantiles may be unreliable.
Running the chains for more iterations may help. See
http://mc-stan.org/misc/warnings.html#tail-ess

If you are interested the results, in png format, are in this link:

I don’t know how can I improve my fitting, do you have any suggestions? Thank you.

I share my code:

I think the most important suggestion is to try to substantially simplify the model, and then build the complexity back piece-by-piece to see when the fitting issues start to appear. Perhaps the easiest simplification would be to drop some of the age classes. Does every age class run into these issues? Or are the restricted to a subset of the age classes.

3 Likes

I found the problem in the contact matrix!
Now it seems going well.
Thank you.