全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
15533 4
2010-03-07
复制代码
tukey HSD 能这样做

请问

1-怎么做 fisher LSD 呢?

2-附件ws1sols第8,9页上的 table 要怎么做

3-输出能不能用***表示 siginicant? (附件ws1sols  第5,6页那样 )

4-standardised residual 要怎么得到  


谢谢


====================================

因为是 MAC 所以 SAS 不能用

我 想知道 SAS 里面这些功能 R 对应的 是那些 code ?

谢谢
附件列表

ws1.pdf

大小:89.21 KB

 马上下载

ws1sols.pdf

大小:99.14 KB

 马上下载

ws2.pdf

大小:79.83 KB

 马上下载

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2010-3-8 00:02:55
anyone?????

thanks!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2010-3-8 16:36:52
给个例子,希望有帮助

First, I perform the Tukey’s Test ,also called Tukey’s Honestly Significant Difference Test( abbreviated as HSD).
We already knew that the HSD test focuses on the experiment wise error rate, a, and assumes that the number of replicates at each level are equal. To use the function, an aov object is required as the first argument.

> #eg 3-1
> X=c(575,542,530,539,570,
+     565,593,590,579,610,
+     600,651,610,637,629,
+     725,700,715,685,710)
> A=factor(rep(1:4,each=5))
> #construct a data.frame
> shuju=data.frame(X,A)
> aov.shuju=aov(X~A,data=shuju)
> shuju.tukey=TukeyHSD(aov.shuju,ordered=T)
> shuju.tukey
  Tukey multiple comparisons of means
    95% family-wise confidence level
    factor levels have been ordered

Fit: aov(formula = X ~ A, data = shuju)

$A
     diff        lwr       upr     p adj
2-1  36.2   3.145624   69.25438   0.0294279
3-1  74.2   41.145624  107.25438  0.0000455
4-1  155.8  122.745624  188.85438  0.0000000
3-2  38.0   4.945624   71.05438    0.0215995
4-2  119.6   86.545624  152.65438  0.0000001
4-3  81.6   48.545624   114.65438  0.0000146


We can see immediately that all pairs of means are significantly different. Therefore, each power setting results in a mean etch rate that differs from the mean etch rate at any other power setting.
We also can plot the confidence intervals, which is more explicitly.


> plot(shuju.tukey)



Conclusions are the same as before.

Now we perform the LSD test to our above example. The LSD test essentially involves performing a series of pair wise t test. It is important to note that with LSD, we have to specify the individual error rate, not the experimentwise or family error rate.
Assume here that we wish to find the LSD between level 1 and 3.

> n1=sum(aov.shuju$model$A=='1')
> n1
[1] 5
> n3=sum(aov.shuju$model$A=='3')
> n3
[1] 5
> s=sqrt(sum((aov.shuju$residuals)^2)/aov.shuju$df.residual)
> s
[1] 18.26746
> s^2
[1] 333.7
> tcrit=qt(0.025,aov.shuju$df.residual,lower.tail=F)
> tcrit
[1] 2.119905
> LSD=tcrit*s*sqrt(1/n1+1/n3)
> LSD
[1] 24.49202
> #and
> y1.bar=sum(shuju$X[A=='1'])/5
> y1.bar
[1] 551.2
> y3.bar=sum(shuju$X[A=='3'])/5
> y3.bar
[1] 625.4
> y1.bar-y3.bar
[1] -74.2
>

Because   , so this implies that level 1 and level 3 ‘s means are significantly different. You can follow the exactly the same routine to compare the rest pair of means.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2010-3-9 20:42:33
davidhaitaopan 发表于 2010-3-8 16:36
给个例子,希望有帮助

First, I perform the Tukey’s Test ,also called Tukey’s Honestly Significant Difference Test( abbreviated as HSD).
We already knew that the HSD test focuses on the experiment wise error rate, a, and assumes that the number of replicates at each level are equal. To use the function, an aov object is required as the first argument.

> #eg 3-1
> X=c(575,542,530,539,570,
+     565,593,590,579,610,
+     600,651,610,637,629,
+     725,700,715,685,710)
> A=factor(rep(1:4,each=5))
> #construct a data.frame
> shuju=data.frame(X,A)
> aov.shuju=aov(X~A,data=shuju)
> shuju.tukey=TukeyHSD(aov.shuju,ordered=T)
> shuju.tukey
  Tukey multiple comparisons of means
    95% family-wise confidence level
    factor levels have been ordered

Fit: aov(formula = X ~ A, data = shuju)

$A
     diff        lwr       upr     p adj
2-1  36.2   3.145624   69.25438   0.0294279
3-1  74.2   41.145624  107.25438  0.0000455
4-1  155.8  122.745624  188.85438  0.0000000
3-2  38.0   4.945624   71.05438    0.0215995
4-2  119.6   86.545624  152.65438  0.0000001
4-3  81.6   48.545624   114.65438  0.0000146


We can see immediately that all pairs of means are significantly different. Therefore, each power setting results in a mean etch rate that differs from the mean etch rate at any other power setting.
We also can plot the confidence intervals, which is more explicitly.


> plot(shuju.tukey)



Conclusions are the same as before.

Now we perform the LSD test to our above example. The LSD test essentially involves performing a series of pair wise t test. It is important to note that with LSD, we have to specify the individual error rate, not the experimentwise or family error rate.
Assume here that we wish to find the LSD between level 1 and 3.

> n1=sum(aov.shuju$model$A=='1')
> n1
[1] 5
> n3=sum(aov.shuju$model$A=='3')
> n3
[1] 5
> s=sqrt(sum((aov.shuju$residuals)^2)/aov.shuju$df.residual)
> s
[1] 18.26746
> s^2
[1] 333.7
> tcrit=qt(0.025,aov.shuju$df.residual,lower.tail=F)
> tcrit
[1] 2.119905
> LSD=tcrit*s*sqrt(1/n1+1/n3)
> LSD
[1] 24.49202
> #and
> y1.bar=sum(shuju$X[A=='1'])/5
> y1.bar
[1] 551.2
> y3.bar=sum(shuju$X[A=='3'])/5
> y3.bar
[1] 625.4
> y1.bar-y3.bar
[1] -74.2
>

Because   , so this implies that level 1 and level 3 ‘s means are significantly different. You can follow the exactly the same routine to compare the rest pair of means.
也就是说  LSD 没有单独的 命令可以做啊?

谢谢
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2022-3-14 13:29:22
网页版SPSSAU可以做LSD以及其他事后多重比较。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群