我对summary.lm()
输出有疑问。
首先,这里是我的数据集的可重现代码:
Cond_Per_Row_stats<-structure(list(Participant = structure(c(1L, 2L, 3L, 4L, 5L,
6L, 7L, 8L, 9L, 10L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L,
1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 1L, 2L, 3L, 4L, 5L,
6L, 7L, 8L, 9L, 10L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L,
1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 1L, 2L, 3L, 4L, 5L,
6L, 7L, 8L, 9L, 10L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L,
1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 1L, 2L, 3L, 4L, 5L,
6L, 7L, 8L, 9L, 10L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L,
1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 1L, 2L, 3L, 4L, 5L,
6L, 7L, 8L, 9L, 10L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L,
1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 1L, 2L, 3L, 4L, 5L,
6L, 7L, 8L, 9L, 10L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L,
1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 1L, 2L, 3L, 4L, 5L,
6L, 7L, 8L, 9L, 10L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L,
1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 1L, 2L, 3L, 4L, 5L,
6L, 7L, 8L, 9L, 10L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L,
1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 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, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 11L,
11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 12L, 12L, 12L,
12L, 12L, 12L, 12L, 12L, 12L, 12L, 25L, 25L, 25L, 25L, 25L,
25L, 25L, 25L, 25L, 25L, 26L, 26L, 26L, 26L, 26L, 26L, 26L,
26L, 26L, 26L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 6L,
6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 15L, 15L, 15L, 15L, 15L,
15L, 15L, 15L, 15L, 15L, 16L, 16L, 16L, 16L, 16L, 16L, 16L,
16L, 16L, 16L, 23L, 23L, 23L, 23L, 23L, 23L, 23L, 23L, 23L,
23L, 24L, 24L, 24L, 24L, 24L, 24L, 24L, 24L, 24L, 24L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L,
4L, 4L, 4L, 4L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L,
13L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 29L,
29L, 29L, 29L, 29L, 29L, 29L, 29L, 29L, 29L, 30L, 30L, 30L,
30L, 30L, 30L, 30L, 30L, 30L, 30L, 9L, 9L, 9L, 9L, 9L, 9L,
9L, 9L, 9L, 9L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L,
10L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 20L,
20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 27L, 27L, 27L,
27L, 27L, 27L, 27L, 27L, 27L, 27L, 28L, 28L, 28L, 28L, 28L,
28L, 28L, 28L, 28L, 28L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L,
7L, 7L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 17L, 17L,
17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 18L, 18L, 18L, 18L,
18L, 18L, 18L, 18L, 18L, 18L), .Label = c("P0.0np1200.0",
"P0.0np50.0", "P3np1200.0", "P3np50.0", "P35np1200.0", "P35np50.0",
"P4np1200.0", "P4np50.0", "P45np1200.0", "P45np50.0", "P0.0tp1200.0",
"P0.0tp50.0", "P3tp1200.0", "P3tp50.0", "P35tp1200.0", "P35tp50.0",
"P4tp1200.0", "P4tp50.0", "P45tp1200.0", "P45tp50.0", "P0.0fp1200.0",
"P0.0fp50.0", "P3fp1200.0", "P3fp50.0", "P35fp1200.0", "P35fp50.0",
"P4fp1200.0", "P4fp50.0", "P45fp1200.0", "P45fp50.0"), class = "factor"),
Accuracy = c(0.785398163397448, 0.523598775598299, 0.785398163397448,
0.523598775598299, 0.785398163397448, 0.869122203007293,
0.955316618124509, 0.785398163397448, 0.615479708670387,
0.701674123787604, 1.15026199151093, 1.15026199151093, 0.869122203007293,
0.523598775598299, 0.701674123787604, 0.701674123787604,
0.955316618124509, 0.701674123787604, 0.955316618124509,
0.615479708670387, 0.955316618124509, 0.785398163397448,
0.701674123787604, 0.869122203007293, 0.785398163397448,
0.615479708670387, 0.615479708670387, 0.869122203007293,
0.701674123787604, 0.615479708670387, 1.0471975511966, 0.869122203007293,
0.615479708670387, 0.615479708670387, 0.869122203007293,
0.701674123787604, 0.701674123787604, 0.869122203007293,
0.785398163397448, 0.869122203007293, 1.0471975511966, 0.955316618124509,
0.523598775598299, 1.0471975511966, 0.615479708670387, 0.955316618124509,
0.615479708670387, 0.785398163397448, 0.955316618124509,
0.785398163397448, 0.701674123787604, 0.615479708670387,
0.615479708670387, 0.955316618124509, 0.869122203007293,
0.869122203007293, 1.0471975511966, 0.785398163397448, 0.701674123787604,
0.785398163397448, 1.0471975511966, 0.911738290968488, 1.00028587904971,
0.827113206702756, 0.785398163397448, 1.00028587904971, 1.09681145610345,
1.00028587904971, 1.0471975511966, 1.09681145610345, 1.0471975511966,
0.827113206702756, 1.0471975511966, 0.420534335283965, 0.659058035826409,
1.0471975511966, 0.869122203007293, 1.0471975511966, 0.869122203007293,
0.785398163397448, 1.09681145610345, 0.785398163397448, 0.955316618124509,
0.911738290968488, 0.911738290968488, 1.00028587904971, 1.20942920288819,
1.15026199151093, 1.00028587904971, 1.20942920288819, 1.09681145610345,
1.0471975511966, 0.911738290968488, 0.827113206702756, 1.00028587904971,
0.969532110115768, 1.09681145610345, 1.00028587904971, 0.785398163397448,
1.09681145610345, 1.09681145610345, 0.869122203007293, 0.743683120092141,
0.869122203007293, 0.869122203007293, 1.0471975511966, 1.00028587904971,
1.09681145610345, 1.36522739563372, 1.00028587904971, 1.15026199151093,
0.869122203007293, 0.570510447745185, 1.20942920288819, 1.0471975511966,
0.955316618124509, 0.827113206702756, 1.00028587904971, 1.00028587904971,
1.0471975511966, 0.955316618124509, 0.911738290968488, 0.911738290968488,
0.570510447745185, 0.869122203007293, 1.00028587904971, 0.869122203007293,
0.785398163397448, 0.911738290968488, 0.869122203007293,
0.785398163397448, 0.701674123787604, 1.00028587904971, 0.420534335283965,
0.570510447745185, 0.969532110115768, 0.869122203007293,
0.911738290968488, 1.0471975511966, 0.785398163397448, 0.955316618124509,
0.827113206702756, 0.827113206702756, 0.659058035826409,
0.955316618124509, 0.701674123787604, 0.785398163397448,
0.785398163397448, 1.09681145610345, 1.0471975511966, 0.869122203007293,
0.827113206702756, 0.911738290968488, 0.827113206702756,
0.785398163397448, 0.827113206702756, 1.00028587904971, 0.911738290968488,
1.09681145610345, 0.955316618124509, 0.955316618124509, 1.15026199151093,
0.785398163397448, 0.955316618124509, 0.911738290968488,
1.0471975511966, 0.869122203007293, 0.869122203007293, 0.911738290968488,
0.955316618124509, 0.955316618124509, 0.827113206702756,
0.785398163397448, 0.869122203007293, 0.955316618124509,
0.684719203002283, 0.827113206702756, 1.00028587904971, 0.785398163397448,
0.827113206702756, 1.27795355506632, 1.20942920288819, 1.27795355506632,
1.00028587904971, 0.869122203007293, 1.15026199151093, 1.36522739563372,
1.27795355506632, 1.5707963267949, 1.5707963267949, 1.5707963267949,
1.27795355506632, 1.20942920288819, 0.911738290968488, 0.659058035826409,
1.36522739563372, 1.20942920288819, 1.36522739563372, 1.36522739563372,
1.27795355506632, 1.20942920288819, 1.0471975511966, 1.15026199151093,
1.15026199151093, 0.869122203007293, 1.27795355506632, 1.36522739563372,
1.27795355506632, 1.09681145610345, 1.36522739563372, 1.27795355506632,
1.00028587904971, 1.27795355506632, 1.15026199151093, 1.00028587904971,
1.36522739563372, 1.09681145610345, 1.15026199151093, 1.15026199151093,
1.36522739563372, 1.5707963267949, 1.5707963267949, 0.869122203007293,
1.09681145610345, 1.20942920288819, 1.36522739563372, 1.27795355506632,
1.27795355506632, 1.36522739563372, 1.5707963267949, 1.5707963267949,
1.15026199151093, 0.911738290968488, 1.20942920288819, 1.20942920288819,
1.28403977458335, 1.20942920288819, 1.36522739563372, 1.27795355506632,
1.36522739563372, 1.20942920288819, 0.911738290968488, 1.20942920288819,
1.0471975511966, 0.827113206702756, 1.5707963267949, 1.0471975511966,
1.0471975511966, 1.15026199151093, 1.27795355506632, 1.15026199151093,
1.00028587904971, 1.20942920288819, 0.659058035826409, 0.785398163397448,
1.09681145610345, 1.20942920288819, 0.827113206702756, 1.0471975511966,
1.20942920288819, 1.5707963267949, 0.955316618124509, 1.0471975511966,
1.0471975511966, 0.869122203007293, 1.20942920288819, 1.27795355506632,
1.09681145610345, 1.0471975511966, 1.5707963267949, 1.27795355506632,
0.869122203007293, 1.00028587904971, 0.911738290968488, 0.911738290968488,
1.00028587904971, 1.20942920288819, 1.20942920288819, 1.00028587904971,
1.36522739563372, 1.0471975511966, 1.09681145610345, 0.827113206702756,
1.15026199151093, 1.09681145610345, 1.27795355506632, 1.36522739563372,
1.36522739563372, 1.36522739563372, 1.15026199151093, 1.27795355506632,
0.955316618124509, 0.701674123787604, 1.09681145610345, 1.00028587904971,
1.20942920288819, 1.20942920288819, 1.20942920288819, 1.00028587904971,
1.36522739563372)), .Names = c("Participant", "Coherence",
"PrimeType", "PrimeDuration", "Condition", "Accuracy"), row.names = c(20L,
21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 49L, 50L, 51L, 52L,
53L, 54L, 55L, 56L, 57L, 58L, 78L, 79L, 80L, 81L, 82L, 83L, 84L,
85L, 86L, 87L, 107L, 108L, 109L, 110L, 111L, 112L, 113L, 114L,
115L, 116L, 136L, 137L, 138L, 139L, 140L, 141L, 142L, 143L, 144L,
145L, 165L, 166L, 167L, 168L, 169L, 170L, 171L, 172L, 173L, 174L,
194L, 195L, 196L, 197L, 198L, 199L, 200L, 201L, 202L, 203L, 223L,
224L, 225L, 226L, 227L, 228L, 229L, 230L, 231L, 232L, 252L, 253L,
254L, 255L, 256L, 257L, 258L, 259L, 260L, 261L, 281L, 282L, 283L,
284L, 285L, 286L, 287L, 288L, 289L, 290L, 310L, 311L, 312L, 313L,
314L, 315L, 316L, 317L, 318L, 319L, 339L, 340L, 341L, 342L, 343L,
344L, 345L, 346L, 347L, 348L, 368L, 369L, 370L, 371L, 372L, 373L,
374L, 375L, 376L, 377L, 397L, 398L, 399L, 400L, 401L, 402L, 403L,
404L, 405L, 406L, 426L, 427L, 428L, 429L, 430L, 431L, 432L, 433L,
434L, 435L, 455L, 456L, 457L, 458L, 459L, 460L, 461L, 462L, 463L,
464L, 484L, 485L, 486L, 487L, 488L, 489L, 490L, 491L, 492L, 493L,
513L, 514L, 515L, 516L, 517L, 518L, 519L, 520L, 521L, 522L, 542L,
543L, 544L, 545L, 546L, 547L, 548L, 549L, 550L, 551L, 571L, 572L,
573L, 574L, 575L, 576L, 577L, 578L, 579L, 580L, 600L, 601L, 602L,
603L, 604L, 605L, 606L, 607L, 608L, 609L, 629L, 630L, 631L, 632L,
633L, 634L, 635L, 636L, 637L, 638L, 658L, 659L, 660L, 661L, 662L,
663L, 664L, 665L, 666L, 667L, 687L, 688L, 689L, 690L, 691L, 692L,
693L, 694L, 695L, 696L, 716L, 717L, 718L, 719L, 720L, 721L, 722L,
723L, 724L, 725L, 745L, 746L, 747L, 748L, 749L, 750L, 751L, 752L,
753L, 754L, 774L, 775L, 776L, 777L, 778L, 779L, 780L, 781L, 782L,
783L, 803L, 804L, 805L, 806L, 807L, 808L, 809L, 810L, 811L, 812L,
832L, 833L, 834L, 835L, 836L, 837L, 838L, 839L, 840L, 841L, 861L,
862L, 863L, 864L, 865L, 866L, 867L, 868L, 869L, 870L), class = "data.frame")
(注意:这里值得注意的是,在创建可重现代码之前,我将参与者更改为一个因素。这是为了确保aov
的输出与类型的输出匹配III ezANOVA
。这确实会影响aov
的输出,使其与summary.lm()
不兼容。但是,使用aov
运行重复测量时,这似乎是不可避免的。请参阅{ {3}}对于某些情况。)
然后我在条件中更改因子级别,如下所示:
Cond_Per_Row_stats$Condition <- factor (Cond_Per_Row_stats$Condition, levels = c("P0.0np1200.0", "P0.0np50.0",
"P3np1200.0", "P3np50.0",
"P35np1200.0", "P35np50.0",
"P4np1200.0", "P4np50.0",
"P45np1200.0", "P45np50.0",
"P0.0tp1200.0", "P0.0tp50.0",
"P3tp1200.0", "P3tp50.0",
"P35tp1200.0", "P35tp50.0",
"P4tp1200.0", "P4tp50.0",
"P45tp1200.0", "P45tp50.0",
"P0.0fp1200.0", "P0.0fp50.0",
"P3fp1200.0", "P3fp50.0",
"P35fp1200.0", "P35fp50.0",
"P4fp1200.0", "P4fp50.0",
"P45fp1200.0", "P45fp50.0"
))
Cond_Per_Row_stats <- Cond_Per_Row_stats[order(Cond_Per_Row_stats$Condition),]
我重复测量aov:
aovModel <- aov(Accuracy ~ (Coherence * PrimeDuration * PrimeType) + Error(Participant/(Coherence * PrimeDuration * PrimeType)), data = Cond_Per_Row_stats)
summary(aovModel)
使用此输出:
Error: Participant
Df Sum Sq Mean Sq F value Pr(>F)
Residuals 9 2.045 0.2272
Error: Participant:Coherence
Df Sum Sq Mean Sq F value Pr(>F)
Coherence 4 7.800 1.9499 66.3 4.18e-16 ***
Residuals 36 1.059 0.0294
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Error: Participant:PrimeDuration
Df Sum Sq Mean Sq F value Pr(>F)
PrimeDuration 1 0.10509 0.10509 10.91 0.00918 **
Residuals 9 0.08668 0.00963
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Error: Participant:PrimeType
Df Sum Sq Mean Sq F value Pr(>F)
PrimeType 2 0.137 0.06850 0.763 0.481
Residuals 18 1.617 0.08981
Error: Participant:Coherence:PrimeDuration
Df Sum Sq Mean Sq F value Pr(>F)
Coherence:PrimeDuration 4 0.1355 0.03387 2.443 0.0643 .
Residuals 36 0.4992 0.01387
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Error: Participant:Coherence:PrimeType
Df Sum Sq Mean Sq F value Pr(>F)
Coherence:PrimeType 8 0.1439 0.01798 1.084 0.384
Residuals 72 1.1943 0.01659
Error: Participant:PrimeDuration:PrimeType
Df Sum Sq Mean Sq F value Pr(>F)
PrimeDuration:PrimeType 2 0.0296 0.01481 0.563 0.579
Residuals 18 0.4733 0.02629
Error: Participant:Coherence:PrimeDuration:PrimeType
Df Sum Sq Mean Sq F value Pr(>F)
Coherence:PrimeDuration:PrimeType 8 0.0979 0.01223 0.884 0.534
Residuals 72 0.9965 0.01384
接下来,我试图进行有计划的对比,以及我遇到问题的地方。首先我要使用:
summary.lm(aovModel)
但重复测量模型的输出不兼容:
Error in if (p == 0) { : argument is of length zero
当我只是想要模型的摘要时,这不是一个大问题,我可以使用summary(aovModel)
并检查那里的SS,F值等。当我想使用summary.lm()
总结计划的对比时,这是一个问题。
例如,正如您从数据框中看到的那样,有30个条件。这是我试图创建计划对比的代码,其中10 np条件是控件,剩余条件在contrast1
中与它们进行比较,然后我将tp和fp条件与每个条件进行比较contrast2
中的其他人:
contrast1<-c(-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10)
contrast2<-c(0,0,0,0,0,0,0,0,0,0,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,10,10,10,10,10,10,10,10,10,10)
contrasts(Cond_Per_Row_stats$Condition)<-cbind(contrast1, contrast2)
Cond_Per_Row_stats$Condition
aovModelContrastCondition <- aov(Accuracy ~ (Coherence * PrimeDuration * PrimeType) + Error(Participant/(Coherence * PrimeDuration * PrimeType)), data = Cond_Per_Row_stats)
summary.lm(aovModelContrastCondition)
此处的summary.lm()输出会产生与上述相同的错误。
但是,如果我运行以下代码直接调用一个部分:
summary.lm(aovModelContrastCondition$'Participant:Coherence:PrimeDuration:PrimeType')
我得到了这个输出:
Residuals:
Min 1Q Median 3Q Max
-0.23063 -0.08368 -0.02695 0.06902 0.27561
Coefficients:
Estimate Std. Error t value Pr(>|t|)
CoherenceP3:PrimeDuration50ms:PrimeTypenp 0.15288 0.10522 1.453 0.1506
CoherenceP35:PrimeDuration50ms:PrimeTypenp 0.13600 0.10522 1.293 0.2003
CoherenceP4:PrimeDuration50ms:PrimeTypenp 0.07323 0.10522 0.696 0.4887
CoherenceP45:PrimeDuration50ms:PrimeTypenp 0.09476 0.10522 0.901 0.3708
CoherenceP3:PrimeDuration50ms:PrimeTypetp 0.10329 0.10522 0.982 0.3296
CoherenceP35:PrimeDuration50ms:PrimeTypetp 0.22469 0.10522 2.135 0.0361 *
CoherenceP4:PrimeDuration50ms:PrimeTypetp 0.17215 0.10522 1.636 0.1062
CoherenceP45:PrimeDuration50ms:PrimeTypetp 0.10710 0.10522 1.018 0.3122
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.1176 on 72 degrees of freedom
Multiple R-squared: 0.08646, Adjusted R-squared: -0.002361
F-statistic: 0.9734 on 7 and 72 DF, p-value: 0.4572
基本上我并不完全确定我在这里看到的内容(特别是考虑到我如何设置contrast1
和contrast2
)。我在主题设计之间看到的计划对比的例子,因此在进行重复测量方差分析时没有解决summary.lm()
的问题。
是否有人在使用summary.lm()重复测量计划对比时有任何经验或诀窍?或者是否有另一种方法可以使用aov
在重复测量方差分析中查看计划对比的结果?
提前致谢。
答案 0 :(得分:2)
emmeans
包可以处理aovlist
个对象(和many others)并计算您的自定义对比度。
首先,我们使用正交对比拟合重复测量方差分析。
library("emmeans")
# set orthogonal contrasts
options(contrasts = c("contr.sum", "contr.poly"))
aovModel <- aov(Accuracy ~ Coherence * PrimeDuration * PrimeType +
Error(Participant / (Coherence * PrimeDuration * PrimeType)),
data = Cond_Per_Row_stats)
现在,我们创建一个emmGrid
对象,并使用emmeans()
函数查看估计的边际均值(EMM)。
emm <- emmeans(aovModel, ~ Coherence * PrimeDuration * PrimeType)
emm
## Coherence PrimeDuration PrimeType emmean SE df lower.CL upper.CL
## P0.0 1200ms fp 0.7330383 0.05433093 91.44 0.6251235 0.8409531
## P3 1200ms fp 0.8654093 0.05433093 91.44 0.7574945 0.9733241
## P35 1200ms fp 0.9813125 0.05433093 91.44 0.8733977 1.0892273
## P4 1200ms fp 1.1298314 0.05433093 91.44 1.0219167 1.2377462
## P45 1200ms fp 1.2569780 0.05433093 91.44 1.1490632 1.3648928
## P0.0 50ms fp 0.8324380 0.05433093 91.44 0.7245232 0.9403528
## P3 50ms fp 0.8061391 0.05433093 91.44 0.6982243 0.9140539
## P35 50ms fp 0.8619138 0.05433093 91.44 0.7539990 0.9698286
## P4 50ms fp 1.0194414 0.05433093 91.44 0.9115266 1.1273562
## P45 50ms fp 1.2212040 0.05433093 91.44 1.1132892 1.3291188
## P0.0 1200ms np 0.7514145 0.05433093 91.44 0.6434997 0.8593293
## P3 1200ms np 0.8640397 0.05433093 91.44 0.7561249 0.9719545
## P35 1200ms np 1.0230695 0.05433093 91.44 0.9151547 1.1309843
## P4 1200ms np 1.1691818 0.05433093 91.44 1.0612670 1.2770966
## P45 1200ms np 1.1809446 0.05433093 91.44 1.0730298 1.2888594
## P0.0 50ms np 0.7943392 0.05433093 91.44 0.6864244 0.9022540
## P3 50ms np 0.9011751 0.05433093 91.44 0.7932603 1.0090898
## P35 50ms np 0.9831985 0.05433093 91.44 0.8752838 1.0911133
## P4 50ms np 1.0755496 0.05433093 91.44 0.9676348 1.1834644
## P45 50ms np 1.1834531 0.05433093 91.44 1.0755383 1.2913679
## P0.0 1200ms tp 0.8285699 0.05433093 91.44 0.7206552 0.9364847
## P3 1200ms tp 0.9410529 0.05433093 91.44 0.8331381 1.0489676
## P35 1200ms tp 0.9957669 0.05433093 91.44 0.8878521 1.1036817
## P4 1200ms tp 1.1742093 0.05433093 91.44 1.0662945 1.2821241
## P45 1200ms tp 1.3174114 0.05433093 91.44 1.2094966 1.4253262
## P0.0 50ms tp 0.7945863 0.05433093 91.44 0.6866715 0.9025010
## P3 50ms tp 0.8516896 0.05433093 91.44 0.7437749 0.9596044
## P35 50ms tp 0.9676721 0.05433093 91.44 0.8597573 1.0755868
## P4 50ms tp 1.1025843 0.05433093 91.44 0.9946695 1.2104990
## P45 50ms tp 1.2553532 0.05433093 91.44 1.1474384 1.3632680
您的对比等同于以下假设:
考虑所有因素水平及其在emmGrid
对象中的顺序,我们可以将该假设等效表达为:
由此我们可以看到contrast1
和contrast2
所需的对比度权重:
contrast1 <- rep(c(-0.5, 1, -0.5) / 10, each = 10)
contrast2 <- rep(c(-1, 0, 1) / 10, each = 10)
我们现在可以使用contrast()
函数来计算您的自定义对比度并获取 p 值。
contrast(emm, list(c1 = contrast1,
c2 = contrast2))
## contrast estimate SE df t.ratio p.value
## c1 -0.004193526 0.03670287 18 -0.114 0.9103
## c2 0.052118996 0.04238082 18 1.230 0.2346
如果您只对与因子PrimeType
相关的对比度感兴趣,则按如下所示构造emmGrid
对象甚至更容易:
emm <- emmeans(aovModel, ~ PrimeType)
这对Coherence
和PrimeDuration
的水平进行隐式平均(这也由输出指示)。
emm
## PrimeType emmean SE df lower.CL upper.CL
## fp 0.9707706 0.03682466 21.98 0.8943978 1.047143
## np 0.9926366 0.03682466 21.98 0.9162638 1.069009
## tp 1.0228896 0.03682466 21.98 0.9465168 1.099262
##
## Results are averaged over the levels of: Coherence, PrimeDuration
然后我们可以通过以下方式为contrast1
和contrast2
指定对比度权重:
contrast1 <- c(-0.5, 1, -0.5)
contrast2 <- c(-1, 0, 1)
结果等于我们使用“更复杂”方法获得的结果。