Closed jscott6 closed 3 years ago
I agree that would help interpretation.
On a related note, the r0 arg always specifies half the maximum allowed R, but only specifies the a priori expected R if the prior intercept has mean 0. The user can decouple these two purposes with this:
R.a.priori <- 2 ; R.max <- 8; args$rt <- epirt(r0 = R.max / 2, prior_intercept = rstanarm::normal(location = logit(R.a.priori / R.max), scale = my_chosen_scale))
which gives a prior centered at R.a.priori
and capped at R.max
Agree this is a nice idea. Only issue I can see is that r0 is not necessarily r_max/2 in this formulation : which will have implications for effect sizes -- which I think the user should be aware of. I have removed r0 argument and replaced this link with scaled_logit(K), where K is the 'carrying capacity' or maximum value. Removing any reference to r0 might encourage the user to think carefully about the implications of the chosen link and prior_intercept.
If the values of all covariates are zero at the beginning of the epidemic, the intercept is interpreted as specifying the initial reproduction rate. This intuitive interpretation makes it easier to specify a prior.
This is not so easy when there are multiple groups and covariates are non-zero at the first time periods. Perhaps prior_intercept should refer to the prior after covariates x are shifted to x - mean(x0), where mean(x0) is the average value of the covariates across groups at the epidemic starts...