Conjugate models

Exercise BADT

Author

Sahlin

Background

Conjugate models are very useful even today, but for relatively simple problems.

Task 1

Test an hypothesis using conjugate model. How sensitive is the conclusion from the choice of prior?

Let \(\lambda\) be the average number of goals scored in a Women’s World Cup game. We’ll analyse \(\lambda\) by a Gamma-Poisson model where data \(Y_i\) is the observed number of goals scored in a sample of World Cup games

  1. Specify the model

  2. Plot and summarize our prior understanding of \(\lambda\).

  3. Why is the Poisson model a reasonable choice for our data
    \(Y_i\)?

Use the wwc_2019_matches data from fivethirtyeight

The wwc_2019_matches data includes the number of goals scored by the two teams in each 2019 Women’s World Cup match. We summed the scores by the two teams per game, made a histogram and calculated some summary statistics:

Some larger datasets need to be installed separately, like senators and
house_district_forecast. To install these, we recommend you install the
fivethirtyeightdata package by running:
install.packages('fivethirtyeightdata', repos =
'https://fivethirtyeightdata.github.io/drat/', type = 'source')

   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  0.000   2.000   3.000   2.808   3.000  13.000 
[1] 52
  1. Make a test if the average number of goals scored in a Women’s World Cup game is less than 1.8.

Task 2

Use conjugate models to construct probability intervals for the results from a clinical trial and compare to a published meta-analysis.

Lancet paper

A relative risk (RR) is a ratio of the probability of an event occurring in the exposed group versus the probability of the event occurring in the non-exposed group.

  1. Reproduce the probability interval for a RR from the forest plots tables e.g. Scales et al 2003

  2. Calculate a probability interval for one of the studies for which the RR is not calculable, e.g. Hall et al 2014