Baidu
map

Stata第五章 多组计量资料比较的非参数检验命令与输出结果说明

2012-04-17 生物谷 生物谷

本节STATA 命令摘要 ranksum观察变量,by(分组变量) kwallis 观察变量,by(分组变量) ·       秩 和检验(Mann,WhitneyandWilcoxon非参数检验)  对于计量资料不满足正态分布要求或方差不齐性,但样本资料之间是独立

本节STATA 命令摘要

ranksum观察变量,by(分组变量)

kwallis 观察变量,by(分组变量)

·        和检验(Mann,WhitneyandWilcoxon非参数检验)

 对于计量资料不满足正态分布要求或方差不齐性,但样本资料之间是独立抽取的,则可以应用秩和检验方法进行比较两组资料的中位数是否有差异。STATA命令为:

ranksum  观察变量,by(分组变量)

 例:研究不同饲料对雌鼠体重增加的关系(摘自医学统计方法,金丕焕主编,p218)。表中用x表示雌鼠体重增加(克),用group=1表示高蛋白饲料组以及用group=2表示低蛋白饲料组。

x

134

146

104

119

124

161

107

83

113

129

group

1

1

1

1

1

1

1

1

1

1

x

97

123

70

118

101

85

107

132

94

 

group

1

1

2

2

2

2

2

2

2

无效假设Ho:两组增加体重的中位数相同。

ranksumx,by(group)

Test:Equalityofmedians(Two-SampleWilcoxonRank-Sum)

                                                                

SumofRanks:49.5(group==2)

ExpectedSum:70                                                                                                  

           

z-statistic-1.73

Prob>|z|0.0832                                                                                                

①为第二组(低饲料组)的秩的和;②若无效假设成立,则第二组的秩的和期望值为70;③秩和统计检验量z;④对于无效假设Ho对应的p值。

 在本例中,虽然第二组的秩和为49.5而期望值估计为70,但p值为0.0832,所以根据该资料和统计结果一般不能认为 用高蛋白饲料喂养能明显增加雌鼠的体重。

·       多组资料中位数比较(完全随机化设计资料的检验)

 对于完全随机化设计资料的比较,若各组资料不全服从正态分布(即:至少有一组的资料均不服从正态分布)或各组的资料方差不齐性,则可以用KruskalandWallis方法进行检验(Ho:各组的中位数相同)。STATA命令为:

kwallis 观察变量,by(分组变量)

例:505组,10鼠。后,(mg/g)示:(法,编,p220)xgroup=123455组。

x:

2.23

1.14

2.63

1

1.35

2.01

1.64

1.13

1.01

1.70

group:

1

1

1

1

1

1

1

1

1

1

x:

5.59

0.96

6.96

1.23

1.61

2.94

1.96

3.68

1.54

2.59

group:

2

2

2

2

2

2

2

2

2

2

x:

4.5

3.92

10.33

8.23

2.07

4.9

6.84

6.42

3.72

6

group:

3

3

3

3

3

3

3

3

3

3

x:

1.35

1.06

0.74

0.96

1.16

2.08

0.69

0.68

0.84

1.34

group:

4

4

4

4

4

4

4

4

4

4

x:

1.4

1.51

2.49

1.74

1.59

1.36

3

4.81

5.21

5.12

group:

5

5

5

5

5

5

5

5

5

5

kwallis x,by(group)

Test:Equalityofpopulations(Kruskal-WallisTest)

                                            

group_Obs_RankSum

110188.50

210280.50

310420.00

41095.00

510291.00

chi-squared=27.856with4d.f.                                    

probability=0.0001                              

①为各组的秩和值;②为该统计量的c2检验值;③为无效假设检验所对应的p值。

 本例结果表明:5组的中位数有显著的差异。即:5 个不同饲料组的小鼠肝脏中铁的含量有显著差异,说明小鼠肝脏中铁的含量与喂养的饲料有关。

版权声明:
本网站所有内容来源注明为“梅斯医学”或“MedSci原创”的文字、图片和音视频资料,版权均属于梅斯医学所有。非经授权,任何媒体、网站或个人不得转载,授权转载时须注明来源为“梅斯医学”。其它来源的文章系转载文章,或“梅斯号”自媒体发布的文章,仅系出于传递更多信息之目的,本站仅负责审核内容合规,其内容不代表本站立场,本站不负责内容的准确性和版权。如果存在侵权、或不希望被转载的媒体或个人可与我们联系,我们将立即进行删除处理。
在此留言
评论区 (4)
#插入话题
  1. [GetPortalCommentsPageByObjectIdResponse(id=2045915, encodeId=f3c52045915ea, content=<a href='/topic/show?id=7e8e99343d4' target=_blank style='color:#2F92EE;'>#非参数检验#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=74, replyNumber=0, topicName=null, topicId=null, topicList=[TopicDto(id=99343, encryptionId=7e8e99343d4, topicName=非参数检验)], attachment=null, authenticateStatus=null, createdAvatar=, createdBy=2ba9118, createdName=makuansheng, createdTime=Sun Jul 15 23:44:00 CST 2012, time=2012-07-15, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=2075707, encodeId=d22120e5707a3, content=<a href='/topic/show?id=27dd993421f' target=_blank style='color:#2F92EE;'>#非参数#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=66, replyNumber=0, topicName=null, topicId=null, topicList=[TopicDto(id=99342, encryptionId=27dd993421f, topicName=非参数)], attachment=null, authenticateStatus=null, createdAvatar=, createdBy=af68384, createdName=hanhaisha2008, createdTime=Wed Aug 15 13:44:00 CST 2012, time=2012-08-15, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=1465969, encodeId=9a2b1465969a5, content=<a href='/topic/show?id=217c292009' target=_blank style='color:#2F92EE;'>#ATA#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=64, replyNumber=0, topicName=null, topicId=null, topicList=[TopicDto(id=2920, encryptionId=217c292009, topicName=ATA)], attachment=null, authenticateStatus=null, createdAvatar=, createdBy=387a6772119, createdName=bbjsj_1981, createdTime=Thu Apr 19 08:44:00 CST 2012, time=2012-04-19, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=1487400, encodeId=eb54148e400e2, content=<a href='/topic/show?id=7cea16e605a' target=_blank style='color:#2F92EE;'>#stata#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=72, replyNumber=0, topicName=null, topicId=null, topicList=[TopicDto(id=16760, encryptionId=7cea16e605a, topicName=stata)], attachment=null, authenticateStatus=null, createdAvatar=null, createdBy=e76d8309257, createdName=李研东, createdTime=Thu Apr 19 08:44:00 CST 2012, time=2012-04-19, status=1, ipAttribution=)]
  2. [GetPortalCommentsPageByObjectIdResponse(id=2045915, encodeId=f3c52045915ea, content=<a href='/topic/show?id=7e8e99343d4' target=_blank style='color:#2F92EE;'>#非参数检验#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=74, replyNumber=0, topicName=null, topicId=null, topicList=[TopicDto(id=99343, encryptionId=7e8e99343d4, topicName=非参数检验)], attachment=null, authenticateStatus=null, createdAvatar=, createdBy=2ba9118, createdName=makuansheng, createdTime=Sun Jul 15 23:44:00 CST 2012, time=2012-07-15, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=2075707, encodeId=d22120e5707a3, content=<a href='/topic/show?id=27dd993421f' target=_blank style='color:#2F92EE;'>#非参数#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=66, replyNumber=0, topicName=null, topicId=null, topicList=[TopicDto(id=99342, encryptionId=27dd993421f, topicName=非参数)], attachment=null, authenticateStatus=null, createdAvatar=, createdBy=af68384, createdName=hanhaisha2008, createdTime=Wed Aug 15 13:44:00 CST 2012, time=2012-08-15, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=1465969, encodeId=9a2b1465969a5, content=<a href='/topic/show?id=217c292009' target=_blank style='color:#2F92EE;'>#ATA#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=64, replyNumber=0, topicName=null, topicId=null, topicList=[TopicDto(id=2920, encryptionId=217c292009, topicName=ATA)], attachment=null, authenticateStatus=null, createdAvatar=, createdBy=387a6772119, createdName=bbjsj_1981, createdTime=Thu Apr 19 08:44:00 CST 2012, time=2012-04-19, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=1487400, encodeId=eb54148e400e2, content=<a href='/topic/show?id=7cea16e605a' target=_blank style='color:#2F92EE;'>#stata#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=72, replyNumber=0, topicName=null, topicId=null, topicList=[TopicDto(id=16760, encryptionId=7cea16e605a, topicName=stata)], attachment=null, authenticateStatus=null, createdAvatar=null, createdBy=e76d8309257, createdName=李研东, createdTime=Thu Apr 19 08:44:00 CST 2012, time=2012-04-19, status=1, ipAttribution=)]
  3. [GetPortalCommentsPageByObjectIdResponse(id=2045915, encodeId=f3c52045915ea, content=<a href='/topic/show?id=7e8e99343d4' target=_blank style='color:#2F92EE;'>#非参数检验#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=74, replyNumber=0, topicName=null, topicId=null, topicList=[TopicDto(id=99343, encryptionId=7e8e99343d4, topicName=非参数检验)], attachment=null, authenticateStatus=null, createdAvatar=, createdBy=2ba9118, createdName=makuansheng, createdTime=Sun Jul 15 23:44:00 CST 2012, time=2012-07-15, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=2075707, encodeId=d22120e5707a3, content=<a href='/topic/show?id=27dd993421f' target=_blank style='color:#2F92EE;'>#非参数#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=66, replyNumber=0, topicName=null, topicId=null, topicList=[TopicDto(id=99342, encryptionId=27dd993421f, topicName=非参数)], attachment=null, authenticateStatus=null, createdAvatar=, createdBy=af68384, createdName=hanhaisha2008, createdTime=Wed Aug 15 13:44:00 CST 2012, time=2012-08-15, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=1465969, encodeId=9a2b1465969a5, content=<a href='/topic/show?id=217c292009' target=_blank style='color:#2F92EE;'>#ATA#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=64, replyNumber=0, topicName=null, topicId=null, topicList=[TopicDto(id=2920, encryptionId=217c292009, topicName=ATA)], attachment=null, authenticateStatus=null, createdAvatar=, createdBy=387a6772119, createdName=bbjsj_1981, createdTime=Thu Apr 19 08:44:00 CST 2012, time=2012-04-19, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=1487400, encodeId=eb54148e400e2, content=<a href='/topic/show?id=7cea16e605a' target=_blank style='color:#2F92EE;'>#stata#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=72, replyNumber=0, topicName=null, topicId=null, topicList=[TopicDto(id=16760, encryptionId=7cea16e605a, topicName=stata)], attachment=null, authenticateStatus=null, createdAvatar=null, createdBy=e76d8309257, createdName=李研东, createdTime=Thu Apr 19 08:44:00 CST 2012, time=2012-04-19, status=1, ipAttribution=)]
    2012-04-19 bbjsj_1981
  4. [GetPortalCommentsPageByObjectIdResponse(id=2045915, encodeId=f3c52045915ea, content=<a href='/topic/show?id=7e8e99343d4' target=_blank style='color:#2F92EE;'>#非参数检验#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=74, replyNumber=0, topicName=null, topicId=null, topicList=[TopicDto(id=99343, encryptionId=7e8e99343d4, topicName=非参数检验)], attachment=null, authenticateStatus=null, createdAvatar=, createdBy=2ba9118, createdName=makuansheng, createdTime=Sun Jul 15 23:44:00 CST 2012, time=2012-07-15, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=2075707, encodeId=d22120e5707a3, content=<a href='/topic/show?id=27dd993421f' target=_blank style='color:#2F92EE;'>#非参数#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=66, replyNumber=0, topicName=null, topicId=null, topicList=[TopicDto(id=99342, encryptionId=27dd993421f, topicName=非参数)], attachment=null, authenticateStatus=null, createdAvatar=, createdBy=af68384, createdName=hanhaisha2008, createdTime=Wed Aug 15 13:44:00 CST 2012, time=2012-08-15, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=1465969, encodeId=9a2b1465969a5, content=<a href='/topic/show?id=217c292009' target=_blank style='color:#2F92EE;'>#ATA#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=64, replyNumber=0, topicName=null, topicId=null, topicList=[TopicDto(id=2920, encryptionId=217c292009, topicName=ATA)], attachment=null, authenticateStatus=null, createdAvatar=, createdBy=387a6772119, createdName=bbjsj_1981, createdTime=Thu Apr 19 08:44:00 CST 2012, time=2012-04-19, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=1487400, encodeId=eb54148e400e2, content=<a href='/topic/show?id=7cea16e605a' target=_blank style='color:#2F92EE;'>#stata#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=72, replyNumber=0, topicName=null, topicId=null, topicList=[TopicDto(id=16760, encryptionId=7cea16e605a, topicName=stata)], attachment=null, authenticateStatus=null, createdAvatar=null, createdBy=e76d8309257, createdName=李研东, createdTime=Thu Apr 19 08:44:00 CST 2012, time=2012-04-19, status=1, ipAttribution=)]
    2012-04-19 李研东

相关资讯

Stata 第一章数据输入,存盘和调用文件命令以及数据管理命令

 本 节  STATA 命 令 摘 要[ [1] ]  输 入 数 据 命 令: 1) input    变量名1 变量名2 … 变量名m    ( 各 变 量 数 据 之 间 用 空 格 隔 开, 每 行 一 个 记 录, 最 后 以  end  表 示 结 束) 2)in

第二章 描述性统计命令与输出结果说明

本 节STATA  命 令 摘 要 by   分组变量:]summarize 变 量 名1  变 量 名2  …    变 量 名m[,detail] ci 变 量 名1  变 量 名2  …    变 量 名m  [, level(#)

第一章 Stata 概貌

  第一章 Stata 概貌 §1.1 Stata的功能、特点和背景 Stata是一个用于分析和管理数据的功能强大又小巧玲珑的实用统计分析软件,由美国计算机资源中心(Computer Resource Center)研制。从1985至1998的十四年时间里,已连续推出1.1,1.2,1.3,1.4,1.5,……及2.0,2.1,3.0,3.1,4.0,5.0,6.0等多个版本,通过

第三章 正态检验与作图命令

本 节STATA  命 令 摘 要 swilk  变 量 名1  变 量 名2  …    变 量 名m graph 变量名  [, bin(#) ] graph  变量名1  变量名2[, 连接设置  曲线上符号设置] ·   &nb

第四章 t检验和单因素方差分析(上)

本 节STATA  命 令 摘 要 ttest  varname = #                        &

Stata第四章 t检验和单因素方差分析(下)

·单因素方差分析  单因素方差分析又称为OnewayANOVA,用于比较多组样本的均数是否相同,并假定:每组的数据

Baidu
map
Baidu
map
Baidu
map