# 程序代写案例-BIOS 560R

BIOS 560R - 2021 Assignment #3

Instructions:
1. Submit written report by Monday Noon, April 19th.
2. Must be a written report and R Markdown will not be accepted. Include analytic code in an
appendix. Do not include any output from statistical software directly in the report.
3. All work must be independent. Do not consult others or share code.
4. Email all questions to the instructor. Aggregated responses will be sent to all students.

Question 1. Profiling Hospitals

The table below summarizes mortality of neonatal cardiac surgery performed at 12 hospitals.

Hospital ID # of operations performed # of deaths
1 47 0
2 148 18
3 119 8
4 810 46
5 211 8
6 196 13
7 148 9
8 215 31
9 207 14
10 97 8
11 256 29
12 360 24

Let denote the number of deaths from hospital and let be the number of operations. Consider the
following Bayesian hierarchical model:
~ Binom ( , )

log

1 −
= + , ~ (0,
2)

Fit the above model under a Bayesian framework. Note that because the number of hospitals is small,
2 may be difficult to estimate. Consider using weakly informative prior distribution for 2.

Also answer the following scientific questions.

a) Which hospitals have higher mortality rates than a typical hospital?
b) We observed zero death in Hospital 1, likely due to its small number of operations performed.
Provide an estimate of the mortality rate for Hospital 1 from the model.
c) Compared the above model where there is no heterogeneity among hospitals (i.e., 2 = 0). Is the
hierarchical model better based on DIC and WAIC?

Question 2. Spatial-temporal Disease Mapping

The dataset covid3.csv contains estimated weekly state-specific COVID-19 excess deaths during the 3rd
peak (October 2020 to January 2021). The dataset has the following variables.

• state Names of the 50 US states
• week Week since 2020-09-27
• deaths Weekly COVID-19 excess deaths

We are interested in modeling state-specific temporal trajectory of COVID-19 deaths during this period.
Let denote the number of deaths from state during week , and let be the total population.
Consider the following Bayesian hierarchical model:
~ ()
log = log + + ()
where () represent a common temporal trajectory across states. Specifically, consider the
following forms of ().
• Linear () = 1
• Quadratic () = 1 + 2
2
• Exchangeable () = , with ~(0,
2).
• Autoregressive () = , = −1 + , with ~(0,
2) and ∈ (0,1).
Use DIC and WAIC to determine which form of () is preferred and interpret model parameters
of the selected model. Email:51zuoyejun

@gmail.com