第六章常用的试验设计及统计分析常用的试验设计仅研究主效应的实验设计:1.完全随机设计(Completelyrandomizeddesign)2.随机区组(配伍组)设计(Randomizedblockdesign)3.交叉设计(Cross-overdesign)4.拉丁方设计(Latinsquaredesign)考虑交互作用的实验设计1.析因设计(Factorialdesign)2.正交设计(Orthogonaldesign)误差项变动的实验设计1.嵌套设计(Nesteddesign)2.裂区设计(split-plotdesign)3.重复测量设计(RepeatedMeasureDesign)第一节仅研究主效应的实验设计一、完全随机设计:将受试对象随机地分配到各个处理组的设计。随机分组方法:1.编号,确定分组方案2.产生随机数字(随机数字表,或电脑),排序3.按方案分组(如较少10个随机数为A,中间10个数为B,较大10个随机数为C)编号12345678910…2930随机数124182727291413265242978分组BACCCCABCACCAABEBDEACCADEBDCAECBD例:用五种肥料处理棉花,试验重复4次,试验设计见下图,最终棉花产量资料见completerandom.sav。试比较五种处理对棉花产量的影响是否有差异。给出两两比较的p值直接给出分组信息方差齐性检验绘平均值图TestofHomogeneityofVariancesyield.878415.500LeveneStatisticdf1df2Sig.P0.05,方差齐ANOVAyield3894332.4654973583.11612.832.0001138102.2131575873.4815032434.67819BetweenGroupsWithinGroupsTotalSumofSquaresdfMeanSquareFSig.各处理间差异显著yield4732.291741473.958341750.000041799.479241993.75001.000.074treatment54321Sig.Student-Newman-KeulsaN12Subsetforalpha=.05Meansforgroupsinhomogeneoussubsetsaredisplayed.UsesHarmonicMeanSampleSize=4.000.a.棉花产量肥料5732.2917a肥料41473.9583b肥料31750.0000b肥料21799.4792b肥料11993.7500b各处理间棉花产量差异显著性(S-N-K)MultipleComparisonsDependentVariable:yield194.27083194.77356.334-220.8792609.4209243.75000194.77356.230-171.4000658.9000519.79167*194.77356.018104.6416934.94171261.45833*194.77356.000846.30831676.6084-194.27083194.77356.334-609.4209220.879249.47917194.77356.803-365.6709464.6292325.52083194.77356.115-89.6292740.67091067.18750*194.77356.000652.03751482.3375-243.75000194.77356.230-658.9000171.4000-49.47917194.77356.803-464.6292365.6709276.04167194.77356.177-139.1084691.19171017.70833*194.77356.000602.55831432.8584-519.79167*194.77356.018-934.9417-104.6416-325.52083194.77356.115-740.670989.6292-276.04167194.77356.177-691.1917139.1084741.66667*194.77356.002326.51661156.8167-1261.45833*194.77356.000-1676.6084-846.3083-1067.18750*194.77356.000-1482.3375-652.0375-1017.70833*194.77356.000-1432.8584-602.5583-741.66667*194.77356.002-1156.8167-326.5166(J)treatment23451345124512351234(I)treatment12345LSDMeanDifference(I-J)Std.ErrorSig.LowerBoundUpperBound95%ConfidenceIntervalThemeandifferenceissignificantatthe.05level.*.处理1和处理4之间棉花产量差异显著(LSD)(F=12.823,d.f.=1,15,p=0.018)或(F1,15=12.823,p=0.018)随机区组设计(randomizedblockdesign),又称配伍组设计。是单因素设计的方差分析,使用的却是多因素方差分析的方法。实验设计中常按影响试验结果的非处理因素(如窝别等)配成区组(block),再将区组内的受试对象随机分配到各组。这种设计方法统计检验效能较高。缺点是比较麻烦。二、随机区组设计随机分组方法(每个单位组内随机):1.将同窝大白鼠为一个区组(block),并编号;2.给每个大白鼠一个随机数;3.按规定分组:规定随机数小者分到甲组,中等分到乙组,大者分到丙组.4个区组大白鼠按随机区组设计分组区组号1234小白鼠123456789101112随机数683526009953936128527005序号321132321231分配结果丙乙甲甲丙乙丙乙甲乙丙甲A3F3B3F1C1D1E3D3C3B1E1A1C4F4A4D2B2F2B4D4E4E2C2A2随机区组设计:6种肥料以4种方法处理棉花,试验安排据地形划分4个区,最终棉花产量资料见randomblock.sav。试比较6种处理对棉花产量的影响是否有差异。GLM→Univarivate给出Yield=Intercept+treat+block参数估计值方差齐性检验绘残差图当存在协变量时,按协变量为均数的情况计算固定变量的边际均数。方差齐性检验无法输出。这是因为两个因素的各水平交叉。如果要检查方差齐性,每个单元格内至少要有3个数据点。多因素的方差分析各组变异的齐性检验不是很重要。Levene'sTestofEqualityofErrorVariancesaDependentVariable:yield.230.Fdf1df2Sig.Teststhenullhypothesisthattheerrorvarianceofthedependentvariableisequalacrossgroups.Design:Intercept+treat+blocka.TestsofBetween-SubjectsEffectsDependentVariable:yield402270.831a850283.8543.140.02726690655.029126690655.0291666.633.000267588.480553517.6963.342.032134682.351344894.1172.803.076240220.6821516014.71227333146.54224642491.51223SourceCorrectedModelIntercepttreatblockErrorTotalCorrectedTotalTypeIIISumofSquaresdfMeanSquareFSig.RSquared=.626(AdjustedRSquared=.427)a.aaabababbyield4930.981874951.4655241023.158301023.1583041083.585061083.5850641088.705971088.7059741249.50262.429.095treat132645Sig.Student-Newman-Keulsa,bN12SubsetMeansforgroupsinhomogeneoussubsetsaredisplayed.BasedonTypeIIISumofSquaresTheerrortermisMeanSquare(Error)=16014.712.UsesHarmonicMeanSampleSize=4.000.a.Alpha=.05.b.Observedvspredicted线性越强越好残差越分散越好将block作为随机变量(Randomfactor)TestsofBetween-SubjectsEffectsDependentVariable:yield26690655.029126690655.029594.525.000134682.351344894.117a267588.480553517.6963.342.032240220.6821516014.712b134682.351344894.1172.803.076240220.6821516014.712bSourceHypothesisErrorInterceptHypothesisErrortreatHypothesisErrorblockTypeIIISumofSquaresdfMeanSquareFSig.MS(block)a.MS(Error)b.模型不同(分别做treat和block的模型)结果不变,但随机变量Block不能作两两比较。ANOVAyield267588.480553517.6962.570.064374903.0321820827.946642491.51223BetweenGroupsWithinGroupsTotalSumofSquaresdfMeanSquareFSig.如果不考虑Block的影响,只作one-wayANOVA呢?为什么one-wayANOVA没有检测到差异显著性呢?三、交叉设计:平行组试验:受试者被随机分到两个研究小组(治疗组A或治疗组B中的一个)中,。然后比较二个组的结果。(t-test,one-wayANOVA)交叉设计:选择受试人群,分配他们到不同治疗组,组A或组B。当两组治疗一段时间后,受试者进入一个清洗期,然后用药反过来。接受B治疗的组将接受A治疗,反之亦然。在这种形式中,每个受试者成为他或她自身的对照。这个方法提供了最好的对照,也就是说每个受试者将会是其自己的对照。例:12种高血压病人采用A、B两种方案治疗,随机让6人先以A法治疗,经过一定清洗期后再以B法治疗;另外6人先以B法治疗,后以A法治疗;记录血压下降值。结果见下表。数据见crossover.sav。试分析两种方案的疗效有无差别。阶段病人编号123456789101112IBBABAAAABBBA3.071.334.41.873.23.734.131.071.072.273.472.4IIAABABBBBAAAB2.81.473.733.62.671.62.671.731.471.873.471.73由于patient被看作是从一个总体中抽样得到的,所以作为随机变量。WarningsPosthoctestsarenotperformedfor治疗方案¸becausetherearefewerthanthreegroups.如果对只有两个水平的变量,选择Posthoc,则不会给出结果。TestsofBetween-SubjectsEffectsDepe