DATA2002 - WEEK 8

ANNOVA CONTRASTS

 

But we may not interest in every group, t-test for individual contrasts are as followed.

Confidence Intervals

Multiple comparisons: simultaneous confidence intervals

 se = sqrt(sig_sq_hat * ((1/n_i[1]) + (1/n_i[2])))

int.95.indiv = ybar_i[1] - ybar_i[2] + c(-1,1) * t_star * se

 画图上面那组看overlap,下面那组看0是否在范围内。

However, we have constructed each interval without taking any regard of the others.

 

 

 

I.Relaxing the equal variance assumption 

 

 II Relaxing the normality assumption

A weaker set of assumptions at least under the null hypothesis is that: All observations come from the same distribution

permutation test

check nomality发现不nomal

library(ggfortify)
autoplot(rugby_anova, which = 2)
B = 2000
f_stat = vector(mode = "numeric", length = B)
for (i in 1:B){
  permuted_anova = aov(sample(rugby$Time)  ~ factor(rugby$Game))
  f_stat[i] = broom::tidy(permuted_anova)$statistic[1]
}

rugby_anova = aov(Time ~ factor(Game), data = rugby)
t0 = anova(rugby_anova)[1,4]
mean(f_stat >= t_0)

 

 

kruskal.test()

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值