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.
- Produce a table of means, standard deviations and sample sizes for the 6 feed types.
- 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.
- Carry out Scheffé tests for all pairwise differences between means. Which means are different from each other at the joint α = 0.05 level?
- 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)?
- 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.)
- State the null hypothesis in terms of μ values.
- 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.
- Calculate the F statistic, degrees of freedom and p-value. Do you reject H0 at α=0.05?
- In plain, non-statistical language, what do you conclude from the F-test?
- Obtain a 95% confidence 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.
- The Scheffé family of follow-up tests includes the comparison of horsebean to the average of the other feed types.
- What is the critical value for the Scheffé test? You will need to use proc iml. Feel free to copy my code.
- Is the comparison still statistically significant with a Scheffé test at the joint α = 0.05 level? Answer Yes or No.
- The Scheffé family of follow-up tests also includes the test of differences among the five feed types excluding horsebean.
- What is the critical value for the Scheffé test? Again, you will need to use proc iml. Feel free to copy my code.
- 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.
- You may copy freely from me, but do not look at anyone else's SAS code before the quiz.
- Do not show your SAS code to any other student in the class.
- Do not write anything on the printouts.
- Important: Comment statements and other typed material that would help with interpretation of the computer output are expressly forbidden. For example, you may not type assignment questions or answers into your code, or otherwise cause them to appear on your log file or procedure output file. Any such material is an unauthorized aid for the purposes of this course, and if you use or possess an unauthorized aid, you will be charged with an academic offence.
- The log and procedure output files must be
generated at the same time by the same SAS program or you may lose a lot of marks.
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.