### Create a StudySoup account

#### Be part of our community, it's free to join!

Already have a StudySoup account? Login here

# Design Of Experiments STAT 51400

Purdue

GPA 3.63

### View Full Document

## 43

## 0

## Popular in Course

## Popular in Statistics

This 83 page Class Notes was uploaded by Bailey Macejkovic on Saturday September 19, 2015. The Class Notes belongs to STAT 51400 at Purdue University taught by Staff in Fall. Since its upload, it has received 43 views. For similar materials see /class/207946/stat-51400-purdue-university in Statistics at Purdue University.

## Similar to STAT 51400 at Purdue

## Popular in Statistics

## Reviews for Design Of Experiments

### What is Karma?

#### Karma is the currency of StudySoup.

#### You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 09/19/15

Statistics 514 Design of Experiments Topic 7b Summary Testing Multiple Contrasts F test tests all possible contrasts reduced power for any one contrast Overall error rate 7 Prany Type I error Goes to 1 as number of tests increases if nothing done 7 Usually per comparison error rates a should be smaller Independent tests orthogonal contrasts acont39rast 1 i 1 awerall1m Sche s Method 7 For unplanned7 general comparisons Substitutes a 7 1 for 1 degree of freedom 7 Nothing signi cant if F test is not signi cant Comparisons of means 7 Check difference of means against Critical Dz erence Fisher s LSD Compare t with no adjustment Note MSE in denominator Tukey s HSD Controls experimentwise error over all comparisons of means not general con trasts Rectangular con dence regions Bonfermm39 7 Use aadj awerallm For planned comparisons Conservative not powerful Others Duncan7s Multiple Range Test Newman Keuls Dunnett Comparison with Best Con dence Intervals o If overall rate is 047 then set each con dence interval to be at 1001 7 aadj level or adjust t if Scheffe or Tukey 0 Get larger con dence intervals 0 Thus7 the probability that at least one con dence interval does not contain true value in our case7 the population mean is approximately a 0 Interpretation important Issues with Multiple Comparisons 0 Error Rates Comparisonwise Experimentwise False Discovery Rate 7 Others 0 Contemt Which types of comparisons Consistency with F ratio Only want to use p values Tests independent 0 Presentation criteria beyond error rates 7 Just p values Con dence intervals 0 De nition of power Controversies o P values are hypothetical7 unintuitive7 approximate7 incomplete 0 Multiple testing adjustments are arbitrarily applied7 antithetical to discovery7 approx imate7 open to manipulation 0 but data snooping can be more disastrous o Ultimately7 results depend on intention of user Statistics 514 Design of Experiments Topic 10 Topic Overview This topic will cover 0 Mixed Effects Designs 0 Nested Factors 0 Split plot Designs 0 Computing Standard Errors 0 Repeated Measures Analysis Factorial Experiments with Random Effects 0 Much of the previous discussion has focused on xed effects 7 Always use MSE in denominator of F test Use MSE in linear combinations and 01s 0 Not always true when random factors present 7 May use interaction MS or combination of MS7s 0 Will now use EMS as guide for tests 0 Two models Random model7 Mixed model TwoFactor Random Model z3917277a yam MTi j7 ij ijk j1727 7b k1 2 7n Ti N N0703 3739 N N07U29 73 N N07U o Varyijk 02 a 0 0 0 Expected MS7s similar to one factor random model 7 EMSE 02 Topic 10 Page 1 7 EMSA 02 bnaf 7103 7 EMSB 02 17wa 7103 7 EMSAB 02 710 0 EMS determine which MS to use in denominator H0 3 0393 0 7 MSAMSAB H0 3 0 0 7 MSBMSAB H0 3 0 0 7 o No hierarchical testing Look at all tests Estimating Variance Components 0 Using ANOVA method to 7 MSE 6393 MSA7MSABbn 6 7 7 MSABan g MSAB 7 0 Sometimes results in negative estimates 0 proc varcomp and proc mixed compute estimates 0 Can use different estimation procedures 7 ANOVA method 7 Method typel 7 RMLE method 7 Method remldefault o proc mixed 7 Variance component estimates 7 Hypothesis tests and con dence intervals Gauge Capability Example in Text 132 options nocenter ps60 1580 data randr input part operator resp cards 1 1 21 1 1 2O 1 2 2O 1 2 2O 1 3 19 1 3 21 2 1 24 2 1 23 2 2 24 2 2 24 2 3 23 2 3 24 3 1 2O 3 1 21 3 2 19 3 2 21 3 3 2O 3 3 22 Topic 10 Page 2 4 1 27 4 1 27 4 2 28 4 5 1 19 5 1 18 5 2 19 5 6 1 23 6 1 21 6 2 24 6 7 1 22 7 1 21 7 2 22 7 8 1 19 8 1 17 8 2 18 8 9 1 24 9 1 23 9 2 25 9 10 1 25 10 1 23 10 2 11 1 21 11 1 20 11 2 12 1 18 12 1 19 12 2 13 1 23 13 1 25 13 2 14 1 24 14 1 24 14 2 15 1 29 15 1 30 15 2 16 1 26 16 1 26 16 2 17 1 20 17 1 20 17 2 18 1 19 18 1 21 18 2 19 1 25 19 1 26 19 2 20 1 19 20 1 19 20 2 proc glm class operator part 2 26 4 3 2 18 5 3 2 21 6 3 2 24 7 3 2 2O 8 3 2 23 9 3 10 11 12 13 14 15 16 17 18 19 20 model respoperatorpart Im m wp t MHtm g 27 4 3 2 18 5 3 2 23 6 3 2 22 7 3 2 2 25 2 2O 2 19 2 25 2 25 2 28 2 26 2 2O 2 19 2 24 2 17 10 3 24 11 3 21 12 3 18 13 3 25 14 3 24 15 3 31 16 3 25 17 3 2O 18 3 21 19 3 25 2O 3 19 test Hoperator Eoperatorpart test Hpart Eoperatorpart 8 1 2 O 19 8 3 18 24 9 3 24 11 COCOCOCOCOCOCOCOCOCOCO 0 O proc mixed clwald maxiter20 covtest methodtype1 class operator part model resp random operator part operatorpart proc mixed cl maxiter20 covtest class operator part model resp random operator part operatorpart run Dependent Variable resp Source Model Error Corrected Total Source operator part operatorpart 59 60 119 DF 38 Sum of Squares 1215091667 9500000 1274591667 01 Type III SS 2616667 1185425000 27050000 Topic 10 Page 3 Mean 0 Mean 01 OMH Square 594774 991667 Square 308333 390789 711842 F Value 2077 F Value 132 6292 072 Pr gt F 0001 Fr gt F 02750 0001 08614 Source operator part operatorpart Type III Expected Mean Square VarError 2 Varoperatorpart 40 Varoperator VarError 2 Varoperatorpart 6 Varpart VarError 2 Varoperatorpart Tests of Hypotheses Using the Type III MS for operatorpart as an Error Term Source operator part Tests of Hypotheses for Random Model Analysis of Variance Dependent Variable resp Source operator part Error Error MSoperatorpart Source operatorpart Error MSError DF Type III SS Mean Square F Value 2 2616667 1308333 184 19 1185425000 62390789 8765 DF Type III SS Mean Square F Value 2 2616667 1308333 184 19 1185425000 62390789 8765 38 27050000 0711842 DF Type III SS Mean Square F Value 38 27050000 0711842 072 60 59500000 0991667 Type 1 Analysis of Variance Sum of Source DF Squares Mean Square operator 2 2 616667 1308333 part 19 1185425000 62390789 operatorpart 38 27 050000 0711842 Residual 60 59500000 0991667 Type 1 Analysis of Variance Source Expected Mean Square Error Term operator VarResidual 2 Varoperatorpart MSoperatorpart 40 Varoperator part VarResidual 2 Varoperatorpart MSoperatorpart 6 Var part operatorpart VarResidual 2 Varoperatorpart MSResidual Residual VarResidual Covariance Parameter Estimates Standard Cov Parm Estimate Error Value Pr Z Alpha Lower operator 001491 003296 045 06510 005 004969 part 102798 33738 305 00023 005 36673 operatorpart 01399 01219 115 02511 005 03789 Residual 09917 01811 548 lt0001 005 07143 The Mixed Procedure Topic 10 Page 4 Fr gt F 01730 lt0001 Pr gt F 01730 lt0001 Pr gt F 08614 Upper 007952 168924 009903 14698 Iteration History Iteration Evaluations 2 Res Log Like Criterion 1 624 67452320 1 3 409 39453674 0 00003340 2 1 409 39128078 0 00000004 3 1 409 39127700 0 00000000 Convergence criteria met Covariance Parameter Est imates Standard Cov Farm Est imate Err or Value Pr Z Alpha Lower Upper operator 001063 003286 032 03732 005 0001103 3737E12 part 102513 33738 304 00012 005 58888 221549 operatorpart 0 Residual 08832 01262 700 lt0001 005 06800 11938 Con dence Intervals for Variance Components 0 Can use asymptotic variance estimates to form Cl 0 Known as Wald7s approximate Cl 0 mixed option C1 wald or method typel Use standard normal a 95 Cl uses 196 i19600330 70057 008 i19633738 3671689 0 In general proc mixed uses Satterthwaite Cl Default method 7 REML Versions lt 612 computed Wald Cl Current uses Satterthwaite7s Approximation Will discuss this Cl construction later Rules for Expected Mean Squares 135 0 In models so far7 EMS fairly straightforward 0 Could show EMS using brute force expectation method 0 For mixed models7 good to have formal procedure 0 Montgomery describes procedure for restricted model 1 Write the error term in the model as gagWm where m represents the replication subscript 2 Write each variable term in the model as a row heading in a two way table Topic 10 Page 5 Write the subscripts in the model as column headings Over each subscript write F77 if factor xed and R77 if random Over this write down the levels of each subscript For each row copy the number of observations under each subscript providing the subscript does not appear in the row variable term For any bracketed subscripts in the model place a 1 under those subscripts that are inside the brackets 9 7 Cf 03 Fill in remaining cells with a 0 if subscript represents a xed factor or a 1 if random factor To nd the remaining mean square of any term row cover the entries in the columns that contain non bracketed subscript letters in this term in the model For the rows with at least the same subscripts multiply the remaining numbers to get coef cient for corresponding terms in the model 5 2Factor Fixed Model 9137 M 7391 5739 Twig ELM F F R a b 71 Expected Factor 139 j k Mean Square 739 0 b 71 02 ME 071 2 B a 0 71 02 7L T 76 0 0 71 02 6ijk 1 1 1 0392 2Factor Random Model 9137 M 7391 5739 T ij 61731 R R R a b 71 Expected Factor 1 j k Mean Square 739 1 b 71 02 7103 177103 B a 1 71 02 7103 07102 76 1 1 71 02 7103 6ijk 1 1 1 0392 2Factor Mixed Model A Fixed 9137 M 7391 5739 Twig 61731 Topic 10 Page 6 F R R a b 71 Expected Factor 239 j k Mean Square Ti 0 b n 02 710 ME 67 a 1 n 02 17102 76 0 1 n 02 710 6ijk 1 1 1 0392 3Factor Mixed Model A Fixed yam M Ti 5739 6k T ij 7396ik 55 ijkl F R R R a b c n Factor 239 j k Z Expected Mean Squares Ti 0 b c n 02 enaf bnaf7 nafm 1702 67 a 1 c n 02 anafh Jenaa W a b 1 n 02 1710337 abnag 76 0 1 c n 02 naf w enaf mm 0 b 1 n 02 naf w b71037 67g a 1 1 n 02 1710 767 k 0 1 1 n 02 nafm Eij 1 1 1 1 2 Construction of Hasse Diagram Described in Oehlert Used for both restricted and unrestricted models Provide graphical View of design Shows nestedcrossed and random xed structure Every term in model is a node Termsnodes placed in layered structure Term U is above term V if all terms in U are in V Join nodes based on nestedcross structure Brackets placed around random terms Topic 10 Page 7 3Factor Mixed Model 0 Denominator for U is leading eligible random terms 0 Leading Closest connected random term below U o Eligible Unrestricted Any random term possible 7 Restricted Any without xed factor not in U M Al3C Al3 AE3 4C E Restricted Model A Leading random terms are AB and A0 a approximate test B Leading random term is BC because AB has xed factor A BC Leading term is E because ABC has xed factor A Unrestricted Model A Leading random terms are AB and A0 a approximate test B Leading random terms is AB and BC a approximate BC Leading term is ABC TwoFactor Mixed Effects Model 0 Same model but different parameter restrictions 1 2 Ti 0 and B N N07 0 usual assumptions 0 Assume A xed and B random 2 73 N07 a Daf a a 7 1a simpli es EMS 3 ZjT8ij 0 for 6 level j added restriction 0 Due to added restriction Not all 76 independent7 Cov7 m7 7 3 fiaf 0 Known as restricted mixed effects model 0 This model coincides with EMS algorithm 7 EMSE 02 Topic 10 Page 8 EMSA 02 anTiZa 71 710 EMSB 0217u7a EMSAB 02 710 NOTE If X N N0702 then Xi Cov Hypothesis Tests and Diagnostics 0 Hypothesis Tests H0 7391 720 MSAMSAB H0 a 0 a MSBMSE H0 a 0 a MSABMSE o Variance Estimates Using ANOVA method f72 MSE a MSB i MSEan f MSAB i MSEn Diagnostics 0 Histogram or QQplot Normality or Unusual Observation 0 Residual Plots Constant variance or Unusual Observations Multiple Comparisons yam M Ti 5739 TBl 39 ELM 37 u n B 56 a V3FZ7i Ufab a 1U ab Uzbn Ti 7 W TEL 7 776 a 7 V3Fz QUE b QUZbn 2n03 02bn 0 Need to plug in variance estimates to compute VaryH o What are the DF 0 For pairwise comparisons7 use estimate 2MSABbn 0 Use deB for t statistic Topic 10 Page 9 Sample Size Calculations Use Charts V and VI Random Effects Model A Factor mm dfden A 1 r021 gj a4 a71b71 UV LUZ B latm b l a71b71 1 a4 b4 abnil AB 0 Mixed Effects Model Factor A or ltIgt mm dfden bn A a4 a71b71 B MHZ 2 b71 abn71 1 a4 b4 bnnil AB 0 Gauge Capability Example in Text 123 options nocenter ps40 ls75 data randr input part operator cards 1 21 1 24 1 2O 1 27 1 19 1 23 1 22 1 19 1 24 10 1 25 10 11 1 21 11 12 1 18 12 13 1 23 13 14 1 24 14 15 1 29 15 16 1 26 16 17 1 2O 17 18 1 19 18 19 1 25 19 2O 1 19 2O DCONOBU39IrbCOIQH DCONOBU39IrbCOIQH I I I I I I I I H 2O 1 23 2 21 3 27 4 18 5 21 6 21 7 17 8 23 9 I I I I I I I I I I H 0 O 2 2 2 2 2 2 2 2 2O 24 19 28 19 24 22 18 resp 2 2O 1 3 2 24 2 3 2 21 3 3 2 26 4 3 2 18 5 3 2 21 6 3 2 24 7 3 2 2O 8 3 2 23 9 3 26 10 2 25 2O 11 2 2O 17 12 2 19 25 13 2 25 23 14 2 25 3O 15 2 28 25 16 2 26 19 17 2 2O 19 18 2 19 25 19 2 24 18 2O 2 17 DCONOBU39IrbCOIQH 19 1 3 21 23 2 3 24 2O 3 3 22 27 4 3 28 18 5 3 21 23 6 3 22 22 7 3 2O 19 8 3 18 24 9 3 24 10 3 24 10 11 3 21 11 12 3 18 12 13 3 25 13 14 3 24 14 15 3 31 15 16 3 25 16 17 3 2O 17 18 3 21 18 19 3 25 19 2O 3 19 20 Topic 10 Page 10 COCOCOCOCOCOCOCOCOCOCO 25 2O 25 25 3O 27 2O 23 25 proc glm class operator part model respoperator Ipart random part operatorpart test means operator tukey lines Eoperatorpart lsmeans operator adjusttukey Eoperatorpart tdiff stderr proc mixed alpha05 cl covtest class operator part model respoperator ddfmkr random part operatorpart lsmeans operator alpha05 cl diff adjusttukey run quit Dependent Variable resp Sum of Source DF Squares Mean Square Model 59 1215091667 20594774 Error 60 59500000 0 991667 Corrected Total 119 1274591667 Source DF Type III SS Mean Square operator 2 2616667 1308333 part 19 1185 425000 62390789 operatorpart 38 27050000 0711842 Source Type III Expected Mean Square operator VarError 2 Varoperatorpart part VarError 2 Varoperatorpart operatorpart VarError 2 Varoperatorpart Tests of Hypotheses for Mixed Model Analysis of Variance Dependent Variable resp Source DF Type III SS Mean Square operator 2 2616667 1308333 part 19 1185 425000 62390789 Error 38 27050000 0711842 Error MSoperatorpart Source DF Type III SS Mean Square operatorpart 38 27050000 0711842 Error MSError 60 59500000 0991667 Alpha 005 Error Degrees of Freedom 38 Error Mean Square 0711842 344902 04601 Critical Value of Studentized Range Minimum Significant Difference F Value Pr gt F 2077 lt0001 F Value Pr gt F 132 02750 6292 lt0001 072 08614 Qoperator 6 Varpart F Value Pr gt F 184 01730 8765 lt0001 F Value Pr gt F 072 08614 Means with the same letter are not significantly different Topic 10 Page 11 Mean N operator A 226000 40 3 A A 223000 40 1 A A 222750 40 2 Standard Errors and Probabilities Calculated Using the Type III operatorpart as an Error Term MS for Standard LSMEAN operator resp LSMEAN Error Pr gt ItI Number 1 223000000 01334018 lt0001 1 2 222750000 01334018 lt0001 2 3 226000000 01334018 lt0001 3 Least Squares Means for Effect operator t for H0 LSMeaniLSMeanj Pr gt t Dependent Variable resp ij 1 2 3 1 0132514 159017 09904 02622 2 013251 172269 09904 02100 3 1590173 1722688 02622 02100 The Mixed Procedure Iteration History Iteration Evaluations 2 Res Log Like Criterion 0 1 622 27805725 1 2 409 45998838 0 00002843 2 1 409 45716449 0 00000003 3 1 409 45716136 0 00000000 Convergence criteria met Covariance Parameter Estimates Standard Cov Parm Estimate Error Value Pr Z Alpha Lower part 102513 33738 304 00012 005 58888 operatorpart 0 Residual 08832 01262 700 lt 0001 0 05 06800 Covar ianc e Paramet er Estimates Cov Parm Upper art 22 1549 operatorpart Topic 10 Page 12 Residual 1 1938 Fit Statistics 2 Res Log Likelihood 4095 AIC smaller is better 4135 Type 3 Tests of Fixed Effects Num Den Effect DE DE F Value Pr gt F operator 2 98 148 02324 KR adjustment Restricted model Vary 1 02 mfg na bn 08832 210251340 Var1 7J2 202 nUf bn 0883220 Least Squares Means Standard Effect operator Estimate Error DF t Value Pr gt ItI Alpha operator 1 223000 07312 201 3050 lt0001 005 operator 2 222750 07312 201 3046 lt0001 005 operator 3 226000 07312 201 3091 lt0001 005 Least Squares Means Effect operator Lower Upper operator 1 207752 23 8248 operator 2 207502 23 7998 operator 3 210752 241248 Differences of Least Squares Means Standard Effect operator operator Estimate Error DF t Value Pr gt ItI operator 1 2 002500 0 2101 98 012 09055 operator 1 3 03000 02101 98 143 01566 operator 2 3 03250 02101 98 155 01252 Differences of Least Squares Means Effect operator operator Adjustment Adj P Alpha operator 1 2 TukeyKramer 09922 0 05 operator 1 3 TukeyKramer 03308 0 05 operator 2 3 TukeyKramer 02739 0 05 Differences of Least Squares Means Adj Adj Effect operator operator Lower Upper Lower Upper operator 1 03920 04420 04751 05251 operator 1 3 07170 01170 08001 02001 operator 2 3 07420 009201 08251 01751 Topic 10 Page 13 Other Mixed Models 0 SAS uses different mixed model in analysis 0 Reduce parameter restrictions Z77 0 and B N N07U 75 N N07U 0 Known as unrestricted mixed model 0 For two factor model 2 EMSE U EMSA 02 bn ZTiZa 71 naf EMSB 02 mm 710 EMSAB 02 710 0 random statement is SAS also gives these results 0 Differences Test H0 0 0 using MSAB in denominator Often more conservative test7 if M83 7 MSABan To decide which is appropriate7 suppose you ran experiment again and sampled by chance the same random effects levels Should this mean you also have the same set of interaction effects Yes Restricted No Unrestricted General Mixed Effects Model 0 In terms of linear model Y X6 Z6 e B is a vector xed effect parameters 6 is a vector of random effect parameters 6 is the error vector 0 6 and E assumed uncorrelated means 0 covariance matrices G and R allows correlation CovY ZGZ R Topic 10 Page 14 o If R 02 and Z 07 back to standard linear model 0 SAS proc mixed allows one to specify G and R o G through random B through repeated 0 Unrestricted linear mixed model is default Example A corporation wants to compare two different sunscreens for protecting the skin of adults age 20 25 from burningtanning A random sample of 10 subjects ages 20 25 were chosen for the study With each person7 four squares on the back were rnarked7 and each sunscreen was randomly applied to two of the squares The color of skin was noted prior to treatment and then after a two hour period of sun bathing The difference was recorded A large positive difference means less protection 0 What are the factors in the model 0 Which are random and which are xed Results Sunscreen Subject 1 2 1 82 76 61 68 2 36 35 43 47 3 107 103 96 92 4 39 44 23 25 5 129 121 124 128 6 55 59 48 40 7 91 97 83 86 8 137 132 129 136 9 81 87 80 75 10 25 28 21 25 Which appears to be better options nocenter ls75 ps60 data new infile quothSystemDesktopsunscreendatquot input subject lotion resp proc mixed covtest cl maxiter20 class subject lotion model resplotion ddfmkr random subject subjectlotion lsmeans lotion diff cl Topic 10 Page 15 run quit Covariance Parameter Estimates Standard Cov Parm Estimate Error Valu Pr Z subject 142086 67767 210 00180 subjectlotion 0 2660 01579 168 00460 Residual 01320 004174 316 00008 Type 3 Tests of Fixed Effects Num Den Effect DE DE F Value Pr gt F lotion 1 9 676 00287 1 Significant source of variation due to combination one lotion may not be best for all subjects 2 Significant subjecttosubject variability 3 4 Is Effect lotion lotion Effect lotion lotion Effect lotion Lotion 2 on average offers more protection difference practically significant Least Squares Means Standard lotion Estimate Error DF t Value 1 78200 12058 921 649 2 71500 12058 921 593 Least Squares Means lotion Lower Upper 1 51015 105385 2 44315 98685 Differences of Least Squares Means Standard lotion lotion Estimate Error DF 1 2 06700 02577 9 For restricted model 7 VaryH 02 a 7 Unaf a na bn 01320 02660 214208620 1447which is slightly larger than the unrestricted model Alpha Lower 005 66748 005 01084 005 007726 Pr gt ItI Alpha 00001 005 00002 005 tValue Prgt ItI 260 00287 Approximate Ftests and Con dence Intervals o For some models7 no exact F test exists 0 Recall 3 Factor Mixed Model A xed 0 No exact test for A based on EMS Assume a 37 b 27 c 37 n 2 and following MS were obtained Topic 10 Page 16 Source DE MS EMS F p A 2 07866 05A 1 6033 4030 20330 02 7 7 B 1 00010 187323 68230 02 033 0622 AB 2 00056 6033 227ch 02 224 0222 O 2 00560 12aJ 600 02 1887 0051 A0 4 00107 42730 4 227330 02 428 0094 BC 2 00030 60230 02 1000 0001 ABC 4 00025 20ch 02 833 0001 Error 18 00003 02 Could assume some variances negligible not recommended without conclusive77 evidence Examples o If assume 7ch and 033 equals 0 Source DE MS EMS F p A 2 07866 A 27330 02 31464 0001 B 1 00010 1873 68230 02 033 0622 O 2 00560 1203 600 02 1887 0051 BC 2 00030 60230 02 12 0319 ABC 4 00025 2aiBCa2 10 0427 Error 24 00025 02 Could test interactions and then possibly remove 0 Based on rst table AC and AB found insigni cant Test A over ABC a F 31464 and p lt 0001 0 Both Type 1 and Type 11 errors possible 0 What level to test insigni cance Pooling Mean Squares with Error 0 Variation of previous approach 0 Works well when df for error is small lt 6 o Often test signi cance at 04 025 0 May pool together something that is different from zero 0 Use high 04 to protect against that Topic 10 Page 17 Pooling Procedure 1 Test highest order interaction vs error 2 If ABC found insigni cant pool together mean squares SSE SSABC de deBc 3 Continue by testing AB A0 B0 over new error and pool accordingly MS E 4 ln SAS pooling accomplished by simply dropped term from model 0 Procedure primarily used for error not interactions o If higher order interaction found signi cant 7 stop 0 Pooling procedure of no bene t in example Satterthwaite s Approximate Ftest Use linear combination of mean squares 0 To test certain factor choose numerator and denominator such that the difference in MS is a multiple of the effect of interest 0 Ratio approximately F where MSiiMSS F MS i i MS MS i i M55 p MSEfrMS fs q MSu i i M52 0 f is the degrees of freedom associated with MS 0 No MS in both num and denom indep o Caution when subtraction is used Example For the 3 factor model MSA 07866 570 MSABMSAC iMSABC 00107000567 00025 7 7 001382 7 p 7 2 q 7 0010724O0056220002524 7 43915 Topic 10 Page 18 o Interpolation needed PrF24 gt 57 00011 PrF25 gt 57 00004 p 08500011 01500004 0001 0 SAS can be used to compute p Values and quantile values for F and X2 values with non integer degrees of freedom pvalues probf X dfl df2 and probchix df Quantiles finvp dfl df2 and Cinvp df data pvalue p 1probf57 20 415 f finV095 20 415 cl cinv0025 1857 02 cinv0975 1857 proc print p f Cl 02 Obs p f c 1 000959732 671564 8 61485 322833 Example For the 3 factor model avoiding subtraction7 MSAMSABC 0786600025 4841 MSABMSAC 0010700056 7 078912 7 0786622 0002524 This is again found signi cant 201 600 7 001632 p q 00107240005622 Con dence Intervals 0 Use Satterthwaite7s pseudo F tests to create Cl 0 Recall deMSEUZ N X2 deMSE lt 02 lt deMSE 2 i i 2 X042de X17042de 0 Use pseudo F tests7 amp2 MS 7 MS 0 Both MS are independent and have similar X2 distribution 0 Assume linear combination of X2 is X2 with df MSTMSSiMSuiiMSv2 MSEfr MSSZfs MSEfu MSSfv 0 Use same Cl formula as above Topic 10 Page 19 Random Effects Example 132 Sum of Source DF Squares Mean Square F Value Pr gt F Model 59 1215091667 20594774 2077 lt0001 Error 60 59500000 0991667 Corrected Total 119 1274591667 Source DF Type III SS Mean Square F Value Pr gt F operator 2 2616667 1 308333 1 32 02750 part 19 1185425000 62390789 6292 lt0001 operatorpart 38 27050000 0711842 072 08614 2 df 6239 071 183957 6239219 071238 CI 18571028322818571028861 5912217 021317 07140 0015 1317 0712 0413 13122 071238 df CI 041300153079 04130015229 gtlt 1078 0002 270781 Example of Restricted vs Unrestricted Models There are various ways to compact a gold lling to make it harder Fillings need to be hard in order to wear well There are three standard ways to do this 1 Condensing The dentist uses a special hand tool a condenser to pack the gold into the cavity 2 Hand malletmg The dentist holds the condenser in place and an assistant taps it with a small hammer 3 Mechanical malletmg Like Method 2 except the hammer is built into the condenser and tapping is done by machine Five dentists are chosen from the UCLA School of Dentistry and the factors are crossed each dentist uses each of the three methods to pack gold into a small cavity drilled into a block of ivory Hardness was measured by pushing a pyramid shaped diamond into the lling and recording the size of the indentation Each method is used twice and order is assumed not to be a factor Method is xed while dentist is random Topic 10 Page 20 Restricted and Unrestricted Models for Mixed Effects Restricted Unrestricted random7 but restricted to d d t 39 t d add to zero across Methods ran om an unres 0 e For each dentist7 the Model interaction terms are i i i negatively correlated uncorrelated EMSDentist Dentists Error Dentists lnter Error EMS s and denominators Denominator MS for testing Error Interaction Dent1st effects is Fratio for Dentists tests true Dentist averages for eaCh DentISt the Intemretatzon observed response values the null hypothes1s that are equa are uncorrelated Properties of Restricted and Unrestricted Models Restricted Negatively correlated interaction terms Unrestricted Random terms are independent Restricted If Dentists effects are zero7 Dentists averages must be equal as in xed ef fects model77 Unrestricted Dentist effects are zero77 mean within factor correlation is 0 Remember SAS uses unrestricted model Limited Resources Interpretation of Restricted Model 0 Covariance between observations in restricted models could be negatively correlated o If responses are linked to a resource of limited supply7 then a negative correlation is to be expected Examples Enzyme concentration on two sites brain and heart Plants competing for nutrients Pooling 0 Lots of ways to choose best models eg7 AlC7 BIC7 Op 0 Usually check all possible models for best t Not always interested if effects are true77 or practical Lots of re tting which takes up computation involved 0 Not always clear what to do with interaction in mixed model Often only consider models with higher order interaction if lower order interactions containing terms is included Topic 10 Page 21 7 Sometimes narrow constraint to interaction with xed terms in lower orders 7 Book gives prescription for pooling interaction effects df lt 61 gt 025 in lower orders Basically7 shouldn7t pool if it makes test less sensitive One way around mixed model issues is to assume every factor is xed 0 Random effects are not discussed at all in Wu and Hamada o Allows everything to be cast as linear regression 0 Reason Maximum Likelihood with xed effects E Least Squares estimates 0 However7 for mixed effects models7 Least Squares estimates are Method of Moments estimates Likelihood Let zl zn be 71 observations with distribution fzit9i Likelihood Function 119 f1 91 f 9n Maximum Likelihood Estimator MLE MLE arg meax L09 Can be a computationally intensive maximization Example Fixed Effects Model 1 factor Mm an lt2vrgtNa2r12explte2lty 7 my 7 M where MM177M177Ma77Ma Since maximizing L is equivalent to minimizing y 7 y 7 p ML E LS Second Example Random Effects Model a b n 2 yam M Ti 5739 Twig ELM Topic 10 Page 22 Covyijk7yizjzkz 021239 z j j 7 k k aim zquot 7310 j 03W m yquot Observations 1147 7y22 come from normal distribution with 8 gtlt 8 covariance matrix 2 page 517 1 L017 0370 Jim 02 127TNlEll N2 expl y 7 MnE 1y 7 mm wherej is N gtlt 1 vector of 17s stricted Maximum Likelihood maximize L under the constraints 02 2 07 a 2 07 0 2 0 0 2 0 Montgomery7s de nition 7 Mixed Model Similar but slightly more complicated Standard Errors Use asymptotic estimates Nested Factors De nitions 0 Factors A and B are considered crossed if Every level of B occurs with every level of A A factorial model involves crossed factors Factor A Factor B 1 2 3 4 1 xx xx xx xx 2 xx xx xx xx 3 xx xx xx xx A 1 2 3 4 B 1 2 3 1 2 3 1 2 3 1 2 3 RespL x x x x x x x x x x x x Respg x x x x x x x x x x x x 0 Factors A and B considered nested if Levels of B occur with only one level of A Recall replicated Latin square designs One can arbitrarily number levels of B Topic 10 Page 23 Replication as a Nested Factor 0 Consider CRD y M Ti 61 0 Can write design where a 3 and n 4 as Treatment 1 2 3 Replicate 1234 5 Response xlxlxlx xl l o Thus7 could build replicate into model as factor 0 Order of replicates unimportant a nested o Brackets denote which factor it7s nested within 21M M Ti TN 0 Replication variability is used as error7 6M TN note constant variance assumption 0 ln SAS7 omit lowest level term from model statement Otherwise7 all tests must be done using test option or statement ie7 0 df error Subsampling o In many problems7 dif cult to measure EU response 0 Subsamplmg 7 sampling EU numerous times Done to get more accurate measure of EU response Often use average of subsamples for analysis 0 What if we include subsamples in analysis Treatment 1 2 3 Replicate 1234 5 X X l l o No association between subsamples across EU7s although variances constant Numbering of subsample arbitrary Subsamples always a nested factor Topic 10 Page 24 Analysis of Subsarnples o If subsample added to model7 results comparable to using the average of the subsam ples Could also look at variance or median as summary Helps with design of future experiments Can check for consistency of measurements Protect against missing values and contamination Computational bene t if Ugub gt 02 Variance within greater than variance between subsamples 0 Example 7 Soil samples within plot eg7 moisture content7 acidity Biochemical analysis of animal tissue 7 Multiple plates of single agar batch Simple Random Effects Model ym M Ti 613739 0 In some situations7 can consider this as subsampling o Primarily interested in M or a 0 Two stages of sampling Randomly choose units of interest a 7 Obtain measurements on that unit of interest 02 0 Use subsampling variability in test H0 a 0 mm MSTTtnk 0 Same variance based on averages of primary units Topic 10 Page 25 CRD with Subsampling SAS Program 0 Interested in effect of four methods of spreading mulch on soil moisture content Have eld of 16 plots 7 4 for each spreading method Cannot measure moisture content directly Choose 2 sites within plot to measure moisture Samples averaged to obtain moisture content Can View subsamples nested within plot lntroduces new source of variability a7 important for estimation 21727 7a yijkM7 i ji6kij j1727 771 k12 s 6739 N V07 0392 5km N 07 a 7 Source DF EMS Trt 171 502U nsZTi2a71 Plot an 7 1 502 at Subsampling ans 7 1 a Total ans 7 1 What is the optimal n if 715 is constant What happens if 5 goes to in nity options nocenter ps40 1572 data new input trt plot sub resp cards 1 MMHHHHHHH 1 1 2 2 3 3 4 4 1 1 1 2 1 2 1 2 1 2 1 2 MWMWM U101 rbrbwrb OU IU IO Topic 10 Page 26 U1 h hwwwwwwwmwwwwww rhrbCOCOMMHI pbpr WMMHI pbpbwwww OU IU IOU IU IU IOU IOOU IOOU IU I Plot is nested within trt sub is nested within plot proc sort by trt plot proc means noprint var resp by trt plot output outnew1 meanrespmn Take means within plot proc glm class trt model respmntrt proc glm datanew class trt plot sub model resptrt plottrt test htrt eplottrt gives similar results Dependent Variable respmn Sum of Source DF Squares Mean Square Model 3 26 04296875 868098958 Error 12 2 57812500 0 21484375 Topic 10 Page 27 F Value 4041 Corrected Total 15 2862109375 Source Pr gt F Model lt0001 Error Percent of variability of moisture explained by spreading technique averaged across site within plot RSquare Coeff Var Root MSE respmn Mean 0909922 1273167 0463512 3640625 Dependent Variable respmn Source DF Type III SS Mean Square trt 3 26 04296875 8 68098958 Source Pr gt F trt lt0001 Dependent Variable resp Sum of Source DF Squares Mean Square Model 15 5724218750 381614583 Error 16 5 87500000 0 36718750 Corrected Total 31 6311718750 Source Pr gt F Model lt0001 Error F Value 4041 F Value 10 39 Percent of variability of moisture explained by spreading and plot RSquare Coeff Var Root MSE resp Mean 0906919 1664439 0605960 3640625 Dependent Variable resp Source DF Type III SS Mean Square 3 5208593750 1736197917 plottrt 12 515625000 042968750 Source Pr gt F trt lt0001 plottrt 03772 Tests of Hypotheses Using the Type III MS for plottrt as an Error Term same result as first analysis Source DF Type III SS Mean Square trt 3 5208593750 1736197917 Source Pr gt F trt lt0001 Topic 10 Page 28 F Value 4728 117 F Value 40 41 RCBD with Subsampling Interested in studying the tenderizing methods of steak Three animals are chosen7 and the four methods of treatment are applied to like portions of each animal These portions are then divided up into ve smaller portions7 and the tenderness is evaluated Since method of treatment is applied to a larger portion7 the EU for tenderness are the larger portions The individual evaluations relative to the method are subsamples Source DF EMS Animal b 7 1 Treatment 1 71 502 a b5 2 TiZa 71 AnimalgtltTreatment b 7 1a 7 1 502 a Subsampling abs 7 1 a Total abs 7 1 Reasoning for Nested Factors Consider the following two examples 1 Drug company interested in stability of product 0 Two manufacturing sites 0 Three batches from each site 0 Ten tablets from each batch 2 Strati ed random sampling procedure Randomly sample ve states Randomly select three counties Randomly select two towns Randomly select ve households More manageable experiment than factorial7 CRD 0 Drug 7 Batches as non nested factor 0 Sampling 7 more concentrated than CRD Statistical Model 0 Consider a two factor problem 1727 7a yamMTi ji6kij j1727 7b k1727 7n 0 Bracket notation represents nested factor Topic 10 Page 29 0 Cannot include interaction 7 Not all levels of B appear with all levels of A 7 Cannot separate main effect of B and interaction AB 0 Factors may be random or xed 0 Can use EMS algorithm to describe tests Partitioning the Sum of Squares Balanced Design 0 Rewrite observation as yam i i i 0 Can look at Z 7 0 Right hand side simpli es to b i 71 Z i Z Z ij2 i i j i j k 0 SSA SSBA SSE o as opposed to b i an i 71 Z i i 17 Z Z ij2 i j i j i j k SSBA SSE SSAB Under normality7 all SSUz independent Analysis of Variance Table Source of Sum of Degrees of Mean F0 Variation Squares Freedom Square SSA a 7 1 MSA SSBA 1b71 MSBA Error SSE abn 7 1 MSE Total SST abn 7 1 SST ZZZyijy abn SSA 7 izyiwwabn SSW ZZyZJ7 zyf SSE Use EMS to de ne tests Topic 10 Page 30 Example 2Factor Nested Model Fixed F F R a b n z j k Expected Mean Square Ti 0 b n 02 LEI n2 2 19 BM 1 0 n 02 ab71 6km l l l 0392 Example 2Factor Nested Model Random R R R a b n z j k Expected Mean Square Ti 1 b n bnaf 710 02 67 1 1 n 710 039 Ek 39 l l l 0392 Example 2Factor Nested Model Mixed F R R a b n 239 j k Ti 0 b n 02 710 BM 1 1 n 710 02 Ek 39 l l l 0392 Example A company is interested in testing the uniformity oftheir lm coated pain tablets A random sample of three batches were collected from each of their two blending sites Five tablets were assayed from each batch Site 1 2 Batch 1 2 3 4 5 6 503 464 510 505 546 490 510 473 515 496 515 495 525 482 520 512 518 486 498 495 508 512 518 486 505 506 514 505 511 507 o What are the factors 0 Are any nested 0 Which are random and which are xed Topic 10 Page 31 Source of Sum of Degrees of Mean F0 Variation Squares Freedom Square Site 001825 1 001825 BatchSite 045401 4 011350 Error 029020 24 001209 Total 076246 29 yle ylgv yl v yg v yggv yg v Z Z Z 7638188 0 SST 4 7638188 4 2541 2420 24642235 4 7638188 4 1513230 4 076247 0 SSA 4 25414 2420 25672 2530 2608 2464235 4 2541 2420 24642235 4 75282 7602215 41513230 4 001825 0 SSBA 25412 24202 246425 4 75282 7602215 04501 SSE 4 7638188 4 7635286 4 02902 Results 0 Site F 00182501135 01608 There is not enough evidence to suggest that the two coating sites are different 0 Batch F 0113500121 939 Compare to F424 There is signi cant batch to batch variability 62 00121 6 W 00203 0 Batch variability is 002030020300121 627 of the total variability It appears that efforts should be made to eliminate the batch to batch variability lnvestigate what goes into coating a batch and see where the variability could be Nested Model as Factorial 0 Suppose we treat design as two factor factorial o Naively interpret SAS results 7 Signi cant batch gtlt site variability No longer signi cant batch to batch variability Topic 10 Page 32 o What does interaction term mean 0 Were assuming batch 1 effect similar across sites 0 Can7t separate interaction from main effect 0 Notice SSABSSB SSBA deBde deA 0 Could derive analysis from factorial results SAS Program options nocenter ls75 data new infile quothSystemDesktopcoatingdatquot input site batch tablet resp proc glm Nested Analysis class site batch model respsite batchsite random batchsite test hsite ebatchsite output outnew1 ppred rres symboll vcircle proc gplot plot respred proc glm datanew Factorial Analysis class site batch model respsite batch sitebatch random batch sitebatch test hsite ebatchsite proc glm datanew Factorial Analysis class site batch model respsite batch No interaction random batch run Sum of Source DF Squares Mean Square F Value Pr gt F Model 5 0 47226667 0 09445333 781 00002 Topic 10 Page 33 Error 24 029020000 001209167 Corrected Total 29 076246667 Source DF Type I SS Mean Square F Value Pr gt F 1 001825333 001825333 151 02311 batchsite 4 045401333 011350333 939 00001 Tests of Hypotheses Using the Type III MS for batchsite as an Error Term Source DF Type III SS Mean Square F Value Pr gt F site 1 001825333 001825333 016 07089 Sum of Source DF Squares Mean Square F Value Pr gt F Model 5 047226667 009445333 781 00002 Error 24 029020000 001209167 Corrected Total 29 076246667 Source DF Type I SS Mean Square F Value Pr gt F site 1 001825333 001825333 151 02311 batch 2 001152667 000576333 048 06266 sitebatch 2 044248667 022124333 1830 lt0001 Tests of Hypotheses Using the Type III MS for sitebatch as an Error Term Source DF Type III SS Mean Square F Value Pr gt F site 1 001825333 001825333 008 08010 Sum of Source DF Squares Mean Square F Value Pr gt F Model 3 002978000 000992667 035 07879 Error 26 073268667 002818026 Corrected Total 29 076246667 Source DF Type I SS Mean Square F Value Pr gt F site 001825333 001825333 065 04282 batch 001152667 000576333 020 08163 Sliding Factors Factors which appear to be nested7 but should be treated Example Suppose an experiment deals with the formability of body panels Formability is the ability to bend a at panel into an arbitrary shape Two different factors7 material and thickness will be considered Speci cally7 the materials considered are sheet metal and sheet molded compound7 SMC A thin piece of sheet metal is 07 mm thick A thick piece of metal is 12 mm thick Because SMC is not as strong as sheet metal7 a thin piece of SMC is 15 mm thick while a thick piece is 5 mm thick 0 Would appear that thickness is nested in material Topic 10 Page 34 as factorials o However7 if the factor thickness is labeled as thin and thick7 thickness appears crossed with material 0 Of course7 thickness cannot be both crossed and nested at the same time 0 Solution Recognizing intent of the experimenter 7 Does thickness of the panel affect formability77 7 What does the interaction term mean General m Stage Nested Design 0 Consider 3 factor nested design yij j M Ti 5m WW 641 Source of Sum of Degrees of Mean F0 Variation Squares Freedom Square SSA a 7 1 MSA SSBA 1b 71 MSBA 5503 abc 71 MSCB Error SSE abcn 7 1 MSE Total SST abcn 7 1 0 Problem with nested designs 7 Few df for non nested factor 7 ln mixed random situation7 less power for non nested factor Staggered Nested Design 0 Improve sampling ef ciency with unbalanced design 0 Consider A xed7 B and C are random 0 Staggered Nested Design 7 1 samples of non nested factor 1 levels of A 7 2 samples of rst nested factor 7 1 sample of second nested factor except two from one 7 Continue 0 Results in a 7 1 and 1 degrees of freedom Topic 10 Page 35 Crossed and Nested Factors Model 0 Can have design with crossed and nested factors 0 These factors can be xed or random 7 Nested factorial designs 7 Repeated measure designs 0 Example Investigator interested in improving the number of rounds per minute red from a Navy gun Believes a new method of loading the gun will increase the number of rounds red Needs a team of people to use this gun Divided teams into groups based on physique slight7 average7 and heavy Selected three teams from each of these groups for the experiment Each team was presented with both methods of loading and used each method twice in a random order Method 7 Fixed Group G7 7 Fixed Team within Group Tkm 7 Random yaw M Li G LGM Tm LBW any o What are degrees of freedom Source of Degrees of Variation Freedom 1 7 1 1 G b 7 1 2 LG a71b712 TG bc 7 1 LTG a 71bc 71 Error abcn 7 1 18 Total 35 Computing DF for Nested Effects 0 Treat as factorial and pool df 0 TM Tk GTJW39 LBW LTM LGTM 0 Could pool SS in similar manner Topic 10 Page 36 Example EMS F F R R 2 3 3 2 Expected Mean Square 239 j k Z F Li 0 3 3 2 18 2 L2 20T 02 F G 2 0 3 2 6ZG 4UUZ F LG 0 0 3 2 3 Z Z LGiJ 20T 02 R TM 2 1 1 2 40 0392 R LTLMJ39 0 1 1 2 20T 0392 R 61037 1 1 1 1 0392 M l 1 m j A v39 1 v Restricted Model L Leading term is LT G Leading random term is T LG Leading term is LT T Leading term is E because LT has xed L LT Leading term is E Z l t m f A v I v Unrestricted Model L Leading randorn term is LT G Leading randorn term is T LG Leading term is LT T Leading term is LT LT Leading term is E Topic 10 Page 37 S AS Program options nocenter ls75 data new infile hSystemDesktopgunsdat input method group team resp proc glm PI class group method team model resp groupImethod teamgroup methodteamgroup random teamgroup methodteamgroup test hgroup eteamgroup test hmethod emethodteamgroup test hgroupmethod emethodteamgroup means group duncan lines eteamgroup means method duncan lines emethodteamgroup means groupmethod oc mixed class group method team model respgroupmethod random teamgroup methodteamgroup lsmeans method group adjustduncan tdiff run Dependent Variable resp Sum of Source DF Squares Mean Square F Value Model 17 7191700000 423041176 1831 Error 18 415900000 23105556 Corrected Total 35 7607600000 Source DF Type III SS Mean Square F Value group 2 160516667 80258333 347 method 1 6519511111 6519511111 28216 groupmethod 2 11872222 05936111 026 teamgroup 6 392583333 65430556 283 methodteamgroup 6 107216667 17869444 077 Source Type III Expected Mean Square group VarError 2 Varmethodteamgroup 4 Varteamgroup Qgroupgroupmethod method VarError 2 Varmethodteamgroup Qmethodgroupmethod groupmethod VarError 2 Varmethodteamgroup Qgroupmethod teamgroup VarError 2 Varmethodteamgroup 4 Varteamgroup methodteamgroup VarError 2 Varmethodteamgroup Topic 10 Page 38 Pr gt F 0001 6543 7 1789 52 7 7 A2 7 17877231 7 UT 7 7119 0LT 7 T 7 70262 A 4159 02 231 18 Tests of Hypotheses Using the Type III MS for teamgroup as an Error Term Source DF Type III SS Mean Square F Value Pr gt F group 2 1605166667 802583333 123 03576 Tests of Hypotheses Using the Type III MS for methodteamgroup as an Error Term Source DF Type III SS Mean Square F Value Pr gt F method 1 6519511111 6519511111 36484 lt0001 groupmethod 2 11872222 05936111 033 07297 Duncan s Multiple Range Test across group NOTE This test controls the type I comparison error rate not the exper imentwise error rate Alpha 005 Error Degrees of Freedom 6 Error Mean Square 6543056 Number of Means 2 3 Critical Range 2555 2648 Mean N group A 20125 12 1 A A 19383 12 2 A A 18492 12 3 The Mixed Procedure Iteration History Iteration Evaluations 2 Re Log L e Criterion 12936405857 1 2 12585726953 000000003 2 1 12585726852 000000000 Convergence criteria met Covariance Parameter Estimates Cov Parm Estimate teamgroup 10908 Topic 10 Page 39 methodteam group Residual 0 21797 Type 3 Tests of Fixed Effects Num Den Effect DE DE F Value Pr gt F group 2 6 1 23 03576 method 1 6 29911 lt 0001 groupmethod 2 6 027 07705 Least Squares Means Standard Effect group method Estimate Error DF t Value Pr gt ItI method 1 235889 04922 6 4792 lt0001 method 2 150778 04922 6 3063 lt0001 group 1 201250 0 7384 6 27 25 lt 0001 group 2 193833 07384 6 2625 lt0001 group 3 184917 07384 6 2504 lt0001 Differences of Least Squares Means Standard Effect group method group method Estimate Error DF t Value method 1 2 85111 04921 6 1729 group 1 2 07417 1 0443 6 071 group 1 3 16333 1 0443 6 1 56 group 2 3 08917 10443 6 085 Differences of Least Squares Means Effect group method group method Pr gt ItI Adjustment Adj P method 1 2 lt0001 TukeyKramer lt 0001 group 1 2 05042 Tukey 07667 group 1 3 01688 Tukey 03297 group 2 3 04260 Tukey 06862 Improving Power 0 What if were interested in G 7 Since tested over TW7 increase number of teams 0 What if interested in L 0W 7 Since tested over LIZkm increase number of teams hat if interested in LT7 T 7 Since tested over error7 increase number of replications Topic 10 Page 40 SplitPlot Design Consider an experiment to study the effect of oven temperature three levels and amount of baking soda 4 levels on the consistency of a chocolate chip cookie Method 1 Factorial Model Each combination of temperature and baking soda are repli cated three times Combination randomly assigned to each of thirty six cookies Total of 36 cooking periods Method 2 Oven is heated to speci c temperature and four cookies put in oven Each cookie contains a different amount of baking soda Do this three times for each oven tem perature a total of nine cooking periods Method 2 is different from Method 1 because of a randomization restriction Instead of randomly assigning oven temperature to each cookie7 oven temperature is randomly assigned to a group of four cookies In other words7 the experimental unit for oven temperature is the sheet of four cookies Since the four cookies within a sheet are randomly assigned an amount of baking soda7 the experimental unit for baking soda is still an individual cookie 0 Whole plot Batch of four cookies 0 Subplot lndividual cookies 0 Whole plot divided into smaller regions known as subplot Splitplot Design 0 Arose in agriculture 7 Whole plot 7 Large eld 7 Subplot 7 Smaller sections of eld Four fertilizers and six corn varieties Spreader covers 15 foot wide section Planter covers 5 foot wide section Spread fertilizer on 15 gtlt 10 foot section whole plot Plant seed in 5 gtlt 5 foot section subplot Six subplots per whole plot 0 Very useful in other areas 7 Many situations where EU7s of factors varies 7 Repeated measures 7 subject split77 into time sections 7 Engineering 7 machine set once of a group of runs Topic 10 Page 41 Split Plot Structure Different from nested because factors are crossed Different from factorial because of randomization Information on factors from two levels or strata Whole plot 7 replications for rst factorblock for second factor Practical problem Can the subplots be matchedcrossed lf EU7s are serially corre lated within whole plot block7 then inference on subplot could be less valid Danger of constrained randomization opens up to confounding with block effects 0 Could consider split plot as consisting of 2 randomized block designs whole plots are blocks with replicates for sub plots whole plots are nested within whole plot factor CRD and RCBD whole plots are crossed with rst factor whole plots are blocks for subplots For larger units7 subdivision to smaller units ignored For smaller units7 larger units considered blocks 0 More power for main subplot effect and interaction 0 Should use design only for practical reasons Factorial design more powerful if feasible First Statistical Model A whole plot factor 1 levels of Ti B split plot factor b levels of 67 71 whole plots per level of A yam M cw 77W 5739 04513739 Emu 17 7n j717 77W 7 whole plot level random error given by replication of whole plot 6W 7 split plot level random error On subplot level7 77W are block effects Topic 10 Page 42 EMS o Fixed A and B n replicates7 given as whole plots7 of level A Whole plots are replicates of A CRD in whole plot Source of Degrees of Expected Variation Freedom Mean Square 171 nb Ab012302 RA an 7 1 190123 02 B b 7 1 an B 02 AB a71b71 71 AB02 Error 11 7 1n 7 1 02 Note assumptions of additivity here Soybean Yields Interested in the effect of soybean varieties and fertilizers on the yield bushels per subplot unit Fertilizers were randomly applied to acres within each farm7 varieties then randomly applied to subunits of each acres Consider fertilizers and varieties as xed Farm7 as a block7 is considered random Whole plot testing similar if block random or xed In subplot7 if block xed7 all interactions with block are pooled into error If it is random7 this may or may not be done If it is not done7 there are other tests that may be of interest page 495 Farm 1 2 3 Fertilizer Fertilizer Fertilizer Variety 1 2 Variety 2 1 Variety 2 1 106 109 2 119 115 3 95 98 2 114 117 3 126 121 1 81 82 3 118 124 1 116 108 2 87 93 H SAS Program option nocenter ps50 1572 data new infile quothSystemDesktopsoydatquot input farm fert var resp Second analysis proc glm class farm fert var model respfarm fert farmfert var farmvar fertvar test hfert efarmfert Topic 10 Page 43 test hvar efarmvar output outsubplot rres ppred proc gplot plot respred proc sort datanew by farm fert proc means NOPRINT var resp by farm fert output outnew1 meanresp1 proc glm class farm fert model resp1farm fert output outwholeplot rres ppred proc gplot plot respred First analysis proc glm datanew class farm fert var model respfarmfert var fertvar test hfert efarmfert run Dependent Variable resp Sum of Source DF Squares Mean Square F Value Model 13 3519166667 270705128 8121 Error 4 013333333 003333333 Corrected Total 17 3532500000 Source Pr gt F Model 00003 RSquare Coeff Var Root MSE resp Mean 0996226 1703647 0182574 1071667 Source DF Type I SS Mean Square F Value farm 2 2886333333 1443166667 43295 fert 1 084500000 084500000 2535 farmfert 2 004333333 002166667 065 var 2 534333333 267166667 8015 farmvar 4 009333333 002333333 070 fertvar 2 000333333 000166667 005 Topic 10 Page 44 Tests of Hypotheses Using the Type III MS for farmfert as an Error Term Source DF Type III SS Mean Square fert 1 084500000 084500000 Source Pr gt F fert 00247 Tests of Hypotheses Using the Type III MS for farmvar as an Error Term Source DF Type III SS Mean Square var 2 534333333 267166667 Source Pr gt F var 00003 Dependent Variable resp Sum of Source DF Squares Mean Square Model 9 3509833333 389981481 Error 8 022666667 002833333 Corrected Total 17 3532500000 Source Pr gt F Model lt0001 Source DF Ty e I SS Mean Square F Value farm 2 28 86333333 1443166667 50935 fert 1 0 84500000 084500000 2982 farmfert 2 0 04333333 002166667 076 var 2 534333333 267166667 9429 fertvar 2 000333333 000166667 006 Tests of Hypotheses Using the Type III MS for farmfert as an Error Term Source DF Type III SS Mean Square fert 1 084500000 084500000 Source Pr gt F fert 00247 Using proc mixed proc mixed class fert var farm model resp fertlvar random farm farmfert farmvar Cov Parm Estimate Topic 10 Page 45 F Value 3900 F Value 11450 F Value 13764 F Value 3900 farm 2 4007 fertfarm 0 varfarm 0 Residual 002700 Type 3 Tests of Fixed Effects Num Den Effect DF DF F Value Pr gt F fert 1 2 3130 00305 var 2 4 9895 00004 fertvar 2 4 006 09410 Whole PlotSubplot Experiment 0 Can have gt one factor in whole plotsubplot 0 Whole Plot CRD RCBD Factorial k factors EH 0 Subplot 7 RCBD 7 BIB Factorial in Blocking Design 0 Analysis of Covariance Covariate linear with response in subplot and whole plot EMS Caution Fixed Effects in Whole Plot Whole plot factors A and B Subplot factor 0 0 Must include within plot WP factor in EMS table 71 1 o Else everything appears tested over subplot error Topic 10 Page 46 Source of Degrees of Expected Variation Freedom Mean Square A 171 bc ACU VPUZ B 1971 ac BCU VPUZ AB 1 71b 71 C AB BaaP 02 Rep1AB 0 BaaP 02 C c 7 1 ab c 02 A0 a 7 1c 7 1 b Ac 02 BC b 71c 71 14530 02 ABC a71b71c71 UiBCUz Rep2ABC 0 02 Pooling in Split Plot 0 Have two layers so we cant simply pool all errors o If we did7 result in 7 Overstating signi cance of whole plot factor 7 If U ZVP gt ng7 understate subplot factor 0 Should pool errors separately 0 Consider 2 mixed factors in whole plot7 1 xed factor in subplot Source of Degrees of Expected Variation Ereedorn Mean Square A 171 bcn AnCUiBCU VPUZ B b 71 10710123 CU ZVP 02 AB 1 71b 71 071033 CU ZVP 02 RepAB abn 7 1 CU ZVP 02 C c 7 1 abng c 17101230 02 A0 a 71c 71 bn Ac 710330 02 BC b71c71 an BC02 ABC a71b71c71 naiBCJrUZ U2 Error abc 7 1n 7 1 Extensions of Split Plot Design 0 Can further split subplot units into sub subplots 0 Known as Split split Plot Design 7 CRD with 2 RCBD7s 7 Three RCBD7s Topic 10 Page 47 Source of Degrees of Expected Variation Freedom Mean Square D d 7 1 abCU 02 A 171 bcd AbcaiD02 AD 1 71d 71 bcaiD 02 B b 71 acd B 10012313 02 BD b71d71 aCUgD02 AB a71b71 Cd ABCUiBDUZ ABD a71b71d71 CUiBDUZ C c 7 1 abd c abagD 02 CD c71d71 aba D02 A0 a 7 1c 7 1 bd Ac b03013 02 ACD a71c71d71 bUiCDUZ BO b 71c 71 adthc 1023ch 02 BOD b71c71d71 Iago34702 ABC a71b71c71 d AgcUiBCDUZ ABCD a71b71c71d71 UiBCDU Example of Strip PlotSplit Plot Investigating the long term effects of pasture composition for different patterns of grazing Response is the percent of area covered by principal grass Consider three factors 0 Length of time grazing 37 97 18 days 0 SPring grazing cycles 2 with long gap or 4 with short gap 0 Summer grazing cycles 2 with long gap or 4 with short gap Experiment set up in a 3 gtlt 3 Latin Square design Each of the nine whole plots split twice in a criss cross design for the two grazing cycle factors S SP SP 2 4 2 4 2 4 4 125 262 4 592 499 4 550 273 SP 18 S 9 S 3 2 334 442 2 476 158 2 359 183 S S S 4 2 2 4 2 4 2 562 523 2 677 622 2 280 294 SP 9 SP 3 SP 18 4 275 251 4 241 275 4 195 299 S S SP 2 4 2 4 2 4 4 572 695 4 303 266 4 619 262 SP 3 SP 18 S 9 2 169 195 2 110 176 2 465 154 Topic 10 Page 48 What are the whole plot effects Subplot effects Strip PlotCriss Cross Design 0 Criss cross or Strip Plot Design 0 Two factor treatment structure 0 Both treatments require large number of EUs 0 Arrange EU7s in rectangles a gtlt b 0 Each rectangle 7 whole plot rows and whole plot columns 0 Three levels of information 7 Rows 7 Columns 7 Rows gtlt Column cell Source of Degrees of Expected Variation Freedom Mean Square D Blocks d 7 1 ab0 02 A 171 bd AbUiD02 AD WP error a 7 1d 7 1 bail 02 B b71 ab BaagD02 BD WP error b 7 1d 7 1 1012313 02 AB a71b71 dUiBUiBDUZ ABD Subplot error a 71b 71d 71 033D 02 In the pasture example7 interested in effect of length of grazing time period7 number of spring grazing cycles sp7 and the number of summer grazing cycles sum 0 Period 7 whole plot cells are replicates cells nested within Period 0 Two grazing cycle effects 7 subplots crossed with cells cells acting as blocks 0 Need to take out row and column block effect which compose cell effect Breaking Down the Error 0 Looks like replicated Latin Square with period as whole plot factor 0 Grazing cycles the two subplot factors crossed within cells treat as separate split plots Topic 10 Page 49 yrowcolperspsumpergtltsppergtltsumspgtltsumpergtltspgtltsumerror Sour opti data inpu card 1 1 COCOwwwwwwwwwwwwwwwHHHHHHHHHHH NHHHHCUWWWNNNNHHHI wwwwwwwwppp ces of error Replication of period after row and column taken out periodrow column Replication of period gtlt spring after row and column taken out spperiodrow column Replication of period gtlt summer after row and column taken out sumperiodrow column Replication ofperz39odx summer gtlt spring after row and column taken out sumsprperiodrow column not included in model statement ons nocenter ls75 new t row column period sp sum resp 5 18 4 2 125 18 4 4 262 18 2 2 334 18 2 4 442 9 2 4 592 9 4 4 499 9 2 2 476 9 4 2 158 3 2 4 550 3 4 4 273 3 2 2 359 3 4 2 183 9 2 4 562 9 2 2 523 9 4 4 275 9 4 2 251 3 2 2 677 3 2 4 622 3 4 2 241 3 4 4 275 18 2 2 280 18 2 4 294 18 4 2 195 18 4 4 299 3 2 2 572 3 2 4 695 3 4 2 169 3 4 4 195 18 2 2 303 Topic 10 Page 50 3 2 18 2 4 266 3 2 18 4 2 110 3 2 18 4 4 176 3 3 9 2 4 61 9 3 3 9 4 4 26 2 3 3 9 2 2 46 5 3 3 9 4 2 15 4 proc glm class row column period sp sum model resprow column period periodrow column sp periodsp spperiodrow column sum periodsum sumperiodrow column spsum periodspsum test hperiod eperiodrow column test hsp espperiodrow column test hsum esumperiodrow column test hspperiod espperiodrow column test hsumperiod esumperiodrow column means sum spIperiod run Source Model Error Corrected Total Source row column period periodrowcolumn SP periodsp periosprowcolumn sum periodsum periosumrowcolum spsum periodspsum MHQMHQMHMMMM Sum of Squares Mean Square 10336 90306 35644493 176 73333 2945556 1051363639 Type III SS Mean Square 107 620556 53810278 121 202222 60601111 1677 430556 838 715278 214 70556 107 385278 5697 733611 5697 733611 822 157222 411 078611 477966667 79661111 696080278 696080278 80 977222 40488611 367 580000 61263333 21 313611 21313611 52070556 26035278 Tests of Hypotheses for periodrowcolumn as an Error Term Source period DF 2 Type 1677430556 Tests of Hypotheses for periosprowcolumn as an Error Term Using the Type III MS III SS Mean Square 838715278 Using the Type III MS Topic 10 Page 51 F Value 1210 F Value 1 F Value 781 Pr gt F 00025 Pr gt F 01135 Source DF Type III SS Mean Square F Value Pr gt F sp 1 5697733611 5697733611 7 00001 2 822157222 411078611 516 00497 H 01 M periodsp Tests of Hypotheses Using the Type III MS for periosumrowcolum as an Error Term Source DF Type III SS Mean Square F Value Pr gt F sum 1 6960802778 6960802778 1136 00150 periodsum 2 809772222 404886111 066 05503 proc means for significant effects Level of resp sum N Mean d Dev 2 18 309722222 168618890 4 18 397666667 171224998 Level of resp sp N Mean Std Dev 2 18 479500000 143149141 4 18 22 7888889 88527755 Level of resp period N Mean Std Dev 3 12 400916667 205891171 9 12 40 3000000 17 1050763 18 12 257166667 93164403 Level of Level of resp period sp N Mean Std Dev 3 2 6 579166667 121818581 3 4 6 222666667 46534575 9 2 6 539500000 6 2349820 9 4 6 266500000 12 5552778 18 2 6 319833333 6 4126178 18 4 6 194500000 74551325 Computing Standard Errors Simple Random Effects i yijM7 i ij j 7 7m 7 Ti N0U and Q N0702 Ti and 6M independent Vary7 Varm Var7 i Var v 0 TEa 02077 7103 02an Topic 10 Page 52 Since EMSA 7103 02 we use this mean square and the associated degrees of freedom when constructing a con dence interval or performing a hypothesis test Two Factor Random Effects Model a b 1 1 27 2 12 7 7 7 i yam M Ti 5739 T ij ELM j k Tl39 N0U and 67 N07U 76 N0703 and 61 N0702 lm 5le 75 and ELM independent Var Varm f 7 376617 6 0 717 TEa Ufab Jigab Uzabn 197103 ma 7103 02 abn In this case7 there is no expected mean square equal to the numerator As a result7 the combination MSA M53 7 MSAB is used to estimate the variance and Satterthwaite7s degrees of freedom formula is used to approximate the degrees of freedom TwoFactor Mixed Effects Model 2 yam M l Ti j Twig 67 j1727 75 k 12 Zn 0 and N0U 76 N07 a 71U a and 276 0 for 6 level j Eij N N070392 Var7ji Varm n B 76 E72 0 Ufab a 71U ab Uzbn The unrestricted model would not have this f1 coef cient in front of the 0 In either case7 the estimate of the variance can only be written in the form leSl p2MSg pkMSk7 where some of the pl are different from i1 The formula on page 512 can be generalized to approximate this situation It is simply df EmMs szzMSiZdfi Topic 10 Page 53 Vari VarU i Til 75 Ei 51quot QUE b 202bn In both the restricted and unrestricted models7 the variance of the difference between two treatment means is the same Here we would use MSAB and its degrees of freedom when performing hypothesis tests Split Plot Design Will use unrestricted mixed model and look at both pooled and unpooled subplot error Will also focus on RCBD in whole plot with no replication There are several comparisons that may be of interest 1 Main effect in whole plot 2 Main effect in subplot 3 Interaction with 239 xed 4 Interaction with k xed Pooled z3917277a yij MBjAiABijOkAOLk l ELM j17277b k12 7c ZAZ 0 and B N N0U23 ABM N07UiB and ELM N0702 Zak 0 and ZZAOUc 0 u B A A Bi C A Oi a 71k u B 21 A Bi 0 A70c 6k u B A A Bi 0 AC c Em 1 Use MSAB in calculations Vari VENUE Ai A7312 311 Ei Qt 2UiBb UzbC 2 Use MSE in calculations VarQJk ilk V3F0k 014 6k 6k 202ab Topic 10 Page 54 3 Use MSE in calculations Varltll7m gm V3F0k Ok AOik A0174 Em Em 202b 4 Use linear combination 0 7 1MSE MSAB Varltll7m ak varAi Ai A731 A731 AOik AOi k Em Ei k 20335 025 Unpooled yam M B Ai ABM Ck AOM BUM ujk 1 Same Use MSAB in calculations 2 Use MSBC in calculations HQit ilk VaFOk OH 370k 370M 3k 3k 2lta obiiaZaw 3 Use linear combination a 7 1MSE MSBC Varltll7m gm V3F0k Ok AOM AOW 370k 37014 Em 6m 2waw m 4 Same as before Repeated Measures Analysis 0 Often take measurements on EU over time 1 Single summary of time points 7 Peak response or total concentration in body 7 Response mean or orthogonal polynomials shape summary 7 Typically RCBD or CRD on summary statistic 2 Interested in time as a factor 7 Interaction of treatments with time 7 Shape of response curve over time 0 Common to take Split Plot approach Topic 10 Page 55 7 Subject is whole plot 7 Time units are subplot 0 Problems Assumptions With large changes in response over time7 may have problems with constant variance assumption non randomness of time Not randomly applying time to subplot EU Observa tions at adjacent times more correlated than times further away 0 Other approaches when time a factor Multivariate analysis takes correlation into account proc mixed to model correlation structure Example 0 Consider pretestposttest problem 0 Subject assigned to treatment group 0 Measurements taken pre and 2 post treatment 0 Use pre test score to standardize post Subject Treatment Pretest Post1 Post2 Average Post Diff 1 1 100 125 135 1300 300 2 110 125 125 1250 150 3 2 90 105 104 1045 145 4 1 110 130 139 1345 245 5 1 105 130 141 1355 305 6 2 125 135 136 1355 105 0 Perform t test of diffs remove time as factor 2333 7 1333 617 8583 g p 00033 0 Treat as split plot design 7 Use only post test scores adjusted for pre test Source df SS MS F p Trt 1 67500 67500 3932 00033 SubjTrt 4 6867 1717 Time 1 7500 7500 15000 00003 Time gtlt Trt 1 7500 7500 15000 00003 Error 4 200 050 Topic 10 Page 56 SplitPlot Approach 0 Split plot compares trts by averaging over time o If other summary of obs desired7 use CRDRCBD 0 Provides info on time and time gtlttrt interaction 0 Are these p values correct 0 Not properly randomized time only moves forward 0 Recall single factor CRD split plot model Varyijk 0123 02 COMAM yam Tia0122 02 Any two observations in same whole plot have same correlation Known as assumption of compound symmetry Split plot approach appropriate when repeated measures have compound symmetry Huyhn Feldt Conditions JASA7 1970 o Split plot analysis valid under these conditions 0 Less restrictive than compound symmetry 0 Also known as sphericity condition 0 Instead of constant correlation V3rltyijk yij k C 0 ln SAS7 tests for sphericity assumptions 0 Adjusts F for deviations from these conditions H F and G G adjust F values multiply F by number 0 1 Topic 10 Page 57 Example Studying different methods two methods and control to increase speed of throwing a base ball Assume seven subjects were assigned to each group and followed a speci c training method for one month Each subject7s throwing velocity kmhr was observed at the end of two and four weeks adjusted for initial throwing velocity Repeated measures problem Subjects nested within method While the EU for method is the subject7 were interested in relationship over time so we want to include time in the model ymw M Mi SN Tk MTM STij lijk SAS Program using glm options nocenter ls75 25 24 25 25 IONIC OEOBrb data new input meth subj time1 time2 cards 1 1 254 30 6 1 2 274 29 3 1 3 255 30 0 1 4 258 29 7 1 5 262 31 3 1 6 246 26 6 1 7 256 280 2 1 276 271 2 2 247 29 0 2 3 263 273 2 4 250 29 7 2 5 257 29 5 2 6 285 29 7 2 7 229 272 3 1 228 25 1 3 2 242 240 3 3 253 25 2 3 4 4 7 3 5 5 2 3 6 6 9 3 7 6 8 I0 5 data new1 set new resptime1 time1 output resptime2 time2 output Topic 10 Page 58 proc glm datanew1 class meth subj time model respmeth subj meth test hmeth esubj meth means methItime time methtime Sum of Source DF Squares Mean Square F Value Pr gt F Model 23 1614569048 70198654 31 00003 Error 18 23 8014286 13223016 Corrected Total 41 1852583333 Source DF Type III SS Mean Square F Value Pr gt F meth 2 52 43190476 26 21595238 1983 lt 0001 subj meth 18 38 26142857 2 12563492 161 0 1614 time 1 53 26880952 53 26880952 4028 lt 0001 methtime 2 1749476190 874738095 662 0 0070 Tests of Hypotheses Using the Type III MS for subj meth as an Error Term Source DF Type III SS Mean Square F Value Pr gt F meth 2 5243190476 2621595238 1233 00004 Level of resp meth N Mean Std Dev 1 14 275714286 222552624 2 14 27 1571429 2 06647760 3 14 250214286 099705611 Level of resp time N Mean Std Dev 1 21 254571429 135593932 2 21 277095238 218194976 Level of Level of resp meth time N Mean Std Dev 1 1 7 257857143 086106247 1 7 29 3571429 159672283 2 1 7 25 8142857 187299099 2 2 7 28 5000000 123962360 3 1 7 24 7714286 102747958 3 2 7 25 2714286 0 97590007 Using repeated in proc glm o repeated command does several analyses Multivariate Analysis 7 Split Plot with HF and GG df corrections Orthogonal polynomials single df summaries Topic 10 Page 59 proc glm datanew class meth subj model timel time2 meth repeated time 2 1 2 polynomial summary run The GLM Procedure Dependent Variable time1 Source Model Error Corrected Total Source meth Dependent Variable time2 Source Model Error Corrected Total Source meth Repeated Measures Analysis of Sum of DF Squares Mean Square 2 494000000 247000000 18 3183142857 176841270 20 3677142857 DF Type I SS Mean Square 2 494000000 247000000 Sum of DF Squares Mean Square 2 6498666667 3249333333 18 3023142857 167952381 20 9521809524 DF Type I SS Mean Square 2 6498666667 3249333333 Variance Repeated Measures Level Information Dependent Variable Level of time Manova for H Statistic Wilks Lambda Pillai s Trace HotellingLawley Trace Roy s Greatest Root time1 time2 E Error SSCP Matrix S1 M 05 N8 Value F Value Num DF 030882775 4028 1 0 69117225 4028 1 2 23805094 4028 1 223805094 4028 1 F Value F V 140 alue 140 F Value 1935 F Value 1935 Test Criteria and Exact F Statistics the Hypothesis of no time Effect Type III SSCP Matrix for time Den Manova Test Criteria and Exact F Statistics for the Hypothesis of no timemeth Effect H Type III SSCP Matrix for timemeth E Error SSCP Matrix S1 M0 N8 Topic 10 Page 60 Pr gt F 02730 Pr gt F 02730 Pr gt F 0001 Fr gt F 0001 Fr gt F 0001 0001 0001 0001 Statistic Value F Value Num DF Wilks Lambda 057635894 662 2 Pillai s Trace 042364106 662 2 HotellingLawley Trace 073502991 662 2 Roy s Greatest Root 073502991 662 2 Repeated Measures Analysis of Variance Tests of Hypotheses for Between Subjects Effects Source DF Type III SS Mean Square meth 2 5243190476 2621595238 Error 18 38 26142857 2 12563492 Repeated Measures Analysis of Variance Univariate Tests of Hypotheses for Within Subject Effects Source DF Type III SS Mean Square time 1 53 26880952 5326880952 timemeth 2 17 49476190 874738095 Errortime 18 2380142857 132230159 Example with 3 time pts Den DF HHH 000000 F Value 12 33 F Value 4028 662 Pr gt F 00004 Pr gt F 0001 00070 0 Consider another test given after additional 2 weeks No training options nocenter ls75 data new input meth subj timel time2 time3 cards 1 1 254 306 291 1 2 274 293 280 1 3 255 300 270 1 4 258 297 279 1 5 262 313 292 1 6 246 266 26 6 1 7 256 280 28 3 2 1 276 271 27 8 2 2 247 290 26 2 2 3 263 273 28 4 2 4 250 297 29 9 2 5 257 295 29 4 2 6 285 297 30 4 2 7 229 272 26 4 3 1 228 251 27 2 3 2 242 240 26 2 3 3 253 252 28 1 3 4 254 247 31 0 3 5 245 262 294 Topic 10 Page 61 3 6 256 269 292 3 7 256 248 289 data newl set new resptime1 time1 output resptime2 time2 output resptime3 time3 output proc glm datanew1 class meth subj time model resp meth subjmeth time methtime test hmeth e subjmeth means methtime proc glm datanew class meth model time1 time2 time3meth nouni repeated time 0 1 2 polynomial summary proc sort by meth proc means var time1time3 by meth run meth1 The MEANS Procedure Variable N Mean Std Dev Minimum Maximum time1 21 25 7857143 08168756 24 6000000 27 4000000 time2 21 29 3571429 15147843 26 6000000 31 3000000 time3 21 28 0142857 09253571 26 6000000 29 2000000 meth2 Variable N Mean Std Dev Minimum Maximum time1 21 25 8142857 17768753 22 9000000 28 5000000 time2 21 28 5000000 11760102 27 1000000 29 7000000 time3 21 28 3571429 15702138 26 2000000 30 4000000 meth3 Variable N Mean Std Dev Minimum Maximum Topic 10 Page 62 t ime1 21 24 7714286 09747527 22 8000000 25 6000000 time2 21 252714286 09258201 240000000 269000000 time3 21 28 5714286 14906854 26 2000000 31 0000000 Manova Test Criteria and Exact F Statistics for the Hypothesis of no time Effect H Type III SSCP Matrix for time E Error SSCP Matrix S1 M0 N7 5 Statistic Value F Value Num DF Den DF Pr gt F Wilks Lambda 015118762 4772 2 17 lt0001 Pillai s Trace 084881238 4772 2 17 lt0001 HotellingLawley Trace 561429826 4772 2 17 lt0001 Roy s Greatest Root 561429826 4772 2 17 lt0001 Manova Test Criteria and F Approximations for the Hypothesis of no timemeth Effect H Type III SSCP Matrix for timemeth E Error SSCP Matrix S2 M 05 N75 Statistic Value F Value Num DF Den DF Pr gt F Wilks Lambda 027994760 756 4 34 00002 Pillai s Trace 0 72095225 507 4 36 00024 HotellingLawley Trace 2 56888265 1074 4 19407 lt0001 Roy s Greatest Root 256763078 2311 2 18 lt0001 NOTE F Statistic for Roy s Greatest Root is an upper bound NOTE F Statistic for Wilks Lambda is exact Repeated Measures Analysis of Variance Tests of Hypotheses for Between Subjects Effects Source DF Type III SS Mean Square F Value Pr gt F meth 2 2903746032 1451873016 420 00319 Error 18 6226666667 345925926 Source DF Type III SS Mean Square F Value Pr gt F time 2 9521555556 4760777778 4663 lt0001 timemeth 4 4199492063 1049873016 1028 lt0001 Errortime 36 3675619048 102100529 Adj Pr gt F Source G G H F time lt0001 lt0001 Topic 10 Page 63 timemeth lt0001 lt0001 Errortime GreenhouseGeisser Epsilon 09194 HuynhFeldt Epsilon 11328 Contrast Variable time1 Source DF Type III SS Mean Square Mean 1 8571428571 8571428571 meth 2 484000000 242000000 Error 18 1528571429 084920635 Contrast Variable time2 Source DF Type III SS Mean Square Mean 1 9 50126984 950126984 meth 2 37 15492063 1857746032 Error 18 2147047619 119280423 Split Plot Analysis data newl set new resptime1 time1 output resptime2 time2 output resptime3 time3 output proc glm datanew1 class meth subj time model resp meth subjmeth test hmeth e subjmeth means methtime Dependent Variable resp Source DF Model 26 Error 36 Corrected Total 62 Source DF meth 2 subjmeth 18 time 2 methtime 4 Tests of Hypotheses Using the Source DF meth 2 time methtime Sum of Squares Mean Square 2285146032 87890232 367561905 10210053 2652707937 Type III SS 2903746032 6226666667 9521555556 4199492063 Mean Square 1451873016 345925926 4760777778 1049873016 Type III MS for subjmeth Type III SS 2903746032 Mean Square 1451873016 Topic 10 Page 64 F F F F as F Pr gt F lt0001 00841 Value 10093 285 Pr gt F 00113 00001 Value 1 D l 1557 Pr gt F lt0001 Value 861 Pr gt F lt Value 1422 339 0 4663 lt 1028 lt an Error Term Value Pr gt F 420 00319 Analysis Using proc mixed 0 Consider covariance of observations within subject 0 mixed allows for different covariance structures 0 Recall Latin Square as repeated measures problem 0 Use simple 02 as default independence Assume three time points per subject q 7 DC 02 oo oqmo q N 7 Use one of various provided 7 Create your own Covariance Structures Consider three time points per subject 0 Compound Symmetry 02 a a a a 02 a a a a 02 a o Unstructured 2 011 021 031 2 021 022 032 2 2 031 032 033 0 First order autoregressive Topic 10 Page 65 Example options nocenter ls75 data new input meth subj time1 time2 time3 resptime1 time1 person7meth 1subjoutput resptime2 time2 person7meth 1subjoutput resptime3 time3 person7meth 1subjoutput 25 25 269 29 248 28 cards 1 1 254 306 291 1 2 274 293 280 1 3 255 300 270 1 4 258 297 279 1 5 262 313 292 1 6 246 266 266 1 7 256 280 283 2 1 276 271 278 2 2 247 290 262 2 3 263 273 284 2 4 250 297 299 2 5 257 295 294 2 6 285 297 304 2 7 229 272 264 3 1 228 251 272 3 2 242 240 262 3 3 253 252 281 3 4 254 247 310 3 5 245 262 294 3 6 6 2 3 7 6 9 proc mixed class meth subj time model resp meth time methtime solution random subjmeth lsmeans methtime diff Other Correlation Structures proc mixed class meth subj time model resp meth time methtime random subjmeth repeated subjectperson typeun r Topic 10 Page 66 lsmeans methtime diff proc mixed class meth subj time model resp meth time methtime random subj meth repeated subjectperson typecs r lsmeans methtime diff proc mixed class meth subj time model resp meth time methtime random subj meth repeated subjectperson typear1 r lsmeans methtime diff Covariance Parameter Estimates Cov Farm Est imate subj meth 08128 Residual 10210 Type 3 Tests of Fixed Effects Num Den Effect DF DF F Value Pr gt F meth 2 18 420 0 0319 time 2 36 4663 lt0001 methtime 4 36 1028 lt0001 Covariance Parameter Estimates Cov Farm Subject Estimate subj meth 08128 CS person 0 Residual 10210 Type 3 Tests of Fixed Effects Num Den Effect DF DF F Value Pr gt F meth 2 18 00319 time 2 36 4663 lt0001 methtime 4 36 1028 lt0001 Estimated R Matrix for Subject 1 Row C011 C012 C013 1 07935 05733 008675 2 0 5733 07046 3 008675 10784 Type 3 Tests of Fixed Effects Topic 10 Page 67 Den Effect DF DF F Value Pr gt F meth 2 18 00319 time 2 36 5053 lt0001 methtime 4 36 1156 lt0001 Estimated R Matrix for Subject 1 Row C011 Col2 C013 1 08912 02308 0 05976 2 02308 08912 02308 3 005976 02308 08912 Covariance Parameter Estimates Cov Parm Subject Estimate subj meth 0 9341 AR1 person 02590 Residual 08912 Type 3 Tests of Fixed Effects Num Den Effect DF DF F Value Pr gt F meth 2 18 424 00310 time 2 36 5544 lt0001 methtime 4 36 908 lt0001 Topic 10 Page 68 Statistics 514 Design of Experiments Topic 4 Topic Overview This topic will cover 0 FundamentalsModel of Experimental Design 0 Introduction to Randomization o Permutation Test 0 Blocking Experimental Design Treatments7 units7 and assignment methods specify an experimental design 0 Underlying this class is the belief that experiments7 are different Different from what Different how 0 XD uses careful problem solving that require technical assumptions having to do with the nature of the data product 0 Since statistics is usually about analysis7 understanding of design relies heavily on having good data analysis techniques The nature of the data analysis technique will dictate the questions you can ask 0 Very often7 assumed models seek only to show effects7 not measure them As such7 there are many different models that could suf ce Thus7 the experiment doesn7t help in distinguishing between them Desirable Criteria for Experimental Design 0 The design points should exert equal in uence on the determination of the regression coef cients and effect estimates 0 The design should be able to detect the need for nonlinear terms 0 The design should be robust to model misspecification7 since all models are wrong 0 Designs in the early stage of the use of a sequential set of designs should be constructed with an eye toward providing appropriate information for the follow up experiments Topic 4 Page 1 Assumed Mechanism controllable factors 1 2 1 xed inputs 6 Pricglsiirggjem a responses 21 22 2p uncontrollable factors nuisance factorsinherent noise Why Statistical Experimental Design Because X1 X2 does not imply Y1 Y2 May be 1 Y fX 6 random 6 with mean 07 OR7 2 Y fX7 Z7 Z records other variables Puzzler which model is more generalmore useful Strategies of Experimentation o Best guess experiments 7 Used a lot i More successful than you might suspect7 but there are disadvantages o One factor at a time experiments 7 Sometimes associated with the scienti c or engineering method Devastated by interaction7 also very inef cient o Statistically design experiments 7 Based on Fisher7s factorial concept test all possible combinations A good design must 0 avoid systematic error7 o be precise7 0 allow estimation of error7 0 have broad validity Statistical expertise can help by xing up some common mistakes7 chie y confounding more later Topic 4 Page 2 Failed Experiment Did not answer question7 Not Proved answer we didn7t want77 To call in the statistician after the experiment is done may be no more than asking him to perform a postmortem examination he may be able to say what the experiment died of7 R A Fisher Caveat Even if you see a statistician your experiment might still die Common things that go wrong 0 not a large enough sample 0 drop outs o ethical challenges 0 politicalsociallegal resistance 0 not enough money Ultimately randomized experiments are intrusive thus setting up an arti cial situation that has high internal validity but perhaps reduced external validity What can go right o It is not unusual for a well designed experiment to analyze itself77 0 You can see a lot by just looking7 7 Yogi Berra Terminology Measurement Unit 7 actual object on which the response is measured Ex ample leaf of a plant Experimental Unit 7 batch of things material animal person machine to which a treatment is applied Example plot of land Usually it is better to have more experimental units and fewer measurement units Criterion experimental units should be independent Topic 4 Page 3 Replication 7 Each treatment is applied to experimental units that are repre sentative of the population of units to which the conclusions of the experiment will apply Repetition 7 Like replication7 except that measurement is done on the same experimental unit Blinding 7 Evaluators of a response do not know which treatment was given to which unit Doubleblinding 7 Both evaluators of the response and the experimental units do not know the assignment of treatment to units Control 7 Treatment is a standard77 treatment that is used as a baseline or base of comparison for other treatments Placebo 7 A null treatment used when the act of applying a treatment 7 any treatment 7 has an effect Three Sources of Variability 1 Variability due to conditions of interest wanted 2 Variability in measurement process unwanted 3 Variability in eccperimental material unwanted Good design lets you estimate amount of variability due to each source Three Kinds of Variability 1 Planned systematic variability 7 the kind we want 2 Chancelike variability 7 the kind we can live with 3 Unplanned systematic variability 7 the kind that THREATENS DISASTER Confounding and Selection Bias Two in uences on a response are confounded if the design makes it impossible to isolate the effects of one from the effects of another Selection bias occurs in observational studies when the process of selecting groups to be compared confounds the effects of interest with other effects How long does it take for a car s brakes to stop it from say 50 miles per hour Topic 4 Page 4 Blatant confounding Compare Mercedes and minivans Do 10 Mercedes trials on wet pavement Do 10 minivan trials on dry pavement May see differences but cant tell why Subtle confounding Compare wet and dry pavement for minivans While one driver does 10 trials on wet pavement another does 10 trials on dry pavement More subtle confounding Compare wet and dry pavement for minivans on driver First do 10 trials on dry pavement then do 10 trials on wet pavement Could be confounded with run order Basic Principles of Experimental Design 0 Intervention if factors are not assigned can7t validly predict effect or even show that there is an effect after intervention Common Example Cannot randomly assign people to smoke or not Thus there is little strictly valid evidence that smoking is harmful o Randomization running trials in an experiment in random order 7 to avoid confounding with hidden factor confound treatment assignment or run order with random variable that is generated to be independent of response protection 7 averages out unknown lurking factors independence of trials avoids bias randomization test E Anova F test o Replication decrease uncertainty by averaging out experimental variability improves precision of effect estimation estimation of error or background noise 0 Blocking decrease uncertainty by adjusting for controlling speci c nuisance factors 7 accounts for variability but does not stem from identi able agent since not ran domly assigned Topic 4 Page 5 o BalanceCompleteness guarantees that there is no ambiguity as to where the effect is coming from 0 Random factors 7 even if we dont see every level of a factor7 can infer that factor has some effect In this case7 get inference but no real predictive power Example of Randomization 2 groups of tomatoes Assign varieties AB of tomatoes to plot7 measure yield IAIAIAIAIAIBIBIBIBIBI Maybe the land isn7t uniform7try IAIBIAIBIAIBIAIBIAIBI orarandom allocation IAIBIBIBIAIAIBIAIAIBI if you7re worried about periodic effects A strong effect is unlikely to match a random allocation although there are no guaran tees Randomization Principle Whenever possible7 any assigning or sampling should be done using a chance device 0 Typically all allocations should be possible 0 Typically all allocations should be equally likely How Do We Randomize Randomizing run order Write out treatments in any order apply random permutation Ranking Method 1 Generate Ul U071z3917 771 no ties 2 Rank Ul is lej 3 U1 3 7Tz39 rankUl Sampling method 1 Draw 7T1 from 17 771 Topic 4 Page 6 2 Draw 7T2 from 17 7n 7 3 Draw 7T3 from 17 7n 739139177T2 4 Draw 7Tn only one choice left Example Raw Trt Ul Rank Run Trt 1 1 01398928 1 1 1 2 1 04903066 6 2 2 3 1 08459779 9 3 3 4 1 08692369 11 4 3 5 2 06389887 8 5 2 6 2 03783782 4 6 1 7 2 04057894 5 7 2 8 2 08906754 12 8 3 9 3 06366516 7 9 2 10 3 03087094 3 10 1 11 3 08491306 10 11 3 12 3 02690837 2 12 1 Should we randomize 1 Protects against unforeseen error patterns More likely to get genuine replicates 2 Allows randomization analysis 0 Can we do the analysis without randomization 0 Of course7 statistical analysis does not check for randomness7 but 0 the resulting conclusions tend to be overly optimistic 3 Might cost too much cheaper alternatives come from sampling theory What Can Go Wrong Without Randomization Patterns in Errors Obs 1 2 3 4 5 6 7 8 9 10 Des1 A A A A A B B B B B Des2 A B B B A A B A A B Y1 Y2 M17M2 Des1 M151M152M155 M256M2510 Ml z Topic 4 Page 7 516263645556575859510 Des2 6176276376465667676869761o Trend lf Ee C gtlt 239 7 55 linear trend Trend adds 7250 under Des1 Trend adds 30 under Des2 Optimal versus linear trend IAIBIBIAIAIBIBIAIAIBI Autocorrelations 1 z j COF5i751 P li jl 1 0 239 7 jl gt 1 V3F51 62 63 64 55 56 i 57 i 58 i 59 5105 02 pa Var61 7 62 7 63 7 64 65 66 57 58 59 5105 722 2 2 7EU p039 p 31 0 changes VarOilv 7 Estimates of 52 don7t capture this A random design mitigates 0 Balance is important Keep the treatment group sizes equal or approximately so There are versions of randomization that dont preserve balance 0 Randomization might occur in spacetime or some other dimension 0 Randomization sometimes needs to be constrained Example two queues to two different evaluators o Haphazard is not randomized Example 4 treatment16 units HAPHAZARD Treatment A is assigned to the rst four units we happen to encounter treatment B to the next four units and so on As each unit is encountered we assign treatment A B C and D based on whether the seconds77 reading on the clock is between 1 and 15 16 and 30 31 and 45 or 46 and 60 Topic 4 Page 8 RANDOM We use 16 identical slips of paper four marked with A7 four with B7 and so on to D We put the slips of paper into a basket and mix them thoroughly For each unit7 we draw a slip of paper from the basket and use the treatment marked on the slip Randomization InferencePermutation Test Data List all m M orderings 711 Logic 1 A7 B identical null hypothesis true i distribution of YA 7 573 independent of obser vation labels null distribution E0 Make histogram of permuted YA 7 Y3 values 00 lf actual value based on data is extreme7 conclude groups differ Whats the pvalue in the example 0 For 711 n2 57 there are lt 150 252 possible orders 0 Can do medianA 7 medianB 0 Replace YAZ by YAZ 7 A7 to test A E B A o For large 7117 equivalent to t test Topic 4 Page 9 Example Paired t testRandomz39zation Paired Test In a study of egg cell maturation the eggs from each of four female frogs were divided into two batches and one batch was exposed to progesterone After two minutes the CAMP content was measured It is believed that cAMP is a substance that can mediate cellular response to horrnones FROG cAMP Content Control Progesterone Diff 1 6 4 2 2 4 5 1 3 5 2 3 4 4 2 2 o t test d 2 713 2 a d 15 and 5 0866 The test statistic is 1732 Using Table ll and 3 degrees of freedom the p value is between 005 and 010 one sided 010 and 020 two sided The actual two sided p value is close to 018 o randomization The result of each pair does not depend on the allocation of treat ments Thus there are 24 16 possible outcomes The observed outcome is 2 7 1 3 2 6 1 Edi of occurrences 8 2 6 2 4 4 2 6 0 2 From the table there are four of sixteen outcomes as unlikely77 or more simply due to chance Thus the p value is 025 Discussion 0 We will be discussing the randomizationpermutation components of future designs 2 2 levels 2 1 factors mixed models nested models etc 0 Understanding where non parametric methods come from is becoming more im portant In the mechanics of inference different methods affect how the reference distribution is generated or how big the con dence interval is 0 Its the independence ofthe randomization distribution from the experimental mech anism that makes the randomization hypothesis valid Topic 4 Page 10 Poser What do we do if we get by chance Obs123456 789 0 Des1AAAAAB BBBB Obs123456 789 0 Des2ABABAB ABAB This American Life It s part of the game http www thislife orgRadiojpisode aspxsched887 or Search on Meet the Pros7 at httpwwwthislifeorg Story times 2045 4700 Example of Problems with Randomization In a trial on newborn infants with respiratory failure7 the new treatment T was highly invasive extracorporeal membrane oxygenation EMCO7 while the control treatment 0 was conventional medical management A randomized trial was set up which saw a binary response success or failure of the treatment Adaptive Urn Scheme 0 At each subsequent trial7 a treatment T or C was chosen as a ball from an urn o The initial trial has two balls marked T and C in the urn 0 Each time a success is observed7 a ball marked by the successful treatment is added to t he ur n First Trial Trial Treatment Outcome Trial Treatment Outcome 1 T survival 7 T survival 2 0 death 8 T survival 3 T survival 9 T survival 4 T survival 10 T survival 5 T survival 11 T survival 6 T survival 12 T survival Topic 4 Page 11 Analysis of the ef cacy of T over 0 was considered to be inconclusive Second Trial Boston 1986 0 Patients were randomized equally to T and C in blocks of size 4 o Stopping Rule Four deaths cumulative on one of either T or 0 Results 0 T 9 units with no failures 0 C 10 units with 4 failures Conclusions Substantial but not overwhelming evidence in favor of EMCO Moral One should be very careful when trying to do better than chance sometimes there is no way to avoid being unlucky Upshot Statistics lets us quantify our chances of being unlucky Blocking A nuisance factor is any possible source of variability other than the conditions you want to compare that is7 anything other than effects of interest that might affect the response 0 Randomizmg turns any bias resulting from a nuisance in uence into chance error However7 this increases the size of the chance error7 making it harder to detect and measure the effects of interest 0 Blocking turns a nuisance factor into a factor of the design Goal within block variation ltlt between block variation The more similar the units in a block7 the more effective blocking will be Topic 4 Page 12 Example Goal Study the effect of Vitamin B6 on premenstrual syndrome Units Human volunteers7 sorted into pairs One got B6 the other got a placebo Grouping Severity of symptoms as evaluated by a questionnaire Another nuisance in uence stress at different times of year For many students7 the beginning of a semester tends to be less stressful than the end7 when there are exams to take and papers to write7 For many people7 major holidays are often stressful77 As a result December and January should be treated as dz ereut blocks of time in the study Maxim Block what you can7 and randomize what you cannot Topic 4 Page 13

### BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.

### You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

## Why people love StudySoup

#### "I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

#### "I signed up to be an Elite Notetaker with 2 of my sorority sisters this semester. We just posted our notes weekly and were each making over $600 per month. I LOVE StudySoup!"

#### "There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

#### "Their 'Elite Notetakers' are making over $1,200/month in sales by creating high quality content that helps their classmates in a time of need."

### Refund Policy

#### STUDYSOUP CANCELLATION POLICY

All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email support@studysoup.com

#### STUDYSOUP REFUND POLICY

StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here: support@studysoup.com

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to support@studysoup.com

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.