This project follows the bayesian hierarchical model by Agarwal et al., 2015: Do organic results help or hurt sponsored search performance?, including its supplementary material, in R using JAGS, BUGS and a bottom-up approach.
probabilistic_modelling_agarwal.pdf
is a complete documentation and description of the project including inline code. (I urge you, read it. It'll be worth the read!)
- As a first step, we simulate the data and parameters in the model by Agarwal et al. 2015 in
0_data_simulation.R
.
JAGS_attempt.R
is a formulation of the model in JAGS. As it is recursive, JAGS doesn't work.BUGS_attempt.R
is a formulation of the same model in BUGS. BUGS allows for recursive models, but can lead to stackoverflows, as happened here.Metropolist_agarwal.R
is a (loose) interpretation of the authors' appendix as this is written vaguely. It is the raw Metropolos-Hastings algorithm without any libraries used.JAGS_running.R
is a running model in JAGS which has been simplified to not be recursive anymore.
We highly value clarification by the authors on their notation and model formulation.
- MCMCpack
- JAGS from here, including Kruschke's DBDA2E-utilities
- R2OpenBUGS
- rjags