多变量方差分析PPT课件_第1页
多变量方差分析PPT课件_第2页
多变量方差分析PPT课件_第3页
多变量方差分析PPT课件_第4页
多变量方差分析PPT课件_第5页
已阅读5页,还剩46页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、多变量方差分析 多元统计分析方法多元统计分析方法 The Methods of Multivariate Statistical Analysis 多变量方差分析 第四章第四章 多变量方差分析多变量方差分析 什么是多变量方差分析? 多变量方差分析在医学中的应用 多变量方差分析 方差分析的分类方差分析的分类 单反应变量 (y) 多反应变量 (y1,y2yk) 单效应因子(A) 双效应因子(A,B) 多效应因子(A,B,C) 无交互效应 有交互效应 2)根据效应因子的随机性: 固定模型(fixed model):效应因子是专门指定的。 随机模型(random model):效应因子是从很多的因子

2、中随机抽取出来的。 混合模型(mixed model):效应因子包含两种类型因子。 1)根据变量的个数: 多变量方差分析 什么是多变量方差分析?什么是多变量方差分析? MANOVA 分析一个或多个效应因子是如何影响一组 反应变量的。 多变量方差分析 身高:y1 体重:y2 胸围:y3 =父母SES 舒张压:y1 收缩压:y2 =职务生活方式+ 反应变量 效应因子 多变量方差分析 多变量方差分析在医学中的应用实例多变量方差分析在医学中的应用实例 1、单组设计资料的MANOVA 2、配对设计资料的MANOVA 3、成组设计资料的MANOVA 4、多因子的MANOVA 5、重复设计资料的MANOVA

3、 6、有协变量的MANOVA 多变量方差分析 【例【例4-1】单组设计资料的】单组设计资料的MANOVA实例实例 为了了解某地在不同时期的儿童生长发育情况,调查 了20名8岁男童身高(x1)、体重(x2)、胸围(x3),数据列 在表4-6中。10年前该地大量调查获得身高、体重、胸围 的均值分别为:121.57cm、21.54kg、57.98cm。试问: 本次调查结果与10年前结果是否相同? 多变量方差分析 表4-6 儿童生长发育情况调查数据 多变量方差分析 【SAS程序】 data eg4_1; input id x1 x2 x3 ; y1=x1-121.57;y2=x2-21.54;y3=x

4、3-57.98; cards; 1 141.2 31.8 63.6 20 121.4 19.1 56.5 run; proc means;var y1-y3;run; proc glm; model y1 y2 y3= / ss3 nouni; manova h=intercept / printe printh; run; 多变量方差分析 【SASSAS输出的结果】输出的结果】 The MEANS Procedure The MEANS Procedure Variable N Mean Std Dev Minimum Maximum Variable N Mean Std Dev Mini

5、mum 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 20 2.365000 3.8276659 -6.780000 7.82000 y3 20 2.365000 3.8276659 -6.780000 7.82000 - - 多变量方差分析 The GLM Pr

6、ocedure The GLM Procedure Number of observations 20 Number of observations 20 Multivariate Analysis of Variance Multivariate Analysis of Variance MANOVA Test Criteria and Exact F Statistics for the Hypothesis of No MANOVA Test Criteria and Exact F Statistics for the Hypothesis of No Overall Intercep

7、t EffectOverall Intercept Effect Statistic Value F Value Num DF Den DF Pr FStatistic Value F Value Num DF Den DF Pr F Wilks Lambda 0.20656246 21.77 3 17 .0001Wilks Lambda 0.20656246 21.77 3 17 .0001 Pillais Trace 0.79343754 21.77 3 17 .0001Pillais Trace 0.79343754 21.77 3 17 .0001 Hotelling-Lawley T

8、race 3.84115073 21.77 3 17 .0001Hotelling-Lawley Trace 3.84115073 21.77 3 17 .0001 Roys Greatest Root 3.84115073 21.77 3 17 .0001Roys Greatest Root 3.84115073 21.77 3 17 .0001 多变量方差分析 结论:因为P FStatistic Value F Value Num DF Den DF Pr F Wilks Lambda 0.61026828 2.24 2 7 0.1776Wilks Lambda 0.61026828 2.

9、24 2 7 0.1776 Pillais Trace 0.38973172 2.24 2 7 0.1776Pillais Trace 0.38973172 2.24 2 7 0.1776 Hotelling-Lawley Trace 0.63862358 2.24 2 7 0.1776Hotelling-Lawley Trace 0.63862358 2.24 2 7 0.1776 Roys Greatest Root 0.63862358 2.24 2 7 0.1776Roys Greatest Root 0.63862358 2.24 2 7 0.1776 多变量方差分析 【例【例4-3

10、】成组设计资料的】成组设计资料的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; input y1 y2 ;output; cards; M A 5 6 5 4 9 9 7 6 F C 14 13

11、 12 12 12 10 8 7 run; 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部分部分 输出结果】输出结果】 General Linear Models ProcedureGeneral Linear

12、 Models Procedure Class Level InformationClass Level Information Class Levels ValuesClass Levels Values SEX 2 Female MaleSEX 2 Female Male DRUG 3 A B CDRUG 3 A B C Number of observations in data set = 24Number of observations in data set = 24 Multivariate Analysis of VarianceMultivariate Analysis of

13、 Variance Manova 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 EffectEffect Statistic Value F Num DF Den DF Pr FStatistic Value F Num DF Den DF Pr F Wilks Lambda 0.21763115 11.4358 4 40 0.0001W

14、ilks Lambda 0.21763115 11.4358 4 40 0.0001 Pillais Trace 0.88366412 8.3115 4 42 0.0001Pillais Trace 0.88366412 8.3115 4 42 0.0001 Hotelling-Lawley Trace 3.12948583 14.8651 4 38 0.0001Hotelling-Lawley Trace 3.12948583 14.8651 4 38 0.0001 Roys Greatest Root 2.97292461 31.2157 2 21 0.0001Roys Greatest

15、Root 2.97292461 31.2157 2 21 0.0001 多变量方差分析 Manova 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 Effect Statistic Value F Num DF Den DF Pr FStatistic Value F Num DF Den

16、DF Pr F Wilks Lambda 0.86446183 1.5679 2 20 0.2331Wilks Lambda 0.86446183 1.5679 2 20 0.2331 Pillais Trace 0.13553817 1.5679 2 20 0.2331Pillais Trace 0.13553817 1.5679 2 20 0.2331 Hotelling-Lawley Trace 0.15678908 1.5679 2 20 0.2331Hotelling-Lawley Trace 0.15678908 1.5679 2 20 0.2331 Roys Greatest R

17、oot 0.15678908 1.5679 2 20 0.2331Roys Greatest Root 0.15678908 1.5679 2 20 0.2331 Manova 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 Effect Statistic Value F Num DF De

18、n DF Pr FStatistic Value F Num DF Den DF Pr F Wilks Lambda 0.30389066 22.9066 2 20 0.0001Wilks Lambda 0.30389066 22.9066 2 20 0.0001 Pillais Trace 0.69610934 22.9066 2 20 0.0001Pillais Trace 0.69610934 22.9066 2 20 0.0001 Hotelling-Lawley Trace 2.29065729 22.9066 2 20 0.0001Hotelling-Lawley Trace 2.

19、29065729 22.9066 2 20 0.0001 Roys Greatest Root 2.29065729 22.9066 2 20 0.0001Roys Greatest Root 2.29065729 22.9066 2 20 0.0001 多变量方差分析 Manova 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 Drug

20、B vs C EffectB vs C Effect Statistic Value F Num DF Den DF Pr FStatistic Value F Num DF Den DF Pr F Wilks Lambda 0.30799724 22.4678 2 20 0.0001Wilks Lambda 0.30799724 22.4678 2 20 0.0001 Pillais Trace 0.69200276 22.4678 2 20 0.0001Pillais Trace 0.69200276 22.4678 2 20 0.0001 Hotelling-Lawley Trace 2

21、.24678238 22.4678 2 20 0.0001Hotelling-Lawley Trace 2.24678238 22.4678 2 20 0.0001 Roys 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 SD A 8 5.6250000 1.84681192 5.6250000 1

22、.76776695A 8 5.6250000 1.84681192 5.6250000 1.76776695 B 8 6.1250000 1.55264751 7.1250000 2.29518129B 8 6.1250000 1.55264751 7.1250000 2.29518129 C 8 13.2500000 2.96407056 11.3750000 2.38671921C 8 13.2500000 2.96407056 11.3750000 2.38671921 多变量方差分析 【例【例4-4】析因设计资料的】析因设计资料的MANOVA实例实例 为了研究某种疾病的治疗,观察了24

23、个病人使用三种不同药 品后的两个指标,每种药品观察了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 ; c

24、ontrast Drug A vs B /sex=m drug 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

25、*drug 0 1 -1 0 0 0 ; contrast 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 Procedure Multivariate Analysis of VarianceMultivariate Analysis of Variance Manov

26、a Test Criteria and Exact F Statistics for the Hypothesis of Manova Test Criteria and Exact F Statistics for the Hypothesis of no Overall SEX no Overall SEX EffectEffect Statistic Value F Num DF Den DF Pr FStatistic Value F Num DF Den DF Pr F Wilks Lambda 0.60255986 5.6065 2 17 0.0135Wilks Lambda 0.

27、60255986 5.6065 2 17 0.0135 Pillais Trace 0.39744014 5.6065 2 17 0.0135Pillais Trace 0.39744014 5.6065 2 17 0.0135 Hotelling-Lawley Trace 0.65958615 5.6065 2 17 0.0135Hotelling-Lawley Trace 0.65958615 5.6065 2 17 0.0135 Roys Greatest Root 0.65958615 5.6065 2 17 0.0135Roys Greatest Root 0.65958615 5.

28、6065 2 17 0.0135 Manova 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 EffectEffect Statistic Value F Num DF Den DF Pr FStatistic Value F Num DF Den DF Pr F Wilks Lambda 0.13856520 14.3345 4 34

29、0.0001Wilks Lambda 0.13856520 14.3345 4 34 0.0001 Pillais Trace 0.98043004 8.6545 4 36 0.0001Pillais Trace 0.98043004 8.6545 4 36 0.0001 Hotelling-Lawley Trace 5.35805223 21.4322 4 32 0.0001Hotelling-Lawley Trace 5.35805223 21.4322 4 32 0.0001 Roys Greatest Root 5.19267163 46.7340 2 18 0.0001Roys Gr

30、eatest Root 5.19267163 46.7340 2 18 0.0001 多变量方差分析 【例【例4-5】重复测量设计资料的】重复测量设计资料的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; en

31、d; cards; 74 68 71 46 61 58 . . . 83 87 83 run; proc glm; class grp; model d1 d2 d3=grp / nouni ss3; repeated time 3 contrast(1) / printe summary; lsmeans grp /stderr; run; 多变量方差分析 【SAS输出结果】输出结果】 General Linear Models Procedure Class Level Information Class Levels Values GRP 2 1 2 Number of observat

32、ions in data set = 44 NOTE: Observations with missing values will not be included in this analysis. Thus, only 41 observations can be used in this analysis. Test for SphericityTest for Sphericity: Mauchlys Criterion = 0.6611213: Mauchlys Criterion = 0.6611213 Chisquare Approximation = 15.725084 with

33、 2 df Chisquare Approximation = 15.725084 with 2 df Prob Chisquare = 0.0004Prob Chisquare = 0.0004 Applied to Orthogonal Components:Applied to Orthogonal Components: Test for Sphericity: Mauchlys Criterion = 0.9639864Test for Sphericity: Mauchlys Criterion = 0.9639864 Chisquare Approximation = 1.393

34、7694 with 2 df Chisquare Approximation = 1.3937694 with 2 df Prob Chisquare = 0.4981Prob Chisquare = 0.4981 多变量方差分析 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 EffectEffect Statistic Value F Value

35、 Num DF Den DF Pr FStatistic Value F Value Num DF Den DF Pr F Wilks Lambda 0.84063314 3.60 2 38 0.0369Wilks Lambda 0.84063314 3.60 2 38 0.0369 Pillais Trace 0.15936686 3.60 2 38 0.0369Pillais Trace 0.15936686 3.60 2 38 0.0369 Hotelling-Lawley Trace 0.18957956 3.60 2 38 Hotelling-Lawley Trace 0.18957

36、956 3.60 2 38 0.03690.0369 Roys Greatest Root 0.18957956 3.60 2 38 0.0369Roys Greatest Root 0.18957956 3.60 2 38 0.0369 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 EffectEffect Statistic

37、Value F Value Num DF Den DF Pr FStatistic Value F Value Num DF Den DF Pr F Wilks Lambda 0.96326566 0.72 2 38 0.4911Wilks Lambda 0.96326566 0.72 2 38 0.4911 Pillais Trace 0.03673434 0.72 2 38 0.4911Pillais Trace 0.03673434 0.72 2 38 0.4911 Hotelling-Lawley Trace 0.03813522 0.72 2 38 0.4911Hotelling-L

38、awley Trace 0.03813522 0.72 2 38 0.4911 Roys Greatest Root 0.03813522 0.72 2 38 0.4911Roys Greatest Root 0.03813522 0.72 2 38 0.4911 多变量方差分析 General Linear Models ProcedureGeneral Linear Models Procedure Repeated Measures Analysis of VarianceRepeated Measures Analysis of Variance Tests of Hypotheses

39、 for Between Subjects EffectsTests of Hypotheses for Between Subjects Effects Source DF Type III SS Mean Square F Value Pr FSource DF Type III SS Mean Square F Value Pr F GRP 1 22.93919944 22.93919944 0.09 0.7599GRP 1 22.93919944 22.93919944 0.09 0.7599 Error 39 9447.46730463 242.24275140Error 39 94

40、47.46730463 242.24275140 多变量方差分析 General Linear Models ProcedureGeneral Linear Models Procedure Repeated Measures Analysis of VarianceRepeated Measures Analysis of Variance Univariate Tests of Hypotheses for Within Subject EffectsUnivariate Tests of Hypotheses for Within Subject Effects Source: TIME

41、Source: 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 84.64589411 3.07 0.0519 0.0538 2 169.29178823 84.64589411 3.07 0.0519 0.0538 0.05190.0519 Source: TIMESource: TIME* *GRPGRP Adj Pr F Adj Pr F DF Type

42、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.49504026 23.24752013 0.84 0.4337 0.4303 0.4337 Source: Error(TIME)Source: Error(TIME) DF Type III SS Mean Square DF Type III SS Mean Square 78 2147

43、.53748006 27.53253180 78 2147.53748006 27.53253180 Greenhouse-Geisser Epsilon = 0.9652Greenhouse-Geisser Epsilon = 0.9652 Huynh-Feldt Epsilon = 1.0406 Huynh-Feldt Epsilon = 1.0406 多变量方差分析 General Linear Models ProcedureGeneral Linear Models Procedure Repeated Measures Analysis of VarianceRepeated Me

44、asures Analysis of Variance Analysis of Variance of Contrast VariablesAnalysis of Variance of Contrast Variables TIME.N represents the contrast between the nth level of TIME and the 1stTIME.N represents the contrast between the nth level of TIME and the 1st Contrast Variable: TIME.2Contrast Variable

45、: TIME.2 Source DF Type III SS Mean Square F Value Pr FSource DF Type III SS Mean Square F Value Pr F MEAN 1 29.24868713 29.24868713 0.45 0.5080MEAN 1 29.24868713 29.24868713 0.45 0.5080 GRP 1 82.90722371 82.90722371 1.27 0.2675GRP 1 82.90722371 82.90722371 1.27 0.2675 Error 39 2554.99521531 65.5126

46、9783Error 39 2554.99521531 65.51269783 Contrast Variable: TIME.3Contrast Variable: TIME.3 Source DF Type III SS Mean Square F Value Pr FSource DF Type III SS Mean Square F Value Pr F MEAN 1 321.68887852 321.68887852 6.48 MEAN 1 321.68887852 321.68887852 6.48 0.01500.0150 GRP 1 3.24985413 3.24985413

47、0.07 0.7994GRP 1 3.24985413 3.24985413 0.07 0.7994 Error 39 1936.55502392 49.65525702Error 39 1936.55502392 49.65525702 多变量方差分析 Least Squares Means Least Squares Means Standard Standard 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

48、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.3181235 |t| grp d3 LSMEAN Error Pr |t| 1 73.5263158 1.9411064 .0001 1 73.5263158 1.9411064 .0001 2 73.8181818 1.80390

49、98 .0001 2 73.8181818 1.8039098 0.05, 单变量方差分析,将时间作为一个效应因子。 P Chisquare = 0.0000 Applied to Orthogonal Components: Test for Sphericity: Mauchlys Criterion = 0.3484099 Chisquare Approximation = 17.631505 with 5 df Prob Chisquare = 0.0034 SAS输出结果输出结果 相关分析 结果说明 重复测量 变量之间 高度相关。 球形检验 结果说明 该数据应 当使用多 变量方差 分

50、析方法。 多变量方差分析 Manova Test Criteria and Exact F Statistics for the Hypothesis of no TIME Effect H = Type III SS&CP Matrix for TIME E = Error SS&CP Matrix S=1 M=0.5 N=7 Statistic Value F Num DF Den DF Pr F Wilks Lambda 0.102088 46.909 3 16 0.0001 Pillais Trace 0.897911 46.909 3 16 0.0001 Hotelling-Lawl

51、ey Tra 8.795432 46.909 3 16 0.0001 Roys Greatest Root 8.795432 46.909 3 16 0.0001 SAS输出结果输出结果 多变量方差分析结果说明时间对体温有显著性影响。 多变量方差分析 Manova Test Criteria and Exact F Statistics for the Hypothesis of no TIME*A Effect H = Type III SS&CP Matrix for TIME*A E = Error SS&CP Matrix S=1 M=0.5 N=7 Statistic Value F

52、 Num DF Den DF Pr F Wilks Lambda 0.90270121 0.57486 3 16 0.6398 Pillais Trace 0.09729879 0.57486 3 16 0.6398 Hotelling-Lawley 0.10778626 0.57486 3 16 0.6398 Roys Greatest Ro 0.10778626 0.57486 3 16 0.6398 SAS输出结果输出结果 多变量方差分析结果说明时间与处理方法之间对体温的 交互影响不显著。 多变量方差分析 General Linear Models Procedure Repeated Measures Analysis of Variance Univariate Tests of Hypotheses for Within Subject Effects Source: TIME Adj Pr F DF Type III SS Mean Square F Value Pr F G-G H - F 3 20.57537500 6.85845833 7

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论