1. Suppose That We Have a One-Way ANOVA with Quantitative Factor X and Levels X1, X2

Total Page:16

File Type:pdf, Size:1020Kb

1. Suppose That We Have a One-Way ANOVA with Quantitative Factor X and Levels X1, X2

Statistics 512 Homework 6 Spring 2003 due Friday March 7, 2:00 p.m.

1. Suppose that we have a one-way ANOVA with quantitative factor X and levels X1, X2, ...Xr. The observations are

(Xi, Yij), j=1 ... ni a) Recall that in ordinary least squares regression, the slope is Sxy/Sxx. Show that for this one-way ANOVA the slope is a contrast of the treatment means.

(Hint: The computations are a bit easier if you remember that Sxy= (xi  x) yi ) b) Suppose that r=3 and the levels are A-D, A, A+D. Show that the contrast for the slope is a multiple of (1 0 -1). (If you look in a table of orthogonal polynomials for r=3, you will find the contrast (1 0 -1).

2. Pine engraver beetle, Ips pini, is an insect mostly attacking trees that have been stressed. It is therefore an important pest in recently clear-cut forest areas. An experiment was conducted to determine the effects of host material and type of lure on trap catches of Ips pini. A factorial unbalanced experimental design consisting of three levels of factor type of lure and three levels of factor type of host material were used.

The three levels for factor host material were: red pine (R), white pine (W), and white spruce (S). The three levels for factor type of lure were: chemical (A), a group of 20 male insects (B), and a control with no lure (C). Six-inch bolts of red pine, white pine, or white spruce were placed in an metal cage with wire screening, next to a Lindgren Funnel Trap. For lure treatment A, 0.1 mg of a synthetic mixture of 100:1 mixture of Ipsdienol:Lanierone was placed inside the cage. For lure treatment B, 20 live males were placed inside the cage. For treatment C, no lure was placed inside the cage.

Treatment combinations of the two factors above were randomly assigned to 63 trapping cages. After 48 hours, the total number of beetles (males and females) caught in the Lindgren trap was counted. One trap was attacked by raccoons and hence the contents could not counted.

Data for this experiment are available on the course web page. Save your output, as we will continue with this problem on the next homework.

Answer the following questions: a. What is the factor effects model for this experiment? b. Use boxplots to determine whether you expect lure or host main effects and interactions. Discuss possible effects by reference to your plots. c. Fit the ANOVA model and determine whether the assumptions about the errors appear to be satisfied. d. Draw one of the two interaction plots. Interpret what you see in this plot. e. Conduct an analysis of variance to test whether or not the interaction between the two factors was statistically significant.

1 Statistics 512 Homework 6 Spring 2003 due Friday March 7, 2:00 p.m. f. Test whether or not the mean number of insects caught was the same for the three types of lure. g. Test whether or not the mean number of insects caught was the same for the 3 types of host material. h. A researcher working in a region in which red pine is predominant wants to select the lure with the highest mean catch rate. Which lure should he use? Explain your analysis method and why you selected it.

SAS commands for 2-way ANOVA

Y is response A and B are treatments ABplot is a variable with a unique value for each treatment – e.g. 100*A+B

Since the treatments are both coded as character data, you can make a single variable by concatenating: e.g. ABplot= A||B;

Since A is read in with lots of blanks, you might want to strip the blanks using TRIM

ABplot=TRIM(A)||B;

PROC SORT; Sorts the data for plotting. BY ABplot B;

PROC BOXPLOT; For each level of AB, produces a boxplot of Y split by levels of B. PLOT Y*ABplot (B);

PROC GLM; CLASS A B; MODEL Y=A B A*B; Fits full model. Produces F-test for interaction OUTPUT OUT=MYFILE STUDENT=R P=P; Stores residuals and fitted values. LSMEANS A*B; Prints yhat values for each treatment. LSMEANS A; Prints estimates of alpha_i values MEANS A*B; Prints sample means and s.d.s for each treatment MEANS A; Prints ybar_i. for each level of A. ESTIMATE "NAME" A*B coefficients/E; Estimates a contrast in the mu_ij values for each treatment and prints the coefficients. ESTIMATE "NAME" A coefficients/E; Estimates a contrast in the alpha_i values for each treatment and prints the coefficients.

PROC PLOT; PLOT P*A=B; Interaction plot with levels of A on the X-axis. PLOT P*B=A; Interaction plot with levels of B on the X-axis.

2

Recommended publications