首页 > > 详细

代做Bayesian Statistics assessment (2024-2025)调试SPSS

项目预算:   开发周期:  发布时间:   要求地区:

Bayesian Statistics assessment (2024-2025)

Instructions

•  All the instructions should be followed and all questions answered.  Please answer as concisely as you can, and do not include anything beyond what is needed to answer the questions.

•  The submitted material must include

- A report of the analysis (in any document format, such as PDF or Word), which includes answers to the specific questions asked.  There is no prescribed minimum or maximum length, however the length of the questions will be such that they can be answered in a report of not more than 1500 words.

- R and/or JAGS code, in a plain text format, commented where necessary, that runs without error and reproduces all results required to answer the questions. The code may be mixed with the answers, e.g. using a report-generating format such as R Markdown. If using this kind of format, both source and compiled versions should be submitted.

A fully-answered question will demonstrate that students can do all of the following:

develop a Bayesian statistical model to answer a scientific question

implement and fit the model using software, including checks of convergence for MCMC algorithms

summarise appropriate outputs from the fitted model

check model fit, criticise and compare alternative assumptions

clearly explain the scientific findings from the analysis.

Background

A set of people are examined, once every month, for levels of an antibody which gives immunity to an infection. We want to estimate from these data how immunity evolves in the time period following vaccination. The full dataset is given in the file antibody_data.csv, and the variables are:

•  y: antibody titre level (in log units/ml)

•  year: years after vaccination

•  indiv:  individual identifier

The antibody is measured with error. We are unsure how the level will change over time, except that we assume that between 1 and 13 months after vaccination, the true antibody level is a linear function of time. We want to describe this change with a linear regression.

Given our experience with studying similar situations, we would be surprised if the true level exceeded log(20) ≈ 3.0 log units/ml, or was less than log(2) ≈ 0.7 log units/ml, within a rough order of magnitude, at any time.

Questions

(a)  Obtain prior distributions for the intercept and slope parameters of the linear regression model,  which reflect these judgements. (There is no unique correct answer, but any reasoning used to obtain the distributions should be clearly explained.)

(b)  Develop a linear regression in JAGS that can be used to answer the question, and fit it to the subset of the data restricted to the period from 1 month to 13 months (inclusive) after vaccination. Present diagnostics to justify that the sample you produce can be treated as a sample from the posterior distribution, and that it is sufficiently large to give parameter estimates to an appropriate level of precision.

(c)  Given the results of the model, describe, in precise words, how the antibody level changes over time, including posterior summary statistics for an appropriate quantity or quanti-ties.

(d)  Plot a suitable summary of the posterior predictive distribution corresponding to each data point, alongside the data, in a way that ensures the points for each individual can easily be compared with each other.  Interpret the result and explain how the conclusion drawn in (c) might be affected.

(e)  Extend the linear model in (b) to include random effects that represent variations be- tween people in the average antibody level, as follows:

(i)  Write down equations representing the extended model and prior distributions. (The same priors as in  (a,b) may be used where appropriate, and vague priors, or reasonable substantive priors, may be chosen for any additional parameters needed.)

(ii)  Implement it in JAGS and describe how the the average antibody level varies be- tween people.

(iii)  Using the same technique you used in part (d), show that it fits the data better than the simple linear regression.




软件开发、广告设计客服
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 9951568
© 2021 www.rj363.com
软件定制开发网!