STA305s14 Computer Assignment Four
Quiz in lecture on Monday March 3d

In the Chick Weights data, newly hatched chicks were randomly allocated to six groups, and each group was given a different feed supplement. Their weights in grams after six weeks were recorded. Please use SAS proc glm to do the following, except that you should borrow my proc iml code for the Scheffé critical values you need. For the pairwise comparisons, you don't need Scheffé critical values; an lsmeans statement in proc glm is easier.

  1. Produce a table of means, standard deviations and sample sizes for the 6 feed types.
  2. Test whether the six mean weights are different. Get the F statistic, degrees of freedom, p-value and proportion of sample variation that is explained by differences between treatment means. These are all numbers on your printout.
  3. Carry out Scheffé tests for all pairwise differences between means. Which means are different from each other at the joint α = 0.05 level?
  4. If you were a chicken farmer, what kind of feed would you not want to buy for your chicks (assuming the cost of feed was fairly similar)?
  5. Test for differences among mean weights for the five feed types excluding horsebean. Please do this with contrast, and not with where (though where does work with proc glm, and one could make a case for where and not contrast.)
    1. State the null hypothesis in terms of μ values.
    2. Give a table of contrasts: The null hypothesis is that all contrasts equal zero. There is one column in your table for each treatment mean, and one row for each contrast.
    3. Calculate the F statistic, degrees of freedom and p-value. Do you reject H0 at α=0.05?
    4. In plain, non-statistical language, what do you conclude from the F-test?
    5. Obtain a 95% con fidence interval for the difference between the expected weight for chicks fed horsebean, versus the average of the other five expected values. Your answer is a pair of numbers. This is not calculator work, and please do it with proc glm, not proc iml.
  6. The Scheffé family of follow-up tests includes the comparison of horsebean to the average of the other feed types.
    1. What is the critical value for the Scheffé test? You will need to use proc iml. Feel free to copy my code.
    2. Is the comparison still statistically significant with a Scheffé test at the joint α = 0.05 level? Answer Yes or No.
  7. The Scheffé family of follow-up tests also includes the test of differences among the five feed types excluding horsebean.
    1. What is the critical value for the Scheffé test? Again, you will need to use proc iml. Feel free to copy my code.
    2. Is this test still statistically significant with a Scheffé test at the joint α = 0.05 level? Answer Yes or No.

Bring both your log file and your procedure output file to the quiz. You will be asked to hand them in with your quiz. Please put your name and student number in the title statement.

Please be reminded of the rules for computer assignments and quizzes. See the syllabus for more detail.


The data used in this assignment come from an R dataset called chickwts. The assignment is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License. Use any part of it almost any way you like, as long as you share the results freely. See the license for details.