Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I NEED ANS IN R Mixture model: The file glucose.dat contains the plasma glucose concentration of 532 females from a study on diabetes (see Exercise

I NEED ANS IN R

Mixture model: The file glucose.dat contains the plasma glucose concentration of 532 females from a study on diabetes (see Exercise 7.6). a) Make a histogram or kernel density estimate of the data. Describe how this empirical distribution deviates from the shape of a normal distribution. b) Consider the following mixture model for these data: For each study participant there is an unobserved group membership variable Xi which is equal to 1 or 2 with probability p and 1 - p. If Xi = 1 then Yi ~ normal(?1, s2 1 ), and if Xi = 2 then Yi ~ normal(?2, s2 2 ). Let p ~ beta(a, b), ?j ~ normal(0, t 2 0 ) and 1/sj ~ gamma(?0/2, ?0s 2 0/2) for both j = 1 and j = 2. Obtain the full conditional distributions of (X1, . . . , Xn), p, ?1, ?2, s 2 1 and s 2 2 . c) Setting a = b = 1, 0 = 120, t 2 0 = 200, s 2 0 = 1000 and ?0 = 10, implement the Gibbs sampler for at least 10,000 iterations. Let ? (s) (1) = min{? (s) 1 , ?(s) 2 } and ? (s) (2) = max{? (s) 1 , ?(s) 2 }. Compute and plot the autocorrelation functions of ? (s) (1) and ? (s) (2), as well as their effective sample sizes. d) For each iteration s of the Gibbs sampler, sample a value x ~ binary(p (s) ), then sample Y (s) ~ normal(? (s) x , s 2(s) x ). Plot a histogram or kernel density estimate for the empirical distribution of Y (1) , . . . , Y (S) , and compare to the distribution in part a). Discuss the adequacy of this two-component mixture model for the glucose data.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Elementary Differential Equations And Boundary Value Problems

Authors: William E Boyce, Richard C DiPrima

8th Edition

0470476389, 9780470476383

More Books

Students also viewed these Mathematics questions

Question

Also, differentiate between voluntary and contractual savings.

Answered: 1 week ago