Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Analysis of Variance (ANOVA) with Random Effects: Two-Way Layout, Study notes of Environmental Science

An explanation of the completely randomized design (crd) model for a two-way analysis of variance (anova) with random effects. The assumptions, calculations for the anova table, and the interpretation of the results using examples. It also discusses the use of sas for data analysis.

Typology: Study notes

Pre 2010

Uploaded on 08/19/2009

koofers-user-3w6-1
koofers-user-3w6-1 🇺🇸

10 documents

1 / 31

Toggle sidebar

Related documents


Partial preview of the text

Download Analysis of Variance (ANOVA) with Random Effects: Two-Way Layout and more Study notes Environmental Science in PDF only on Docsity! C:\Users\baileraj\BAILERAJ\Classes\Web-CLASSES\ies-612\lectures\Week 9--IES 612-STA 4-573-STA 4-576-22mar09.doc3/22/20091 Week 9--IES 612-STA 4-573-STA 4-576.doc r 2008 ANOV IES 612/STA 4-573/STA 4-576 Winte “ A” MODELS for standard designs ck Design (RCBD) • Completely Randomi Random Complete Blo zed Design (CRD) • • Latin Squares (LS) CRD with a single factor … independent random samples from “t’ poplns/trmts obtained Numeric data: OR random , ni (observations) th CRD MODEL: yij = μ + αi + εij, 0,σε2) μ ine point αi = effect of ith treatment E{MSQ} samples randomly assigned to one of t treatements. Assume yij ~ independent N(μi, σε2), i = 1,2, …, t (poplns or trmts), j = 1, 2, … ni = number of observations from the i population and nT = n1 + n2 + … + nt where εij = random error ~ independent N( = arbitrary reference or basel CRD ANOVA Table Source SS df MSQ Fobs Treatment or Model ) SSTr t-1 MSTr = SSTr/(t-1 2 1 ( )in t α − α − 2 εσ + ∑ STr/MSE M Error SSE n -tT MSE= SSE/(nT-t) ε2 σ Total SSTot nT -1 NOTES/COMMENTS Notational warning: book uses single summation for multiple sums 1 1, int ij ij i j i j y y = = =∑ ∑∑ Why does an F-test work? Use Expected Mean Sq H0: μ1 = μ2= μ3= … = μt t ⇔ 1. 2. uare ⇔ H0: α1 = α2= α3= … = α s! 2 0( )iα − α =∑ Multiple Comparisons: Test all H0: μi = μj, using Tukey’s, Bonferroni, Scheffe. ⇔ E(MSTr) = E(MSE) 3. C:\Users\baileraj\ BAILERAJ \Classes\ Web-CLASSE S\ ies-612\lectures\ Week 9--IES 612-STA 4-573-STA 4-576-2 2mar09.doc3/22/20092 C:\Users\baileraj\BAILERAJ\Classes\Web-CLASSES\ies-612\lectures\Week 9--IES 612-STA 4-573-STA 4-576-22mar09.doc3/22/20095 Using SAS title “One-way ANOVA”; title2 “ANOVA Bacteria in meat data”; data meat; input cond $ lo ; ition gcount @@ cards; plastic 7.66 6 lastic .80 vacuum 5.26 v cuum 5.44 vacuum 80 plastic .98 p 7 a 5. mixed 7.41 mixed 7.33 mixed 7.04 CO2 3.51 CO2 2.91 CO2 3.66 ; proc glm data=meat order=data; class condition; model logcount=condition; run; The LM Procedure G Dependent Variable: logcount Sum of Source DF Squares Mean Square F Value Pr > F Model 1 4.64640000 4.64640000 81.87 0.0008 Error 4 0.22700000 0.05675000 Corr cted Total 5 4.87340000 e R-Square Coeff Var Root MSE logcount Mean 0.95 421 3.733896 0.238223 6.380000 3 Source DF Type I SS Mean Square F Value Pr > F condition 1 4.64640000 4.64640000 81.87 0.0008 Sour e DF Type III SS Mean Square F Value Pr > F c cond 4.64640000 4.64640000 81.87 0.0008 ition 1 C:\Users\baileraj\BAILERAJ\Classes\Web-CLASSES\ies-612\lectures\Week 9--IES 612-STA 4-573-STA 4-576-22mar09.doc3/22/20096 RAN E BLOCK DESIGN (RCBD) DOMIZED COMPLET A single factor (treatment) of interest with “t” levels and a block “factor” with “b” levels AND we hav ns on every treatment in every block. That is, we have an observation in every cell of the table below! Block e observatio 1 2 … b 1 2 … T t reatment Recall tor or BLOCKS are defined as a homogeneous unit formed in advance and treatments are randomly assigned within blocks (if “t” units in each block then RCBD). RCBD MODEL: yij = μ + αi + μ = arbitrary reference or baseline point αi = effect of ith treatment β = jth block effect Assume y 2), i = 1,2, …, t (trmts), j = 1, 2, …, b (blocks) Block that the Block Fac βj + εij, where εij = random error ~ independent N(0,σε2) j ij ~ independent N(μ + αi + βj, σε M ) 1 2 … b ean of Yij = E(yij 1 μ + α1 + β1 μ + α1 + β2 … μ + α1 + βb 2 μ + α2 + β1 μ + α2 + β2 … μ + α2 + βb … … … … … Treatment t μ + αt + β1 μ + αt + β2 … μ + α1 + βb Notice: Difference of means in the same block differ only by the α’s. R CBD ANOVA Table rce SS df MSQ E{MSQ} Fobs C:\Users\baileraj\BAILERAJ\Classes\Web-CLASSES\ies-612\lectures\Week 9--IES 612-STA 4-573-STA 4-576-22mar09.doc3/22/20097 Sou Treatment SSTr t-1 MSTr = SSTr/(t-1) 22 1 ( )in tε α − α σ + − ∑ MSTr/MSE B (b-1) lock SSB b-1 MSB = SSB/ E bt-t) σε2 rror SSE (b-1)(t-1) MSE= SSE/( Total SSTot bt-1 TESTS: H0: α1 = α2= α3= … = αt vs H0: α’s not all equal Test Statistic: Fobs = MSTr/MSE RR: Reject H0 if Fobs > Fα, t-1, (b-1)(t-1) or p-value: Prob(Ft-1, (b-1)(t-1)>Fobs) NOTES/COMMENTS 1. Some argue that blocks should not be tested since no randomization basis for test. bservations b/c form “b” blocks with “t” units each. hopes of E extraneous source of y ctorial treatment structure S control for 2 sources of variability] iii. Treatment effect must be approximately the same from block to block (ie no interaction between Treatment effect and Block effect). 2. RCBD has nT = b*t total o 3. Spend “b-1” of error degrees of freedom on blocks [potential COST] in idual error for testing treatment effects. achieving a smaller res RCBD Advantages 4. i. Useful for comparing “t” means in the presence of ON variabilit ii. Easy analysis iii. Easy design to construct iv. Can accommodate any number of treatments including fa in any number of blocks. 5. RCBD Disadvantages i. Best suited for a relatively small number of treatments REii. Controls only one source of variability [LATIN SQUA > anova(OLE15.2RCBD) Analysis of Variance Table Response: Seedlings Df Sum Sq Mean Sq F value Pr(>F) Insecticide 2 1832.00 916.00 211.385 2.74e-06 *** Plot 3 438.00 146.00 33.692 0.0003767 *** Residuals 6 26.00 4.33 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > anova(lm(Seedlings ~ Insecticide, data=OLE15.2)) Warning in model.matrix.default(mt, mf, contrasts) : variable 'Insecticide' converted to a factor Analysis of Variance Table Response: Seedlings Df Sum Sq Mean Sq F value Pr(>F) Insecticide 2 1832.00 916.00 17.767 0.0007498 *** Residuals 9 464.00 51.56 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > scatterplot(Seedlings~Insecticide, reg.line=FALSE, smooth=FALSE, labels=FALSE, boxplots=FALSE, span=0.5, pch=c(Plot), data=OLE15.2B) C:\Users\baileraj\BAILERAJ\Classes\Web-CLASSES\ies-612\lectures\Week 9--IES 612-STA 4-573-STA 4-576-22mar09.doc3/22/200910 1.0 1.5 2.0 2.5 3.0 80 90 gs ee dl in 70 S 60 50 Insecticide C:\Users\baileraj\BAILERAJ\Classes\Web-CLASSES\ies-612\lectures\Week 9--IES 612-STA 4-573-STA 4-576-22mar09.doc3/22/200911 Using SAS options ls=110 pageno=1 formdlim="+" nodate; title "RCBD - block=plot trt=insecticide"; title2 "Ott/Longnecker p. 868 - example 15.2"; data drcbd; input insecticide plot yseedling @@; datalines; 1 1 56 1 2 48 1 3 66 1 4 62 2 1 83 2 2 78 2 3 94 2 4 93 3 1 80 3 2 72 3 3 83 3 4 85 ; proc plot; plot yseedling*insecticide=plot; proc glm; class plot insecticide; model yseedling = plot insecticide; means insecticide / tukey; proc glm; class insecticide; model yseedling = insecticide; run; RCBD - block=plot trt=insecticide 1 Ott/Longnecker p. 868 - example 15.2 Plot of yseedling*insecticide. Symbol is value of plot. 100 ˆ ‚ ‚ ‚ ‚ 3 ‚ 4 ‚ 90 ˆ ‚ ‚ ‚ 4 ‚ ‚ 1 3 ‚ 80 ˆ 1 ‚ 2 ‚ yseedling ‚ ‚ ‚ ‚ 2 70 ˆ ‚ ‚ ‚3 ‚ ‚ ‚4 60 ˆ ‚ ‚ ‚1 C:\Users\baileraj\BAILERAJ\Classes\Web-CLASSES\ies-612\lectures\Week 9--IES 612-STA 4-573-STA 4-576-22mar09.doc3/22/200912 ‚ ‚ ‚ 50 ˆ ‚2 ‚ ‚ ‚ ‚ ‚ 40 ˆ Šˆƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆ 1 2 3 insecticide ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ RCBD - ock=plot trt= cti 2 bl inse cide Ott/Lon ecker 868 amp 5.2 gn p. - ex le 1 The GLM ed Proc ure C Le nfo ionlass vel I rmat Class Levels Values plot 4 1 2 3 4 insecticide 3 1 2 3 Number of Observations Read 12 Number of Observations Used 12 ++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++ RCBD - block=plot trt=insecticide 3 Ott/Longnecker p. 868 - example 15.2 The GLM Procedure Dependent Variable: yseedling Sum of Source DF Squares Mean Square F Value Pr > F Model 5 2270.000000 454.0000 4.77 <.0001 00 10 Error 26.000000 4.33 6 3333 Corrected Total 11 2296.0 00 000 R-Squa f Root Meare Coef Var MSE yseedling n 0.988676 75 2.081 2.7 555 666 75.00000 Source DF Me ue Type I SS an Square F Val Pr > F plot 3 1 69 438.000000 46.000000 33. 0.0004 insecticide 2 1832.000000 916.000000 211.38 <.0001 Sourc Mean Square F Value Pr > F e DF Type III SS plot 3 438.000000 146.000000 33.69 0.0004 insecti 2 1832.000000 916.000000 211.38 <.0001 cide C:\Users\baileraj\BAILERAJ\Classes\Web-CLASSES\ies-612\lectures\Week 9--IES 612-STA 4-573-STA 4-576-22mar09.doc3/22/200915 Latin Square Design Suppo eatm s “ els. We c two sou f e ous va ock Fact s: A and B, BOTH with “t” le atin Square has “t” rows and “t” columns (“t” treatments are randomly assigned to EU ow and column) e.g B1 B2 B3 B1 B2 B3 B1 B2 B3 se our Tr ent ha t” lev onsider rces o xtrane riation, call then Bl or vels! A “t x t” L s within rows and columns so that every treatment appears in every r . t=3 A1 T1 T2 T3 A1 T2 T3 T1 A1 T3 T1 T2 A2 T3 T T2 A2 1 T1 T2 T3 A2 T2 T3 T1 A3 T2 T3 T1 A3 T3 T1 T2 A3 T1 T2 T3 TIN SQUARE MODEL: = random error ~ independent N(0,σε2) ry reference or baseline point ffect of ith “A” Block βj = effect of jth “B” Block Treatment i + βj + γk, σε2) LA yij = μ + αi + βj + γk + εij, where εij μ = arbitra αi = e γj = effect of kth y = μ + A + B + Tr + ε , ij i j k ij Assume yij ~ independent N(μ + α B Block Mean of Yij = E(yij) 1 2 3 A Bl 1ock 1 μ + α + β1 + γ1 μ + α1 + β2 + γ2 μ + α1 + β3 + γ3 2 μ + α2 + β1 + γ3 μ + α2 + β2 + γ1 μ + α2 + β3 + γ2 3 μ + α + β1 + γ2 μ + α3 + β2 + γ3 μ + α3 + β3 + γ1 3 Now compare the observations with Treatment 1: Treatment 2: Treatment 3: LATIN SQUARE ANOVA Table Source SS df MSQ E{MSQ} Fobs C:\Users\baileraj\BAILERAJ\Classes\Web-CLASSES\ies-612\lectures\Week 9--IES 612-STA 4-573-STA 4-576-22mar09.doc3/22/200916 Treatment SSTr t-1 MSTr = SSTr/(t-1) 22 1 ( ) ε γ − γ σ + − ∑ in t MSTr/MSE Block A SSA t-1 MSA = SSA/(t-1) Block B SSB t-1 MSB = SSB/(t-1) Error SSE MSE= SSE/(t2-t) σε2 Total SSTot t2-1 TESTS: H0: γ1 = γ2= γ3= … = γt vs H0: γ’s not all equal Test Statistic: Fobs = MSTr/MSE RR: Reject H0 if p-value: Prob(Ft-1, (b-1)(t-1)>Fobs) small NOTES/COMMENTS 1. Again we argue that neither block effect should not be tested. 2. Multiple Comparison of the Treatment Effects would be done as usual. 3. Latin Square Advantage i. Accounts for Two extraneous sources of variation. ii. Requires far fewer EU’s than an RCBD with two Blocks! 4. RCBD Disadvantage i. The number of levels of both block factors AND the treatment MUST all be the same! C:\Users\baileraj\BAILERAJ\Classes\Web-CLASSES\ies-612\lectures\Week 9--IES 612-STA 4-573-STA 4-576-22mar09.doc3/22/200917 Factorial Designs Most time more than one variable “makes up” or “defines the treatment factor. Suppose we ve two factors of interest, all them Factor A and Factor B, with “a” and “b” levels, yij = μ + αi + βj + (αβ)i j +εijk, where εij = random error ~ independent N(0,σε2) Factor with the jth level of the B Factor i = 1, …, a (Factor A levels) j = 1, …, b (Factor B levels) yij = μ + Ai + Bj + A*Bij + εij, ha respectively. Factorial MODEL: μ = arbitrary reference or baseline point αi = effect of the ith level of the A Factor βj = effect of the jth level of the B Factor (αβ)i j = INTERACTION effect the ith level of the A k = 1, …, nij N = sum of all the nij Assume yij ~ independent N( μ + αi + βj + γ(αβ)i j , σε2) Factor B E(yijk) 1 2 … b 1 μ+α1+β1+(αβ)11 μ+α1+β2+(αβ)12 … μ+α1+βb+(αβ)1b 2 μ+α + β +(αβ) μ+α +β +(αβ) … μ+α2+βb+(αβ)2b 2 1 21 2 2 22 … … … … … Factor A … μ+αa+βb+(αβ)ab a μ+αa+β1+(αβ)a1 μ+αa+β2+(αβ)a2 Notice: Difference of means in the same level of one factor differ by the α’s AND the interaction terms (αβ)’s. Factor B E(yijk) 1 2 … b 1 μ+α1+β1+(αβ)11 μ+α1+β2+(αβ)12 … μ+α1+βb+(αβ)1b 2 2 1 21 2 2 22μ+α + β +(αβ) μ+α +β +(αβ) … μ+α2+βb+(αβ)2b Factor A C:\Users\baileraj\BAILERAJ\Classes\Web-CLASSES\ies-612\lectures\Week 9--IES 612-STA 4-573-STA 4-576-22mar09.doc3/22/200920 * Test components of the Two-way anova model; proc glm data=dfact; class pesticide y;variet model yield = variety pesticide variety*pesticide; means v ie /ar ty tukey; means pesticide / tukey; ru n; C:\Users\baileraj\BAILERAJ\Classes\Web-CLASSES\ies-612\lectures\Week 9--IES 612-STA 4-573-STA 4-576-22mar09.doc3/22/200921 COM O INTERACTION between pesticide and variety. It also sugge iffere e i ICIDE et’s see if this is o l sts. MENT: This plot suggests N sts a d nc n both PEST levels and VARIETY levels. L observed in the f rma hypothesis te COMMENT: We would ypothesis of NO INTERACTION between fail to reject the (null) h pesticide and variety (P=0.1817). The main effects of VARIETY and PESTICIDE are both significant a o ndt P-values f <.0001 a .0001, respectively. Thus, we conclude that YIELD differs for both different varieties and pesticides; however, these factors do no interact. COMMENT: TYPE III table = TYPE I table if the n are the same in all factor level ij comb (balan d d c sequentialinations ce ata). TYPE I orresponds to tests (test of term given all term ) whi TY p ial/ eds above it le PE III corres onds to part adjust tests (test of term given all other terms are in the model). It is usually recommended that you consider the TYPE III tests. Comment: The TUKEY procedure is comparing that are pooled means of VARIETY levels acros of the ES r se the factors do not interact. s levels P TICIDE facto . This makes nse if u ave nt rese en y ant to analyze the udy as a one-way anova. In the variety-pesticide study, you have 3*4 = 12 unique factor COMMENT: Variety = 1, 2, 3 and Pesticide = 1, 2, 3, 4 so defining COMBO = 10*variety + 1*pesticide yields a treatment with levels 11, 12, 13, 14, 21, 22, 23, 24, 31, 32, 33, 34. COMMENT: If yo h significant i eractions p nt, th ou may w st level combinations that define the treatments. We can reanalyze these data using a one-way anova with 12 levels. ASIDE: This is mainly a pedagogical exercise since the FACTORS did not interact, there is no strong reason to do this unless you want to identify the variety- sticide combination that leads to the maximal response. pe title "Factorial - Factor A=pesticide Factor B=variety"; title2 "Ott/Longnecker p. 901 - example 15.8"; title3 "redo as a one-way anova"; data dfact; input variety pesticide yield @@; combo = 10*variety + 1*pesticide; * coding of combined treatment; datalines; 1 1 49 1 1 39 1 2 50 1 2 55 1 3 43 1 3 38 1 4 53 1 4 48 2 1 55 2 1 41 2 2 67 2 2 58 2 3 53 2 3 42 2 4 85 2 4 73 3 1 66 3 1 68 3 2 85 3 2 92 3 3 69 3 3 62 3 4 85 3 4 99 ; proc glm; class combo; C:\Users\baileraj\BAILERAJ\Classes\Web-CLASSES\ies-612\lectures\Week 9--IES 612-STA 4-573-STA 4-576-22mar09.doc3/22/200922 model yield = combo; means combo / tukey; run; Factorial - Factor A=pesticide Factor B=variety Ott/Longnecker p. 901 - example 15.8 redo as a one-way anova The GLM Procedure Class Level Information Class Levels Values combo 12 11 12 13 14 21 22 23 24 31 32 33 34 Number of Observations Read 24 Number of Observations Used 24 Dependent Variable: yield Source DF Sum of Squares Mean Square F Value Pr > F Model 11 6680.458333 607.314394 14.36 <.0001 Error 12 507.500000 42.291667 Corrected Total 23 7187.958333 R-Square Coeff Var Root MSE yield Mean 0.929396 10.58149 6.503204 61.45833 Source DF Type I SS Mean Square F Value Pr > F combo 11 6680.458333 607.314394 14.36 <.0001 Source DF Type III SS Mean Square F Value Pr > F combo 11 6680.458333 607.314394 14.36 <.0001 Tukey's Studentized Range (HSD) Test for yield Note: This test controls the Type I experimentwise error rate, but it generally has a higher Type II error rate than REGWQ. C:\Users\baileraj\BAILERAJ\Classes\Web-CLASSES\ies-612\lectures\Week 9--IES 612-STA 4-573-STA 4-576-22mar09.doc3/22/200925 Number of Observations Used 21 Dependent Variable: yield Source DF Sum of Squares Mean Square F Value Pr > F Model 11 6480.809524 589.164502 12.59 0.0004 Error 9 421.000000 46.777778 Corrected Total 20 6901.809524 R-Square Coeff Var Root MSE yield Mean 0.939002 11.16858 6.839428 61.23810 Source DF Type I SS Mean Square F Value Pr > F variety 2 4108.666667 2054.333333 43.92 <.0001 pesticide 3 1864.336975 621.445658 13.29 0.0012 pesticide*variety 6 507.805882 84.634314 1.81 0.2035 Source DF Type III SS Mean Square F Value Pr > F variety 2 3096.800000 1548.400000 33.10 <.0001 pesticide 3 2096.211538 698.737179 14.94 0.0008 pesticide*variety 6 507.805882 84.634314 1.81 0.2035 I showed you an ANCOVA analysis where the assumptions were violated (the slopes were not equal when comparing Tahoe Keys to Eagle lake with respect to log(DO) – depth relationships). The extn example is one where the traditional ANCOVA assumption holds. A VNCO A = μ + αi + β xij + εij where εij ~ ind. N(0, ) yij title "ANCOVA - Factor =Fertili Covariate=height"; zer title2 "Ott/Longnecker p. 947 - example 16.1"; data dancova; input fertilizer $ yield height @@; datalines; C 12.2 45 C 12.4 52 C 11.9 42 C 11.3 35 C 11.8 40 C 12.1 48 C 13.1 60 C 12.7 61 C 12.4 50 C 11.4 33 S 16.6 63 S 15.8 50 S 16.5 63 S 15.0 33 S 15.4 38 S 15.6 45 S 15.8 50 S 15.8 48 S 16.0 50 S 15.8 49 F 9.5 52 F 9.5 54 F 9.6 58 F 8.8 45 F 9.5 57 F 9.8 62 F 9.1 52 F 10.3 67 F 9.5 55 F 8.5 40 ; proc plot; plot yield*height=fertilizer; run; proc glm; cla tilizess fer r; model yield = height|fertilizer; run; proc glm; class fertilizer; model yie tld = heigh fertilizer; lsmeans fertilizer / pdiff; run; Plot of yield*height. Symbol is value of fertilizer. ‚ 16 ˆ S S ‚ ‚ ‚ 13 ˆ C C C C ‚ C 12 ˆ C C ‚ C ‚ C ‚ C 11 ˆ ‚ ‚ yield ‚ ‚ 17 ˆ ‚ ‚ S ‚ ‚ S S S S 15 ˆ ‚ S 14 ˆ ‚ ‚ ‚ ‚ ‚ C:\Users\baileraj\BAILERAJ\Classes\Web-CLASSES\ies-612\lectures\Week 9--IES 612-STA 4-573-STA 4-576-22mar09.doc3/22/200926 C:\Users\baileraj\BAILERAJ\Classes\Web-CLASSES\ies-612\lectures\Week 9--IES 612-STA 4-573-STA 4-576-22mar09.doc3/22/200927 ‚ F 10 ˆ ‚ F ‚ F F F F F ‚ 9 ˆ F ‚ F ‚ F ‚ 8 ˆ ‚ Šƒˆƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒˆƒƒ 30 35 40 45 50 55 60 65 70 height NOTE: 2 obs hidden. Notice: The yield is linearly related to the covariate (height) in each fertilizer group. ANCOVA - Factor =Fertilizer Covariate=height Ott/Longnecker p. 947 - example 16.1 The GLM Procedure Class Level Information Class Levels Values fertilizer 3 C F S Number of Observations Read 30 Number of Observations Used 30 Dependent Variable: yield Source DF Sum of Squares Mean Square F Value Pr > F Model 5 214.4372247 42.8874449 2887.70 <.0001 Error 24 0.3564420 0.0148517 Corrected Total 29 214.7936667 R-Square Coeff Var Root MSE yield Mean 0.998341 0.978334 0.121868 12.45667 Source DF Type I SS Mean Square F Value Pr > F height 1 0.4721494 0.4721494 31.79 <.0001 fertilizer 2 213.9038045 106.9519022 7201.30 <.0001 C:\Users\baileraj\BAILERAJ\Classes\Web-CLASSES\ies-612\lectures\Week 9--IES 612-STA 4-573-STA 4-576-22mar09.doc3/22/200930 model intensity=station; random station; run; ods html close; Random effect Ott/Longnecker p. 981 - example 17.1 The GLM Procedure Class Level Information Class Levels Values station 3 1 2 3 Number of Observations Read 15 Number of Observations Used 15 Random effect Ott/Longnecker p. 981 - example 17.1 The GLM Procedure Dependent Variable: intensity Source DF Sum of Squares Mean Square F Value Pr > F Model 2 20259573.3 10129786.7 1.38 0.2884 Error 12 87989600.0 7332466.7 Corrected Total 14 108249173.3 R-Square Coeff Var Root MSE intensity Mean 0.187157 94.06622 2707.853 2878.667 Source DF Type I SS Mean Square F Value Pr > F station 2 20259573.33 10129786.67 1.38 0.2884 Source DF Type III SS Mean Square F Value Pr > F C:\Users\baileraj\BAILERAJ\Classes\Web-CLASSES\ies-612\lectures\Week 9--IES 612-STA 4-573-STA 4-576-22mar09.doc3/22/200931 Source DF Type III SS Mean Square F Value Pr > F station 2 20259573.33 10129786.67 1.38 0.2884 The GLM Procedure Source Type III Expected Mean Square station Var(Error) + 5 Var(station)
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved