Mathematics, 21.02.2020 18:02, jayzie1728
Posterior predictive checks: Let's investigate the adequacy of the Pois- son model for the tumor count data. Following the example in Section 4.4, generate posterior predictive datasets y(1) . . . , y(1000). Each ) is a sample of size nA = 10 from the Poisson distribution with parameter θ , s itself a sample from the posterior distribution p(9alya), and y A s the observed data
a) For each s, let t(o) be the sample average of the 10 values of divided by the sample standard deviation of y. Make a histogram of t and compare to the observed value of this statistic. Based on this statistic, assess the fit of the Poisson model for these data.
b) Repeat the above goodness of fit evaluation for the data in population For each s E1,. , S, 1. sample θ(s) ~ p(AY-yobs) 2. sample Y(s)-( (s), . . . ,Vis))-1.1.d. p(y|θ(s)) 3, compute t(s) = t(Y(s)) a<-2; b<-1 t .mK-NULL for (s in 1:10000) thetal<-rgamma (1, a+syl, b+n1) y1.mc-rpois (nl, thetal) t .mo-c (t. mc , sum (yl. mc==2)/sum (y1.mc= = 1)) In this Monte Carlo sampling scheme, 10(1). . . , θ(s)} are samples from the posterior distribution of θ; (y",..., Y are posterior predictive datasets, each of size n; (t),...,t(S) are samples from the posterior predictive distribution of t(Y)
Answers: 2
Mathematics, 20.06.2019 18:04, jak000067oyyfia
Do u just plot the numbers on the graph like (1,
Answers: 1
Posterior predictive checks: Let's investigate the adequacy of the Pois- son model for the tumor cou...
Mathematics, 02.02.2020 01:42
Mathematics, 02.02.2020 01:42
Physics, 02.02.2020 01:42
Biology, 02.02.2020 01:42
Biology, 02.02.2020 01:42
Mathematics, 02.02.2020 01:42