如何按组对因变量进行 t 检验

问题描述

我想说明,两组(Experimentalgruppe 和 Kontrollgruppe)之间的最大摄氧量是否存在显着变化。 因此,我必须使用以下数据对依赖变量进行 zwo t 检验(在 t0/t1 和 t1/t2 之间):

# A tibble: 18 x 4
group              `t0 VO2 max` `t1 VO2 max` `t2 VO2 max`
<chr>                     <dbl>        <dbl>        <dbl>
1 Experimentalgruppe         47.6         47.9         48.7
2 Kontrollgruppe             47.6         46.5         43.0
3 Experimentalgruppe         47.6         48.7         48.7
4 Kontrollgruppe             46.8         47.6         46.2
5 Kontrollgruppe             44.6         46.2         47.9
6 Experimentalgruppe         41.3         42.1         42.4
7 Kontrollgruppe             38           40.7         38.6
8 Experimentalgruppe         43.5         44.6         42.7
9 Experimentalgruppe         41.9         43.2         43.8
10 Kontrollgruppe             45.1         47.9         49.2
11 Experimentalgruppe         44.1         44.3         44.9
12 Kontrollgruppe             28.5         30.9         30.3
13 Kontrollgruppe             38.6         41.6         42.1
14 Kontrollgruppe             44.6         45.4         47.6
15 Kontrollgruppe             40.4         43.0         42.4
16 Experimentalgruppe         32.6         33.3         33.3
17 Experimentalgruppe         40.4         38.6         43.0
18 Kontrollgruppe             44.3         40.1         42.7

dput 在这里:

> dput(data)
structure(list(group = c("Experimentalgruppe","Kontrollgruppe","Experimentalgruppe","Kontrollgruppe"),`t0 VO2 max` = c(47.6,47.6,46.7818181818182,44.6,41.3,38,43.5090909090909,41.8727272727273,45.1454545454545,44.0545454545455,28.475,38.6,40.4,32.6,44.3272727272727
),`t1 VO2 max` = c(47.8727272727273,46.5090909090909,48.6909090909091,46.2363636363636,42.1454545454545,40.7,43.2363636363636,47.8727272727273,44.3272727272727,30.9333333333333,41.6,45.4181818181818,42.9636363636364,33.2666666666667,40.1),`t2 VO2 max` = c(48.6909090909091,42.4181818181818,42.6909090909091,43.7818181818182,49.2363636363636,44.8727272727273,30.2666666666667,42.6909090909091)),row.names = c(NA,-18L),class = c("tbl_df","tbl","data.frame"))

因为我对 R 很陌生,所以我不知道如何做到这一点。

t.test(Vo2Max.Auswertung$`t1 VO2 max`,Vo2Max.Auswertung$`t2 VO2 max`,paired = TRUE,alternative = "less")

这是一个有效的 t 检验,但没有分为两组。我的错误在哪里?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)