EXPERIMENTAL DESIGN STAT 706
Popular in Course
Mr. Cleve MacGyver
verified elite notetaker
Popular in Statistics
This 12 page Class Notes was uploaded by Shane Marks on Monday October 26, 2015. The Class Notes belongs to STAT 706 at University of South Carolina - Columbia taught by J. Grego in Fall. Since its upload, it has received 49 views. For similar materials see /class/229658/stat-706-university-of-south-carolina-columbia in Statistics at University of South Carolina - Columbia.
Reviews for EXPERIMENTAL DESIGN
Report this Material
What is Karma?
Karma is the currency of StudySoup.
Date Created: 10/26/15
Orthogonal and Nonorthogonal Polynomial Constrasts We had carefully reviewed orthogonal polynomial contrasts in class and noted that Brian Yandell makes a compelling case for nonorthogonal polynomial contrasts In the following example7 we will revisit both methods and compare analyses The Solution Concentration data set from Applied Linear Statistical Models 5th ed by Kutner et al7 measures concentration of a solution over time Concentration Y Time in Hours X 007 90 009 90 008 90 016 70 017 70 021 70 049 50 058 50 053 50 122 30 115 30 107 30 284 10 257 10 310 10 A plot of the data set Figure 1 in R shows a sharply nonlinear decreasing trend in concentration over time Given such a trend7 the natural log transformation of the response should x both the nonlinearity and the increasing error variance As you can see Figure 27 the transformation works perfectly7 which is likely what the textbook authors had in mind It might be more interesting to apply polynomial models to the untransformed data7 but given the violation of regression assumptions unequal error variances7 we will go ahead and model the transformed data instead A quick inspection of the data set con rms that the independent variable7 Time in Hours7 is quantitative with equally spaced levels in increments of 20 hours In addition7 the design is balanced7 with n 3 replications per factor level7 so this data set is appropriate for analysis with polynomial contrasts Solution Concentration OOO Elapsed Time Hours Figure 1 Scatterplot of untransformed response Log Concentration OOO Elapsed Time Hours Figure 2 Scatterplot of transformed response Since the data set has 5 levels7 the orthogonal polynomial contrasts would be Time X Linear Quad Cubic Quartic in Hours coef cient coef cient coef cient coef cient 10 2 2 1 1 30 1 1 2 4 50 0 2 0 6 70 1 1 2 4 90 2 2 1 1 Examining the data7 interesting hypotheses in addition to the general ANOVA hy pothesis H0 M1 Ma would include a test of the linear contrast7 the quadratic contrast given the linear contrast7 and the linear lack of t I have speci ed these hypotheses using the CONTRAST command in SAS data ortho input Conc Hours LConclogConc datalines 9 9 7 7 7 5 5 5 3 3 3 1 1 1 CDMMI I I OOOOOOOOO fl 0 1 000000000000000 proc glm dataortho class Hours model LConcHours contrast linear Hours 2 1 O 1 2 contrast quadratic Hours 2 1 2 1 2 contrast linear lof Hours 2 1 2 1 2 4 Hours 1 2 Hours 1 4 run The ANOVA table shows that the general ANOVA hypothesis is strongly signi cant plt0001 As expected the linear contrast is signi cant plt0001 Note that the quadratic contrast can also be considered a test of whether or not a quadratic term could be included given that a linear term is already in the model Hence7 it serves as a hierarchical test of a quadratic model with both linear and quadratic terms versus a linear model We can con rm from an inspection of Figure 2 that this test is not likely to be signi cant in fact7 p5715 ANOVA summary based on MSE01128552 with 10 df Test df SS MS F Value p value General 4 2435092977 608773244 53943 lt 0001 Linear 1 2429199104 2429199104 215249 lt 0001 Quadratic 1 00386341 00386341 34 5715 Linear LOF 3 05893874 01964625 174 2217 From the same gure Figure 27 it would not be the least bit surprising if the Linear Lack of t Test was not signi cant7 and it is not p2217 Hence7 the signi cant result for the general ANOVA hypothesis can be substantially explained by the linear relationship between the independent variable and the mean response Yandell rightly points out that most researchers are interested in the linear hypoth esis7 the quadratic hypothesis QlL7 and either the linear or quadratic lack of t hypothesis Since these are essentially sequential tests7 he argues that we can simply create appropriate linear and quadratic covariates without worrying about whether or not they are orthogonal If we declare the indepedent variables as a factor with the CLASS statement and include it as the last term in our model7 we can obtain our lack of t tests by default from the Type I analysis Yandell speci es a Type I analysis explicitly7 even though SAS outputs both a Type I and Type III analysis by defaultibetter safe than sorry Note that we actually need two separate analyses to obtain the linear lack of t and quadratic lack of t tests7 unless we are willing to combine model results by hand data yandell set ortho Linear and quadratic covariates for Yandell approach 5 Note how simple they are to construct HlinHours HquadHlinHlin Yandell approach for quadratic lack of fit proc glm datayandell class Hours model LConcHlin Hquad Hoursssl run Yandell approach for linear lack of fit proc glm datayandell class Hours model LConcHlin Hoursssl run ANOVA summary using Yandell7s approach MSE01128552 with 10 df Test df Type 1 SS MS F Value p value Linear 1 2429199104 2429199104 215249 lt 0001 Q L 1 00386341 00386341 34 5715 Quadratic LOF 2 05507532 02753766 244 1371 Linear LOF 3 05893874 01964625 174 2217 The Type 1 analysis ofthe linear term is the same as the analysis ofthe linear term in our model based on orthogonal contrasts Note that the test for the quadratic term given a linear term is already present in the model is the same for both analyses The advantage of the orthogonal approach is that the test of the quadratic effect is the same whether or not the linear term is in the model its disadvantage is that it is more dif cult to set up The quadratic lack of t isn7t an interesting hypothesis7 but note that the linear lack of t test is the same as the linear lack of t test in the orthogonal analysis it has the same advantages and disadvantages in Yandell7s formulation as the test of Q L EMS Discussion Respond to the following questions individually then discuss your answers in your group You should hand in both your individual responses and a group response We will discuss your group responses and then I will lecture on advanced topics Suppose J surgical methods are tested at each of I randomly selected hospitalsi At each hospital7 K doctors are randomly assigned to each surgical method for a total of JK doctors per hospitali Each doctor operates on n patients A reasonable model and EMS table for the experiment are presented belowi Hi iid Mo 0 j J39 Yiij Hi Mj HMij Dkij 5139ij HMij iid N07 021M D1607 iid ZVlt07 02D 51ij iid Mo 02 Construct an ANOVA table7 listing for each term the degrees of freedom and expected mean square using the algorithms in Section 125 Use the table below to help compute the expected mean squares I J K n R F R R Vari 1 j k 1 Comp Hi M1 HMZv Dkaj 5mm 216 1 Fractional Factorial Design Exercise Respond to the following questions individually then discuss your answers in your group You should hand in your individual response We will discuss your group responses and then I will lecture on advanced topics 1 For the following 24 1 table a Verify that lBCD is the design generator ilei7 that all the runs correspond to the low level of the effect BCD What is the alias structure you should be able to list 7 unique alias pairs b What is the resolution of the design ls a higher resolution 24 1 design possible c Suppose the effects BCD7 CBD and D BC are signi cant What possible con clusions can you reach about which effects are active 2 Suppose the following 24 1 design with generator lABCD has to be run in two Run lt1 ab ac ad bc bd cd abcd a Write the alias structure for the fractional factorial there should be 7 unique alias pairs again Suppose the experiment has to e run in two blocksiwhat would be some reasonable choices for aliased pairs of effects to confound with block Write out the runs for each block Type III and Type IV Hypotheses Example An education major wanted to test the ef cacy of teaching methods for the division of fractions Two new methods along with the standard method were studied Five teachers were trained in all methods and taught a total of twelve classes Differences in pre and posttest scores are recorded below Teacher We want to understand Type III and Type IV SS in SAS using this example We can obtain the contrasts that SAS tests when testing Type III and Type IV SS using the following comman s proc glm classes teacher method model diffmethodteachere e3 e4 We obtain the following SAS output for the Type III SS contrasts for METHOD Type III Estimable Functions for METHOD Effect Coefficients INIERCEPT 0 METHOD a L2 b L3 c L2 L3 TEACHER 01me OOOOO TEACHERMEIHOD 1 a 00909L202273L3 1 b 00909L202273L3 2 a 04545L203636L3 2 c O4545L203636L3 3 a 03636L200909L3 3 b O1818L205455L3 3 c O5455L206364L3 4 b 0 5 a 00909L202273L3 5 b 00909L22273L3 The coefficients are parameter coefficients for the unconstrained model but they are used somewhat differently here than in the general form for estimable functions The output above indicates that we are simultaneously testing whether the following two unusual con trasts are 0 L2 a1 7 a3 0909711 7 0909721 4545712 7 4545732 3636713 1818723 75455733 7 0909715 7 0909725 L3 7 a2 7 a3 7 2273711 7 2273721 7 3636712 7 3636732 7 0909713 5455723 76364733 7 2273715 7 2273725 These can be reorganized into the following still unusual7 but more comprehensible con trasts of cell means L ii 3 i i 2 7 11M11 11M12 11M1311M15 1 2 1 5 6 wi EMZS Ems EMSQ EMSS L i 3 i i 3 3 7 22M1111M12 11M13 22M15 5 6 5 4 7 Jr wi EMZS Ems EMSQ EMSS With no missing cells7 Type 111 SS should actually test the following hypotheses regardless of whether the design is balanced PMMa1 7 PMMa3 07 PMMa2 7 PMMa3 0 You could add data to the missing cells to verify the preVious statement A quick glance at the Type IV contrasts shows that all problematic columns are eliminated when constructing the contrasts Type IV Estimable Functions for METHOD Effect Coefficients INTERCEPT 0 METHOD a L2 c L2L3 TEACHER 01me OOOOO TEACHER METHOD 1 0 5L2L3 mm mmmMMH In this case7 we would be testing whether the following two contrasts are 0 L2 M12M13 M32M33 L 7ify 3M23M33 This approach may seem too conservative when there are many cells missing but you at least have a good handle on the contrasts tested the same could not be said of the Type III contrastsi Class Exerciser Using the SAS output below7 nd the four contrasts being tested in the Type IV analysis for Teacher Be sure to write them as functions of Mlj Comment Type IV Estimable Functions for TEACHER Effect Coefficients INTERCEPT 0 METHOD a O b O c O TEACHER 1 L5 2 L6 3 L7 4 5 L5 L6 L7 L8 TEACHERMETHUD 1 mmm mHmmM a a a a b b b b c c 05L5 L6 05L7 05L5L605L7 05L5 05L7 L8 05L505L7L8 0 0