最新多变量方差分析ppt课件.ppt

上传人:豆**** 文档编号:33407527 上传时间:2022-08-10 格式:PPT 页数:52 大小:476KB
返回 下载 相关 举报
最新多变量方差分析ppt课件.ppt_第1页
第1页 / 共52页
最新多变量方差分析ppt课件.ppt_第2页
第2页 / 共52页
点击查看更多>>
资源描述

《最新多变量方差分析ppt课件.ppt》由会员分享,可在线阅读,更多相关《最新多变量方差分析ppt课件.ppt(52页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。

1、第四章第四章 多变量方差分析多变量方差分析 什么是多变量方差分析? 多变量方差分析在医学中的应用【SAS程序】data eg4_1; input id x1 x2 x3 ; y1=x1-121.57;y2=x2-21.54;y3=x3-57.98; cards; 1 141.2 31.8 63.6 20 121.4 19.1 56.5run;proc means;var y1-y3;run;proc glm; model y1 y2 y3= / ss3 nouni; manova h=intercept / printe printh; run; 【SASSAS输出的结果】输出的结果】 The

2、 MEANS Procedure The MEANS Procedure Variable N Mean Std Dev Minimum Maximum Variable N Mean Std Dev Minimum Maximum - - y1 20 7.170000 4.7157519 -0.170000 19.63000 y1 20 7.170000 4.7157519 -0.170000 19.63000 y2 20 2.525000 3.1504845 -2.740000 10.26000 y2 20 2.525000 3.1504845 -2.740000 10.26000 y3

3、20 2.365000 3.8276659 -6.780000 7.82000 y3 20 2.365000 3.8276659 -6.780000 7.82000 - - The GLM Procedure The GLM Procedure Number of observations 20 Number of observations 20 Multivariate Analysis of Variance Multivariate Analysis of VarianceMANOVA Test Criteria and Exact F Statistics for the Hypoth

4、esis of No MANOVA Test Criteria and Exact F Statistics for the Hypothesis of No Overall Intercept EffectOverall Intercept EffectStatistic Value F Value Num DF Den DF Pr FStatistic Value F Value Num DF Den DF Pr FWilks Lambda 0.20656246 21.77 3 17 .0001Wilks Lambda 0.20656246 21.77 3 17 .0001Pillais

5、Trace 0.79343754 21.77 3 17 .0001Pillais Trace 0.79343754 21.77 3 17 .0001Hotelling-Lawley Trace 3.84115073 21.77 3 17 .0001Hotelling-Lawley Trace 3.84115073 21.77 3 17 .0001Roys Greatest Root 3.84115073 21.77 3 17 .0001Roys Greatest Root 3.84115073 21.77 3 17 .0001结论:因为P FStatistic Value F Value Nu

6、m DF Den DF Pr FWilks Lambda 0.61026828 2.24 2 7 0.1776Wilks Lambda 0.61026828 2.24 2 7 0.1776Pillais Trace 0.38973172 2.24 2 7 0.1776Pillais Trace 0.38973172 2.24 2 7 0.1776Hotelling-Lawley Trace 0.63862358 2.24 2 7 0.1776Hotelling-Lawley Trace 0.63862358 2.24 2 7 0.1776Roys Greatest Root 0.6386235

7、8 2.24 2 7 0.1776Roys Greatest Root 0.63862358 2.24 2 7 0.1776【例【例4-3】成组设计资料的】成组设计资料的MANOVA实例实例为了研究某种疾病的治疗,观察了24个病人使用三种不同药品后的两个指标,每种药品观察了4个男性和4个女性,数据列在表4-8中。试比较药品对两个指标所起的作用。表4-8 三种不同药品用药后的观察数据【SAS程序】程序】data eg4_3; input sex $ drug $ ; input y1 y2 ;output; input y1 y2 ;output; input y1 y2 ;output; in

8、put y1 y2 ;output; cards; M A 5 6 5 4 9 9 7 6 F C 14 13 12 12 12 10 8 7run;proc glm manova ; classes drug ; model y1 y2 = drug / nouni ; contrast Drug A vs B drug 1 -1 0 ; contrast Drug A vs C drug 1 0 -1 ; contrast Drug B vs C drug 0 1 -1 ; manova h= drug ; means drug ; run;【SASSAS部分部分 输出结果】输出结果】Ge

9、neral Linear Models ProcedureGeneral Linear Models ProcedureClass Level InformationClass Level InformationClass Levels ValuesClass Levels ValuesSEX 2 Female MaleSEX 2 Female MaleDRUG 3 A B CDRUG 3 A B CNumber of observations in data set = 24Number of observations in data set = 24Multivariate Analysi

10、s of VarianceMultivariate Analysis of VarianceManova Test Criteria and F Approximations for the Hypothesis of Manova Test Criteria and F Approximations for the Hypothesis of no Overall DRUG no Overall DRUG EffectEffectStatistic Value F Num DF Den DF Pr FStatistic Value F Num DF Den DF Pr FWilks Lamb

11、da 0.21763115 11.4358 4 40 0.0001Wilks Lambda 0.21763115 11.4358 4 40 0.0001Pillais Trace 0.88366412 8.3115 4 42 0.0001Pillais Trace 0.88366412 8.3115 4 42 0.0001Hotelling-Lawley Trace 3.12948583 14.8651 4 38 0.0001Hotelling-Lawley Trace 3.12948583 14.8651 4 38 0.0001Roys Greatest Root 2.97292461 31

12、.2157 2 21 0.0001Roys Greatest Root 2.97292461 31.2157 2 21 0.0001Manova Test Criteria and Exact F Statistics for the Hypothesis of Manova Test Criteria and Exact F Statistics for the Hypothesis of no Overall no Overall Drug A vs B EffectDrug A vs B EffectStatistic Value F Num DF Den DF Pr FStatisti

13、c Value F Num DF Den DF Pr FWilks Lambda 0.86446183 1.5679 2 20 0.2331Wilks Lambda 0.86446183 1.5679 2 20 0.2331Pillais Trace 0.13553817 1.5679 2 20 0.2331Pillais Trace 0.13553817 1.5679 2 20 0.2331Hotelling-Lawley Trace 0.15678908 1.5679 2 20 0.2331Hotelling-Lawley Trace 0.15678908 1.5679 2 20 0.23

14、31Roys Greatest Root 0.15678908 1.5679 2 20 0.2331Roys Greatest Root 0.15678908 1.5679 2 20 0.2331Manova Test Criteria and Exact F Statistics for the Hypothesis of Manova Test Criteria and Exact F Statistics for the Hypothesis of no Overall no Overall Drug A vs C EffectDrug A vs C EffectStatistic Va

15、lue F Num DF Den DF Pr FStatistic Value F Num DF Den DF Pr FWilks Lambda 0.30389066 22.9066 2 20 0.0001Wilks Lambda 0.30389066 22.9066 2 20 0.0001Pillais Trace 0.69610934 22.9066 2 20 0.0001Pillais Trace 0.69610934 22.9066 2 20 0.0001Hotelling-Lawley Trace 2.29065729 22.9066 2 20 0.0001Hotelling-Law

16、ley Trace 2.29065729 22.9066 2 20 0.0001Roys Greatest Root 2.29065729 22.9066 2 20 0.0001Roys Greatest Root 2.29065729 22.9066 2 20 0.0001Manova Test Criteria and Exact F Statistics for the Hypothesis of Manova Test Criteria and Exact F Statistics for the Hypothesis of no Overall Drug no Overall Dru

17、g B vs C EffectB vs C EffectStatistic Value F Num DF Den DF Pr FStatistic Value F Num DF Den DF Pr FWilks Lambda 0.30799724 22.4678 2 20 0.0001Wilks Lambda 0.30799724 22.4678 2 20 0.0001Pillais Trace 0.69200276 22.4678 2 20 0.0001Pillais Trace 0.69200276 22.4678 2 20 0.0001Hotelling-Lawley Trace 2.2

18、4678238 22.4678 2 20 0.0001Hotelling-Lawley Trace 2.24678238 22.4678 2 20 0.0001Roys Greatest Root 2.24678238 22.4678 2 20 0.0001Roys Greatest Root 2.24678238 22.4678 2 20 0.0001 Level of -Y1- -Y2-Level of -Y1- -Y2-DRUG N Mean SD Mean SDDRUG N Mean SD Mean SDA 8 5.6250000 1.84681192 5.6250000 1.7677

19、6695A 8 5.6250000 1.84681192 5.6250000 1.76776695B 8 6.1250000 1.55264751 7.1250000 2.29518129B 8 6.1250000 1.55264751 7.1250000 2.29518129C 8 13.2500000 2.96407056 11.3750000 2.38671921C 8 13.2500000 2.96407056 11.3750000 2.38671921【例【例4-4】析因设计资料的】析因设计资料的MANOVA实例实例为了研究某种疾病的治疗,观察了24个病人使用三种不同药品后的两个指标

20、,每种药品观察了4个男性和4个女性,数据列在表4-8中。试分析性别和药品对两个指标所起的作用。表4-8 三种不同药品用药后的观察数据【SAS 程序】proc glm data=eg4_3 manova ; classes sex drug ; model y1 y2 = sex drug sex*drug / nouni ; contrast Drug A vs B drug 1 -1 0 ; contrast Drug A vs C drug 1 0 -1 ; contrast Drug B vs C drug 0 1 -1 ; contrast Drug A vs B /sex=m dru

21、g 1 -1 0 sex*drug 1 -1 0 0 0 0 ; contrast Drug A vs B /sex= f drug 1 -1 0 sex*drug 0 0 0 1 -1 0 ; contrast Drug A vs C /sex=m drug 1 0 -1 sex*drug 1 0 -1 0 0 0 ; contrast Drug A vs C /sex= f drug 1 0 -1 sex*drug 0 0 0 1 0 -1 ; contrast Drug B vs C /sex=m drug 0 1 -1 sex*drug 0 1 -1 0 0 0 ; contrast

22、Drug B vs C /sex= f drug 0 1 -1 sex*drug 0 0 0 0 1 -1; manova h=sex drug sex*drug ; means sex drug; run; 【SASSAS主要输出结果】主要输出结果】General Linear Models ProcedureGeneral Linear Models ProcedureMultivariate Analysis of VarianceMultivariate Analysis of VarianceManova Test Criteria and Exact F Statistics fo

23、r the Hypothesis of Manova Test Criteria and Exact F Statistics for the Hypothesis of no Overall SEX no Overall SEX EffectEffectStatistic Value F Num DF Den DF Pr FStatistic Value F Num DF Den DF Pr FWilks Lambda 0.60255986 5.6065 2 17 0.0135Wilks Lambda 0.60255986 5.6065 2 17 0.0135Pillais Trace 0.

24、39744014 5.6065 2 17 0.0135Pillais Trace 0.39744014 5.6065 2 17 0.0135Hotelling-Lawley Trace 0.65958615 5.6065 2 17 0.0135Hotelling-Lawley Trace 0.65958615 5.6065 2 17 0.0135Roys Greatest Root 0.65958615 5.6065 2 17 0.0135Roys Greatest Root 0.65958615 5.6065 2 17 0.0135Manova Test Criteria and F App

25、roximations for the Hypothesis of Manova Test Criteria and F Approximations for the Hypothesis of no Overall DRUG no Overall DRUG EffectEffectStatistic Value F Num DF Den DF Pr FStatistic Value F Num DF Den DF Pr FWilks Lambda 0.13856520 14.3345 4 34 0.0001Wilks Lambda 0.13856520 14.3345 4 34 0.0001

26、Pillais Trace 0.98043004 8.6545 4 36 0.0001Pillais Trace 0.98043004 8.6545 4 36 0.0001Hotelling-Lawley Trace 5.35805223 21.4322 4 32 0.0001Hotelling-Lawley Trace 5.35805223 21.4322 4 32 0.0001Roys Greatest Root 5.19267163 46.7340 2 18 0.0001Roys Greatest Root 5.19267163 46.7340 2 18 0.0001【例【例4-5】重复

27、测量设计资料的】重复测量设计资料的MANOVA实例实例欲比较两种治疗(胸腔切开术grp=1和胸腔镜检术grp=2)方案的效果,将40个病人随机分成两组,分别在术前、术后2天、术后7天测定患者的T细胞结果列在表4-9中。表4-9 胸腔切开术和胸腔镜检术患者的T细胞测定结果【SAS程序】程序】data eg4_5; do id=1 to 22; do grp=1 to 2; input d1 d2 d3;output; end; end; cards;74 68 71 46 61 58 . . . 83 87 83run;proc glm; class grp; model d1 d2 d3=gr

28、p / nouni ss3; repeated time 3 contrast(1) / printe summary; lsmeans grp /stderr;run;【SAS输出结果】输出结果】General Linear Models ProcedureClass Level InformationClass Levels ValuesGRP 2 1 2Number of observations in data set = 44NOTE: Observations with missing values will not be included in this analysis. Th

29、us, only 41 observations can be used in this analysis.Test for SphericityTest for Sphericity: Mauchlys Criterion = 0.6611213: Mauchlys Criterion = 0.6611213Chisquare Approximation = 15.725084 with 2 df Chisquare Approximation = 15.725084 with 2 df Prob Chisquare = 0.0004Prob Chisquare = 0.0004Applie

30、d to Orthogonal Components:Applied to Orthogonal Components:Test for Sphericity: Mauchlys Criterion = 0.9639864Test for Sphericity: Mauchlys Criterion = 0.9639864Chisquare Approximation = 1.3937694 with 2 df Chisquare Approximation = 1.3937694 with 2 df Prob Chisquare = 0.4981Prob Chisquare = 0.4981

31、 Manova Test Criteria and Exact F Statistics for the Hypothesis of Manova Test Criteria and Exact F Statistics for the Hypothesis of no time no time EffectEffectStatistic Value F Value Num DF Den DF Pr FStatistic Value F Value Num DF Den DF Pr FWilks Lambda 0.84063314 3.60 2 38 0.0369Wilks Lambda 0.

32、84063314 3.60 2 38 0.0369Pillais Trace 0.15936686 3.60 2 38 0.0369Pillais Trace 0.15936686 3.60 2 38 0.0369Hotelling-Lawley Trace 0.18957956 3.60 2 38 Hotelling-Lawley Trace 0.18957956 3.60 2 38 0.03690.0369Roys Greatest Root 0.18957956 3.60 2 38 0.0369Roys Greatest Root 0.18957956 3.60 2 38 0.0369

33、Manova Test Criteria and Exact F Statistics for the Hypothesis of Manova Test Criteria and Exact F Statistics for the Hypothesis of no timeno time* *grp grp EffectEffectStatistic Value F Value Num DF Den DF Pr FStatistic Value F Value Num DF Den DF Pr FWilks Lambda 0.96326566 0.72 2 38 0.4911Wilks L

34、ambda 0.96326566 0.72 2 38 0.4911Pillais Trace 0.03673434 0.72 2 38 0.4911Pillais Trace 0.03673434 0.72 2 38 0.4911Hotelling-Lawley Trace 0.03813522 0.72 2 38 0.4911Hotelling-Lawley Trace 0.03813522 0.72 2 38 0.4911Roys Greatest Root 0.03813522 0.72 2 38 0.4911Roys Greatest Root 0.03813522 0.72 2 38

35、 0.4911General Linear Models ProcedureGeneral Linear Models ProcedureRepeated Measures Analysis of VarianceRepeated Measures Analysis of VarianceTests of Hypotheses for Between Subjects EffectsTests of Hypotheses for Between Subjects EffectsSource DF Type III SS Mean Square F Value Pr FSource DF Typ

36、e III SS Mean Square F Value Pr FGRP 1 22.93919944 22.93919944 0.09 0.7599GRP 1 22.93919944 22.93919944 0.09 0.7599Error 39 9447.46730463 242.24275140Error 39 9447.46730463 242.24275140General Linear Models ProcedureGeneral Linear Models ProcedureRepeated Measures Analysis of VarianceRepeated Measur

37、es Analysis of VarianceUnivariate Tests of Hypotheses for Within Subject EffectsUnivariate Tests of Hypotheses for Within Subject EffectsSource: TIMESource: TIME Adj Pr F Adj Pr F DF Type III SS Mean Square F Value Pr F G - G H - F DF Type III SS Mean Square F Value Pr F G - G H - F 2 169.29178823 8

38、4.64589411 3.07 0.0519 0.0538 2 169.29178823 84.64589411 3.07 0.0519 0.0538 0.05190.0519Source: TIMESource: TIME* *GRPGRP Adj Pr F Adj Pr F DF Type III SS Mean Square F Value Pr F G - G H - F DF Type III SS Mean Square F Value Pr F G - G H - F 2 46.49504026 23.24752013 0.84 0.4337 0.4303 0.4337 2 46

39、.49504026 23.24752013 0.84 0.4337 0.4303 0.4337Source: Error(TIME)Source: Error(TIME) DF Type III SS Mean Square DF Type III SS Mean Square 78 2147.53748006 27.53253180 78 2147.53748006 27.53253180Greenhouse-Geisser Epsilon = 0.9652Greenhouse-Geisser Epsilon = 0.9652 Huynh-Feldt Epsilon = 1.0406 Huy

40、nh-Feldt Epsilon = 1.0406General Linear Models ProcedureGeneral Linear Models ProcedureRepeated Measures Analysis of VarianceRepeated Measures Analysis of VarianceAnalysis of Variance of Contrast VariablesAnalysis of Variance of Contrast VariablesTIME.N represents the contrast between the nth level

41、of TIME and the 1stTIME.N represents the contrast between the nth level of TIME and the 1stContrast Variable: TIME.2Contrast Variable: TIME.2Source DF Type III SS Mean Square F Value Pr FSource DF Type III SS Mean Square F Value Pr FMEAN 1 29.24868713 29.24868713 0.45 0.5080MEAN 1 29.24868713 29.248

42、68713 0.45 0.5080GRP 1 82.90722371 82.90722371 1.27 0.2675GRP 1 82.90722371 82.90722371 1.27 0.2675Error 39 2554.99521531 65.51269783Error 39 2554.99521531 65.51269783Contrast Variable: TIME.3Contrast Variable: TIME.3Source DF Type III SS Mean Square F Value Pr FSource DF Type III SS Mean Square F V

43、alue Pr FMEAN 1 321.68887852 321.68887852 6.48 MEAN 1 321.68887852 321.68887852 6.48 0.01500.0150GRP 1 3.24985413 3.24985413 0.07 0.7994GRP 1 3.24985413 3.24985413 0.07 0.7994Error 39 1936.55502392 49.65525702Error 39 1936.55502392 49.65525702 Least Squares Means Least Squares Means Standard Standar

44、d grp d1 LSMEAN Error Pr |t| grp d1 LSMEAN Error Pr |t| 1 71.0000000 2.3785943 .0001 1 71.0000000 2.3785943 .0001 2 70.7272727 2.2104761 .0001 2 70.7272727 2.2104761 |t| grp d2 LSMEAN Error Pr |t| 1 70.4210526 2.4944288 .0001 1 70.4210526 2.4944288 .0001 2 73.0000000 2.3181235 .0001 2 73.0000000 2.3

45、181235 |t| grp d3 LSMEAN Error Pr |t| 1 73.5263158 1.9411064 .0001 1 73.5263158 1.9411064 .0001 2 73.8181818 1.8039098 .0001 2 73.8181818 1.8039098 0.05, 单变量方差分析,将时间作为一个效应因子。P Chisquare = 0.0000Applied to Orthogonal Components:Test for Sphericity: Mauchlys Criterion = 0.3484099Chisquare Approximatio

46、n = 17.631505 with 5 dfProb Chisquare = 0.0034SAS输出结果输出结果相关分析结果说明重复测量变量之间高度相关。球形检验结果说明该数据应当使用多变量方差分析方法。Manova Test Criteria and Exact F Statistics forthe Hypothesis of no TIME EffectH = Type III SS&CP Matrix for TIME E = Error SS&CP MatrixS=1 M=0.5 N=7Statistic Value F Num DF Den DF Pr FWilks Lambda

47、 0.102088 46.909 3 16 0.0001Pillais Trace 0.897911 46.909 3 16 0.0001Hotelling-Lawley Tra 8.795432 46.909 3 16 0.0001Roys Greatest Root 8.795432 46.909 3 16 0.0001SAS输出结果输出结果多变量方差分析结果说明时间对体温有显著性影响。Manova Test Criteria and Exact F Statistics forthe Hypothesis of no TIME*A EffectH = Type III SS&CP Mat

48、rix for TIME*A E = Error SS&CP MatrixS=1 M=0.5 N=7Statistic Value F Num DF Den DF Pr FWilks Lambda 0.90270121 0.57486 3 16 0.6398Pillais Trace 0.09729879 0.57486 3 16 0.6398Hotelling-Lawley 0.10778626 0.57486 3 16 0.6398Roys Greatest Ro 0.10778626 0.57486 3 16 0.6398SAS输出结果输出结果多变量方差分析结果说明时间与处理方法之间对体

49、温的交互影响不显著。General Linear Models ProcedureRepeated Measures Analysis of VarianceUnivariate Tests of Hypotheses for Within Subject EffectsSource: TIME Adj Pr FDF Type III SS Mean Square F Value Pr F G-G H - F 3 20.57537500 6.85845833 77.23 0.0001 0.0001 0.0001Source: TIME*A Adj Pr FDF Type III SS Mean

50、 Square F Value Pr F G - G H - F 3 0.15637500 0.05212500 0.59 0.6262 0.5746 0.6046SAS输出结果输出结果多变量重复资料的方差分析结果说明时间对体温有显著性影响;时间与处理方法之间对体温的交互影响不显著。nth level of TIME and the 2ndContrast Variable: TIME.1Source DF Type III SS F Value Pr FMEAN 1 31.25000000 107.92 0.0001A 1 0.09800000 0.34 0.5679Error 18 5.2

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 教育专区 > 教案示例

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号© 2020-2023 www.taowenge.com 淘文阁