Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Humanities Expert

Problem 4: Antimicrobial resistance (AMR) is becoming a significant problem due to overuse of antimicrobial drugs. The level of AMR can be estimated by testing isolates obtained from samples (say from retail chicken). Suppose that Y isolates test positive for AMR in N samples. A Bayesian model for the population prevalence of resistance, P, is Y |P ∼ B(N, P), combined with a uniform prior distribution on P. This implies a beta posterior distribution for P. (See the notes from Lecture 14.) Suppose, however, that the test has known sensitivity and specificity values,

πse = P(positive test result|resistant)

and

πsp = P(negative test result|not resistant).

A perfect test would have πse = πsp = 1 but this is rarely the case in practice. Let TP denote a "true positive" test result event; that is, a resistant isolate that tests positive. Let NT P denote the number of TP events in the sample.

Let FP denote a "false positive" test result, a non-resistant isolate that tests positive, and let NF P denote the number of such events. Similarly, let TN and FN denote "true negative" and "false negative" test results, and let NT N and NF N denote the number of times these events occur in the sample. Note that Y = NT P + NF P and N - Y = NT N + NF N .

4a: (2 points) Determine the conditional probabilities of the events TP, FP, TN an FN given P.

4b: (4 points) What is the distribution of NT P given P and Y ? What is the distribution of NT N given P and Y ? Hence, what is the distribution of (NT P , NT N ) given P and Y ?

4c: (4 points) What is the distribution of P given (NT P , NT N ) and Y ? Note that NT P +NF N is the true number of resistance isolates in the sample.

4d:  Based on your answers to problems to 4a-c write an R function to generate values from the posterior distribution of P given Y using a Gibbs sampler.

Mygibbs=function(N,Y,sens,spec,L)
{
6

# L=chain length

your code
return(Pchain)
}

Submit your function on CMS as Mygibbs.r.

4e: Use your function to estimate the posterior distribution of P based on Y = 30 positive test results out of N = 100 if πse = 0.9 and πsp = 0.8. Report estimates of the mean, median, and 2.5 and 97.5 percentiles of the posterior distribution.

Humanities, Academics

  • Category:- Humanities
  • Reference No.:- M91782549

Have any Question?


Related Questions in Humanities

Name at least two people who have had a great influence on

Name at least two people who have had a great influence on the field of social psychology and discuss the contribution of each.  • Define the term theory, its role of theory in health assessment, and how theory can help ...

Part 1 media scholar george rodman describes technological

Part 1: Media scholar George Rodman describes technological determinism as a theory stating "the introduction of every new technology changes society, sometimes in unexpected ways." Baran further discusses this topic in ...

Assignment - watch the it hits the fan south park

Assignment - Watch the "It Hits The Fan" South Park episode. After watching, you should answer the following: Discuss how this particular episode of South Park would be interpreted through the lens of ONE of the followin ...

Assignment essaychoose one 1 of the three 3 reading

Assignment: Essay Choose one (1) of the three (3) reading selections from the list of topic choices below. The focus is on brief but important primary source material written by important authors. In each case, the subje ...

Question case analysis - collaborating with outside

Question: Case Analysis - Collaborating with Outside Providers Read the Treatment Plan and Case - Bulimia Nervosa in Gorenstein and Comer (2014). Please also read the Waller, Gray, Hinrichsen, Mounford, Lawson, and Patie ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As