mod <- mod_binom(oneperson ~ age:region + age:year,
data = nzl_households,
size = total)
## use formula to specify size
mod <- mod_binom(ncases ~ agegp + tobgp + alcgp,
data = esoph,
size = ~ ncases + ncontrols)
## but formulas are now deprecrated, and the
## recommended approach is to transform
## the input data outside the model:
esoph$total <- esoph$ncases + esoph$ncontrols
mod <- mod_binom(ncases ~ agegp + tobgp + alcgp,
data = esoph,
size = total)
Run the code above in your browser using DataLab