联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codehelp

您当前位置:首页 >> 数据库数据库

日期:2020-04-08 09:51

Spatial Statistics Project
1 Project overview
In this project you will estimate the effects of air pollution and socio-economic variables on the
risk of admission to hospital caused by respiratory disease. The data for the project cover the 7
year period spanning 2003 to 2009 and describe annual hospital admissions across 624 electoral
wards of Greater London. Each person will be individually assigned both a year and a data
set to work with. The data are contained in the file london_x.RData where "x" corresponds
to your allocated data set, and once loaded, the data are in the form of an sp object called
london_x with geographical attributes included. Further information about the contents of the
data can be found in Section 4.
2 Project tasks
1. (a) Create a subset of your assigned data for the year you have been assigned.
(b) Calculate the standardised incidence ratio (SIR) for respiratory disease and add this
as a new column to your data subset.
(c) Use a spatial plot to explore SIR.
(d) Use scatterplots to explore the association between SIR and PM25, JSA and Price.
(10 marks)
2. (a) Use BUGS and appropriate prior distributions to fit a Poisson regression model for
respiratory disease, making use of the columns Observed, Expected, PM25, JSA and
Price.
(b) Use the Gelman-Rubin diagnostic (Rhat) and Geweke diagnostic plots to assess
whether convergence has been reached.
(c) Calculate the Pearson residuals and use these to check the model assumptions.
(10 marks)
3. (a) Extend the model developed in 2. by including spatial random effects φ with a
Conditional-autoregressive prior distribution.
(b) Use the Gelman-Rubin diagnostic (Rhat) and Geweke diagnostic plots to assess
whether convergence has been reached.
(c) Calculate the Pearson residuals and use these to check the model assumptions.
(10 marks)
4. Construct a table with columns for DIC, Moran’s I statistic, variance of the Pearson
residuals and the estimated effect of PM25 (and 95% credible interval) to critically compare
the models in 2. and 3. Using estimates from the better model, interpret the effect of
PM25 on the rate of respiratory hospital admission in Greater London.
(10 marks)
1
3 Report structure, content and submission
The report itself does not need to follow any particular structure, however, you should ensure
that any analysis you carry out is clearly interpreted, using full sentences. You should write
as though your audience were your statistics classmates who are unfamiliar with the data.
? The report should have a cover page with your name and student ID clearly marked
? The report should be between 4 and 6 A4 pages in length including graphics and tables
but excluding cover page and any references
? Graphs should be suitably labelled, sensibly scaled and cropped
? Numerical R outputs used to answer questions should be neatly presented in tables or in
the text
? Your R code and BUGS code output should be included in an appendix
? Please submit your report by midday on Wednesday 8th April via the upload
link on Myplace.
4 Some helpful R commands
You will need to load the following packages
library(spdep)
library(sp)
library(R2WinBUGS)
library(CARBayes)
To load the data and produce a plot of PM25 (for example), use
load("london.RData")
spplot(london, "PM25")
To produce the adjacency matrix required for use in the moran.test function
Wnb <- nb2listw(poly2nb(london))
You will need the adjacency matrix attributes Adj, Num.Adj and SumNumNeigh for use in
OpenBUGS to fit the conditional autoregressive model:
W <- nb2mat(poly2nb(london), style = "B")
inds <- lapply(1:nrow(W), function(i) which(W[i, ] == 1))
# the following 3 objects are needed to fit a conditional-autoregressive model
Adj <- Reduce("c", inds)
Num.Adj <- rowSums(W)
SumNumNeigh <- sum(Num.Adj)
2
5 Data description - london.RData
Column name Description
Observed Annual hospital admissions due to respiratory disease
Expected Expected annual hospital admissions due to respiratory disease based on
national average rate
JSA Proportion of electoral ward in receipt of jobseeker’s allowance, an
unemployment benefit
Price Annual average sale price of homes (logged GBP)
PM25 Annual average concentration of fine particulate matter PM2.5 (μgl?1
)
year Year of observation: 2003 to 2009 inclusive
3

版权所有:留学生编程辅导网 2021,All Rights Reserved 联系方式:QQ:99515681 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。