Learning Rstan for beginners

I am looking for a mentor/trainer for Rstan. I am interested in multi population stochastic epidemic models. Are there Rstan training sessions, classes or something I can rely on?

Is the manual enough for these complex models?

If you want to hire someone, you might try posting int he Jobs category.

If there’s a specific model you want to start with, I would suggest posting a query about it here with an informative title about the model so the right people read it.

I’m not sure what you mean by “multi-population” or “stochastic” epidemic models. Most Bayesian models are stochastic to some extent. And we often stratify the population by demographic factors in order to do post stratification for estimating population prevalence, if that’s what you mean. Are the different populations different age groups, groups in different localities, or what? Any population of people is technically a subpopulation of the global population, though we often reason about superpopulations in Stan (e.g., reasoning about the next marginal person rather than just trying to reason about the actual population right now).

There are several hundred published papers on Covid modeling using Stan—you could always start by looking at some of those. There are also a lot of Stan case studies out there, including many for epidemics (I worked with the UK Biosecurity Centre through Covid and we built a bunch of spatiotemporal models subdivided by local authority and post stratified by demographics). We’ve published things about different populations of viruses (e.g., monitoring omicron taking over), and different subpopulations of the British population using demographic and spatial information.

P.S. Unless you need something specifically from RStan, you might want to try cmdstanr—it’s simpler in many ways, more up to date with Stan itself, and easier to install. (The reason Stan gets out of date is because of CRAN’s antiquated size policies (max 1MB), platform requirements (does anyone remember Sparc?), and no dependency management for releases—together these are just ridiculous.

Dear Bob,
I have started working in Rstan this April, I have tried working with simple SIR models so that I can implement it in my SEIR two interacting population model. The problem is experience especially in Rstan. I need somebody to share my code with for guidance if I am doing the correct thing. Since the model is for publication, I didn’t want to share it int he public forum.
I would appreciate any reference Stan code especially what you did on Omicron in subpopulations.

I do appreciate your explanation. where can I get your artcles?
Josephine

Without details, it’s hard to help. I do find that biologists tend to be more secretive than other scientists. I just do all of my work in open GitHub repos whenever my co-authors are willing.

But this probably isn’t what you’re looking for. This work is very simple and not S(E)IR based.

I am a mathematician not Biologist, maybe some unfounded fears. I will send my model for yout help.

Thanks

If you want to study SIR models in Stan, you can check out this tutorial:

https://mc-stan.org/users/documentation/case-studies/boarding_school_case_study.html

The SARS variant work was just trying to estimate prevalence over time of the different variants.

Yes this is my best reference,

See what I did trying to correct the method they used, using dynamical survival analysis.

I want to capture the bimodal infection pattern, you could help me get this kind of a distribution.

Thanks so much for the Leo paper.

(attachments)

DSA_flu_script.R (3.59 KB)
DSA_flu.stan (2.21 KB)
DSA_flu_init.R (958 Bytes)
DSA_flu_plot.R (1.4 KB)
flu_data.csv (316 Bytes)

I’m not an expert in these models. @charlesm93 is your best bet—if you’re at ICML, you can catch him in person :-).

Hello,

I get you. Let me look for him.

Thanks again.