Assignment 11

Due Date

Friday, April 27, 2007

Data

The file 74species.csv contains the invertebrate development time data we examined in lectures 36 and 39.

The Problem

To practice fitting a Bayesian model using WinBUGS and to compare the results with those obtained from a frequentist analysis.

Question

  1. Fit the first Bayesian model described in the notes for lecture 39, the complete pooling model, in WinBUGS. Obtain 95% Bayesian credibility intervals for the intercept, the slope, and the standard deviation of the response about the regression line. Show at least three decimal places in your answer.
  2. Obtain 95% frequentist confidence intervals for the intercept, the slope, and the standard deviation of the response about the regression line for this same regression model but now obtained using frequentist methods.
  3. Compare your results.

Hints:

  1. You should be able to find a formula for confidence interval for a variance on the web or in an elementary textbook. The formula is based on the result that appears as formula (A5) on p. 284 of Manly's book. Please note that a term in the the formula and the degrees of freedom need to be modified from n–1 to np where p is the number of regression parameters (in this case 2). The value np is also returned and reported as the residual degrees of freedom of the model. Because n is large for this problem, these details won't matter much.
  2. Because the chi-squared distribution is neither symmetric nor centered about zero you'll need to calculate its upper and lower quantiles separately and use these values in calculating the confidence interval.
  3. To obtain confidence bounds for the standard deviation take the square root of the bounds you obtain for the variance.

Course Home Page


Jack Weiss
Phone: (919) 962-5930
E-Mail: jack_weiss@unc.edu
Address: Curriculum in Ecology, Box 3275, University of North Carolina, Chapel Hill, 27516
Copyright © 2007
Last Revised--April 21, 2007
URL: http://www.unc.edu/courses/2007spring/enst/562/001/docs/assignments/assign11.htm