Unformatted text preview:

22S:138 Bayesian Statistics Name: __________________________________Final Exam Secret code for posting grade: ______________Fall 2005Show your work for all computational problems.1. Elston and Grizzle (1962) present repeated measurements of ramus (jaw) bone height on a cohort of 20 boys over an 18 month period: Age (in years) Subject 8.0 8.5 9.0 9.5_________________________________1 47.8 48.8 49.0 49.72 46.4 47.3 47.7 48.43 46.3 46.8 47.8 48.5. . . . .. . . . .19 46.2 47.5 48.1 48.420 46.3 47.6 51.3 51.8Interest focuses on describing the average growth curve of the ramus bone. WinBUGS code andoutput are provided below for two versions of a model for these data. In the first version, the covariate (age) is uncentered. In the second version it is centered.model{agebar <- mean(age[])for (i in 1:N) {for (j in 1:M) {Y[i,j] ~ dnorm(mu[i,j], tau)mu[i,j] <- b[i,1] + b[i,2] * (age[j] - agebar) # use this line for centered version# mu[i,j] <- b[i,1] + b[i,2] * age[j] #use this line for uncentered version}b[i,1] ~ dnorm( beta[1], taub[1] )b[i,2] ~ dnorm( beta[2], taub[2] )}tau ~ dgamma(0.001, 0.001)sigma <- 1 / sqrt(tau)for (k in 1:2) {sigb[k] ~ dunif( 0,5)taub[k] <- 1 / (sigb[k] * sigb[k])beta[k] ~ dflat()}}initslist(beta = c(50, 1), tau = 1, sigb = c(1, 0.5) )# datalist(M = 4, N = 20, Y = structure( .Data = c(47.8, 48.8, 49.0, 49.7, 46.4, 47.3, 47.7, 48.4, 46.3, 46.8, 47.8, 48.5, 45.1, 45.3, 46.1, 47.2, 47.6, 48.5, 48.9, 49.3, 52.5, 53.2, 53.3, 53.7, 51.2, 53.0, 54.3, 54.5, 49.8, 50.0, 50.3, 52.7, 48.1, 50.8, 52.3, 54.4, 45.0, 47.0, 47.3, 48.3,51.2, 51.4, 51.6, 51.9, 48.5, 49.2, 53.0, 55.5, 52.1, 52.8, 53.7, 55.0, 48.2, 48.9, 49.3, 49.8, 49.6, 50.4, 51.2, 51.8, 50.7, 51.7, 52.7, 53.3, 47.2, 47.7, 48.4, 49.5, 53.3, 54.6, 55.1, 55.3, 46.2, 47.5, 48.1, 48.4, 46.3, 47.6, 51.3, 51.8), .Dim = c(20, 4)), age = c(8.0, 8.5, 9.0, 9.5))Output from uncentered analysisHistory plots from first 2000 iterations for selected parametersTimes eriesTimes eriesbeta[1]iteration1 500 1000 1500 2000 28.0 30.0 32.0 34.0 36.0 38.0beta[2]iteration1 500 1000 1500 2000 1.0 1.5 2.0 2.5sigb[1]iteration1 500 1000 1500 2000 0.0 2.0 4.0 6.0sigb[2]iteration1 500 1000 1500 2000 0.0 0.2 0.4 0.6 0.8Output from centered analysisNode statistics node mean sd MC error 2.5% median 97.5% start sampleb[1,1] 48.84 0.225 0.002341 48.39 48.84 49.28 1001 10000b[1,2] 1.255 0.3785 0.003633 0.5263 1.256 1.994 1001 10000beta[1] 50.07 0.6024 0.006265 48.86 50.06 51.27 1001 10000beta[2] 1.86 0.2858 0.003135 1.29 1.859 2.429 1001 10000sigb[1] 2.675 0.4658 0.005149 1.936 2.619 3.74 1001 10000sigb[2] 1.178 0.2371 0.003226 0.7966 1.149 1.721 1001 10000sigma 0.4492 0.05152 9.867E-4 0.3613 0.445 0.5625 1001 10000History plots from first 2000 iterationsTimes eriesbeta[1]iteration1 500 1000 1500 2000 48.0 49.0 50.0 51.0 52.0 53.0beta[2]iteration1 500 1000 1500 2000 0.0 1.0 2.0 3.0 4.0Times eriesb[1,1]iteration1 500 1000 1500 2000 47.0 48.0 49.0 50.0 51.0b[1,2]iteration1 500 1000 1500 2000 0.0 1.0 2.0 3.0Name: _________________________________________________________a. Here is an autocorrelation plot from one of the two analyses:Did it come from the centered or the uncentered analysis? Briefly justify your answer.Autocorrelationfunctionbeta[1]lag0 20 40 -1.0 -0.5 0.0 0.5 1.0b. Give a point estimate and 95% credible set for the population mean ramus bone height at age 8.75 years (numeric answer). Then explain in a sentence or two howyou arrived at your answer.c. Which parameter would you look at to determine whether the growth rates of ramus bones (in cm per year) are different among different boys (parameter nameas given in WinBUGS code and output.)What do you conclude on this issue? Cite numeric evidence. d. Circle the one true statement in the list below.(1) Both versions of this model are hierarchical normal linear regression models.(2) Both versions of this model are linear regression models, but they are not hierarchical.(3) Both versions of this model are hierarchical, but they are not normal linear regession models.(4) Neither version is hierarchical and neither is a normal linear regression.(5) One version is a hierarchical normal linear regression model and the other is not.(6) None of the above.e. How many total unknown parameters are there in the model? Give a numeric answer and show how you obtained it.f. The following output is from the centered model:Dbar = post.m ean of -2logL; Dhat = -2LogL at post.m ean of stochastic nodesDbar Dhat pD DICY 97.865 58.124 39.741 137.606total 97.865 58.124 39.741 137.606How many effective parameters does this suggest are in the model? (Numeric answer)If this is different from your answer in part e. above, explain briefly how both can be correct.g. Draw a directed graph of the model.h. Derive the full conditional distribution of the parameter tau. If it is a standard parametric density, identify the family and its parameters.2. You have registered for a correspondence course from Fictitious University (FU). Your instructor will be Dr. Fink. You have heard that 2/3 of the instructors at FU are easygraders, and 1/3 of them are hard graders. You do not know which category Dr. Fink is in. You have heard that the probability of getting an A from an easy grader is 0.5, and theprobability of getting an A from a hard grader is 0.05.a. What are the prior odds in favor of Dr. Fink being an easy grader vs. his being a hard grader? (Numeric answer.)b. Now let’s go forward in time until you have completed the course. Your final grade isan A. (Congratulations!) What are the posterior odds in favor of Dr. Fink being an easy grader vs. a hard grader, given that you received an A. (Numeric answer) Show all your calculations.c. What is the Bayes factor in favor of Dr. Fink being an easy grader vs. a hard grader? (Numeric answer). Show your


View Full Document

UI STAT 4520 - Bayesian Statistics

Documents in this Course
Load more
Download Bayesian Statistics
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Bayesian Statistics and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Bayesian Statistics 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?