Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Section 4 Suppose we observe y_1, .., _n from a Poisson distribution with mean k, and the parameter A has a Gamma(a, b] distribution. A

image text in transcribedimage text in transcribed
image text in transcribedimage text in transcribed
Section 4 Suppose we observe y_1, .., _n from a Poisson distribution with mean k, and the parameter A has a Gamma(a, b] distribution. A = Gamma[ a, b) Y| A- Poisson[ A] n I exp(-A)10 [1"-1 exp(-bx)] 1=1 Use this information to answer the questions in this section. 15) Write your R code to create function "Ipost[)' and list's' Assume you observed Y=2, 5, 10, (20pts) 5, 6, as your sample data. and the prior parameters are a = 1 and b = 1. (Hint: See p.37 in Day 10 Slides and use 'sum(dpois( log=TRUE)) + dgammal .log-TRUE)' in 'lpost(") Verdana 10pt B O WORDS POWERED BY TINY Screen clipping taken: 14/04/2022 21:1816) Write your R code to collect 1,000 simulated Y values from the posterior distribution. Use (15pts) a starting value of 1=5 and a neighborhood scale value of C=2. Make sure you use "set.seed( 123 )' before your code to get the same outcome. (Hint: See p.38 in Day 10 Slides.) Verdana 10pt B IY E VEY ( > OWORDS POWERED BY TINY 17) Use your answer to Question 16 to find the acceptance rate. (10pts) 18) Write your R code to create a trace plot on your simulated Y values. (15pts) Verdana 10pt BIU E VEY ne

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

Sacred Mathematics Japanese Temple Geometry

Authors: Fukagawa Hidetoshi, Tony Rothman, Freeman Dyson

1st Edition

1400829712, 9781400829712

More Books

Students also viewed these Mathematics questions

Question

2. Information that comes most readily to mind (availability).

Answered: 1 week ago

Question

3. An initial value (anchoring).

Answered: 1 week ago

Question

4. Similarity (representativeness).

Answered: 1 week ago