library(tidyverse)
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ──
## ✔ ggplot2 3.3.6     ✔ purrr   0.3.4
## ✔ tibble  3.1.8     ✔ dplyr   1.0.9
## ✔ tidyr   1.2.0     ✔ stringr 1.4.0
## ✔ readr   2.1.2     ✔ forcats 0.5.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
library(ggpubr)
library(rstatix)
## 
## Attaching package: 'rstatix'
## The following object is masked from 'package:stats':
## 
##     filter
library(readxl)

dat <- read_excel("/Users/riku/Documents/koto_nobe_12nin.xlsx")


dat$id <- as.factor(dat$id)
dat$trueid <- as.factor(dat$trueid)

dat$task <- ordered(dat$task, levels=c("L","M","H"))
dat$proficiency <- as.factor(dat$proficiency)
dat$proficiency <- ordered(dat$proficiency, levels=c("lower","middle","upper"))


dat %>%
  group_by(task, proficiency) %>%
  get_summary_stats( type = "mean_sd")
## # A tibble: 36 × 6
##    task  proficiency variable     n    mean     sd
##    <ord> <ord>       <chr>    <dbl>   <dbl>  <dbl>
##  1 L     lower       koto        11  47.6    9.43 
##  2 L     lower       nobe        11  89.2   25.1  
##  3 L     lower       wariai      11   0.554  0.09 
##  4 L     lower       wariai2     11   3.59   0.278
##  5 L     middle      koto        12  56.9   18.2  
##  6 L     middle      nobe        12 115     49.5  
##  7 L     middle      wariai      12   0.529  0.097
##  8 L     middle      wariai2     12   3.77   0.548
##  9 L     upper       koto        12  60.3   13.7  
## 10 L     upper       nobe        12 127.    41.0  
## # … with 26 more rows
## # ℹ Use `print(n = ...)` to see more rows

1 Boxplot

bxp <- ggboxplot(
  dat, x = "task", y = "wariai", add = "jitter",
  color = "proficiency", palette = "uchicago"
)
bxp + ggtitle("Wariai")

bxp <- ggboxplot(
  dat, x = "task", y = "wariai2", add = "jitter",
  color = "proficiency", palette = "uchicago"
)
bxp + ggtitle("Wariai2")

bxp <- ggboxplot(
  dat, x = "task", y = "nobe", add = "jitter",
  color = "proficiency", palette = "uchicago"
)
bxp + ggtitle("Nobegosu")

bxp <- ggboxplot(
  dat, x = "task", y = "koto", add = "jitter",
  color = "proficiency", palette = "uchicago"
)
bxp + ggtitle("Kotonarugosu")

2 ANOVA Wariai

2.1 Check assumptions

dat %>%
  group_by(task, proficiency) %>%
  identify_outliers(wariai)
## # A tibble: 3 × 10
##   task  proficiency id    trueid  nobe  koto wariai wariai2 is.outlier is.extr…¹
##   <ord> <ord>       <fct> <fct>  <dbl> <dbl>  <dbl>   <dbl> <lgl>      <lgl>    
## 1 L     lower       32    33        36    28  0.778    3.30 TRUE       FALSE    
## 2 L     upper       34    35        70    45  0.643    3.80 TRUE       FALSE    
## 3 M     upper       11    11        98    59  0.602    4.21 TRUE       FALSE    
## # … with abbreviated variable name ¹​is.extreme
dat %>%
  group_by(task, proficiency) %>%
  shapiro_test(wariai)
## # A tibble: 9 × 5
##   task  proficiency variable statistic      p
##   <ord> <ord>       <chr>        <dbl>  <dbl>
## 1 L     lower       wariai       0.865 0.0664
## 2 L     middle      wariai       0.975 0.959 
## 3 L     upper       wariai       0.977 0.968 
## 4 M     lower       wariai       0.847 0.0392
## 5 M     middle      wariai       0.976 0.960 
## 6 M     upper       wariai       0.826 0.0190
## 7 H     lower       wariai       0.880 0.104 
## 8 H     middle      wariai       0.954 0.692 
## 9 H     upper       wariai       0.949 0.623
ggqqplot(dat, "wariai", ggtheme = theme_bw()) +
  facet_grid(task ~ proficiency)

dat %>%
  group_by(task) %>%
  levene_test(wariai ~ proficiency)
## # A tibble: 3 × 5
##   task    df1   df2 statistic     p
##   <ord> <int> <int>     <dbl> <dbl>
## 1 L         2    32     0.286 0.753
## 2 M         2    32     0.653 0.527
## 3 H         2    32     0.813 0.452

2.2 Computation

res.aov <- anova_test(
  data = dat, dv = wariai, wid = id,
  between = proficiency, within = task
)
get_anova_table(res.aov)
## ANOVA Table (type III tests)
## 
##             Effect DFn DFd     F     p p<.05   ges
## 1      proficiency   2  32 2.469 0.101       0.082
## 2             task   2  64 1.602 0.209       0.021
## 3 proficiency:task   4  64 0.123 0.974       0.003
interaction.plot(x.factor = dat$task, trace.factor = dat$proficiency, 
                 response = dat$wariai, fun = mean,
                 type = "b", legend = TRUE, trace.label = "TASK")

3 ANOVA koto

3.1 Check assumptions

dat %>%
  group_by(task, proficiency) %>%
  identify_outliers(koto)
## # A tibble: 1 × 10
##   task  proficiency id    trueid  nobe  koto wariai wariai2 is.outlier is.extr…¹
##   <ord> <ord>       <fct> <fct>  <dbl> <dbl>  <dbl>   <dbl> <lgl>      <lgl>    
## 1 H     lower       20    20       149    65  0.436    3.77 TRUE       FALSE    
## # … with abbreviated variable name ¹​is.extreme
dat %>%
  group_by(task, proficiency) %>%
  shapiro_test(koto)
## # A tibble: 9 × 5
##   task  proficiency variable statistic      p
##   <ord> <ord>       <chr>        <dbl>  <dbl>
## 1 L     lower       koto         0.955 0.711 
## 2 L     middle      koto         0.878 0.0814
## 3 L     upper       koto         0.980 0.982 
## 4 M     lower       koto         0.922 0.335 
## 5 M     middle      koto         0.943 0.537 
## 6 M     upper       koto         0.933 0.410 
## 7 H     lower       koto         0.872 0.0832
## 8 H     middle      koto         0.904 0.177 
## 9 H     upper       koto         0.888 0.111
ggqqplot(dat, "koto", ggtheme = theme_bw()) +
  facet_grid(task ~ proficiency)

dat %>%
  group_by(task) %>%
  levene_test(koto ~ proficiency)
## # A tibble: 3 × 5
##   task    df1   df2 statistic     p
##   <ord> <int> <int>     <dbl> <dbl>
## 1 L         2    32     1.71  0.197
## 2 M         2    32     1.60  0.217
## 3 H         2    32     0.438 0.649

3.2 Computation

res.aov <- anova_test(
  data = dat, dv = koto, wid = id,
  between = proficiency, within = task
)
get_anova_table(res.aov)
## ANOVA Table (type III tests)
## 
##             Effect  DFn   DFd     F     p p<.05   ges
## 1      proficiency 2.00 32.00 4.510 0.019     * 0.175
## 2             task 1.63 52.28 4.039 0.031     * 0.030
## 3 proficiency:task 3.27 52.28 1.531 0.215       0.023
interaction.plot(x.factor = dat$task, trace.factor = dat$proficiency, 
                 response = dat$koto, fun = mean,
                 type = "b", legend = TRUE, trace.label = "TASK")

4 Comparison between L and M

dat_LM <- dat %>% filter(task == "L"| task == "M")
dat_LM$task <- ordered(dat_LM$task, levels=c("L","M"))

4.1 Wariai LM

4.1.1 Check assumptions

dat_LM %>%
  group_by(task, proficiency) %>%
  identify_outliers(wariai)
## # A tibble: 3 × 10
##   task  proficiency id    trueid  nobe  koto wariai wariai2 is.outlier is.extr…¹
##   <ord> <ord>       <fct> <fct>  <dbl> <dbl>  <dbl>   <dbl> <lgl>      <lgl>    
## 1 L     lower       32    33        36    28  0.778    3.30 TRUE       FALSE    
## 2 L     upper       34    35        70    45  0.643    3.80 TRUE       FALSE    
## 3 M     upper       11    11        98    59  0.602    4.21 TRUE       FALSE    
## # … with abbreviated variable name ¹​is.extreme
dat_LM %>%
  group_by(task, proficiency) %>%
  shapiro_test(wariai)
## # A tibble: 6 × 5
##   task  proficiency variable statistic      p
##   <ord> <ord>       <chr>        <dbl>  <dbl>
## 1 L     lower       wariai       0.865 0.0664
## 2 L     middle      wariai       0.975 0.959 
## 3 L     upper       wariai       0.977 0.968 
## 4 M     lower       wariai       0.847 0.0392
## 5 M     middle      wariai       0.976 0.960 
## 6 M     upper       wariai       0.826 0.0190
ggqqplot(dat_LM, "wariai", ggtheme = theme_bw()) +
  facet_grid(task ~ proficiency)

dat_LM %>%
  group_by(task) %>%
  levene_test(wariai ~ proficiency)
## # A tibble: 2 × 5
##   task    df1   df2 statistic     p
##   <ord> <int> <int>     <dbl> <dbl>
## 1 L         2    32     0.286 0.753
## 2 M         2    32     0.653 0.527

4.1.2 Computation

res.aov <- anova_test(
  data = dat_LM, dv = wariai, wid = id,
  between = proficiency, within = task
)
get_anova_table(res.aov)
## ANOVA Table (type III tests)
## 
##             Effect DFn DFd     F     p p<.05   ges
## 1      proficiency   2  32 2.734 0.080       0.094
## 2             task   1  32 0.961 0.334       0.012
## 3 proficiency:task   2  32 0.084 0.920       0.002
interaction.plot(x.factor = dat_LM$task, trace.factor = dat_LM$proficiency, 
                 response = dat_LM$wariai, fun = mean,
                 type = "b", legend = TRUE, trace.label = "TASK")

習熟度の主効果は有意傾向です。

4.2 Wariai2 LM

4.2.1 Check assumptions

dat_LM %>%
  group_by(task, proficiency) %>%
  identify_outliers(wariai2)
## # A tibble: 2 × 10
##   task  proficiency id    trueid  nobe  koto wariai wariai2 is.outlier is.extr…¹
##   <ord> <ord>       <fct> <fct>  <dbl> <dbl>  <dbl>   <dbl> <lgl>      <lgl>    
## 1 L     middle      7     7         29    21  0.724    2.76 TRUE       FALSE    
## 2 L     middle      12    12        42    26  0.619    2.84 TRUE       FALSE    
## # … with abbreviated variable name ¹​is.extreme
dat_LM %>%
  group_by(task, proficiency) %>%
  shapiro_test(wariai2)
## # A tibble: 6 × 5
##   task  proficiency variable statistic      p
##   <ord> <ord>       <chr>        <dbl>  <dbl>
## 1 L     lower       wariai2      0.955 0.705 
## 2 L     middle      wariai2      0.908 0.201 
## 3 L     upper       wariai2      0.945 0.571 
## 4 M     lower       wariai2      0.926 0.373 
## 5 M     middle      wariai2      0.962 0.807 
## 6 M     upper       wariai2      0.838 0.0265
ggqqplot(dat_LM, "wariai2", ggtheme = theme_bw()) +
  facet_grid(task ~ proficiency)

dat_LM %>%
  group_by(task) %>%
  levene_test(wariai2 ~ proficiency)
## # A tibble: 2 × 5
##   task    df1   df2 statistic     p
##   <ord> <int> <int>     <dbl> <dbl>
## 1 L         2    32     1.11  0.341
## 2 M         2    32     0.148 0.863

4.2.2 Computation

res.aov <- anova_test(
  data = dat_LM, dv = wariai2, wid = id,
  between = proficiency, within = task
)
get_anova_table(res.aov)
## ANOVA Table (type III tests)
## 
##             Effect DFn DFd     F     p p<.05   ges
## 1      proficiency   2  32 2.127 0.136       0.087
## 2             task   1  32 6.472 0.016     * 0.054
## 3 proficiency:task   2  32 1.252 0.300       0.021
interaction.plot(x.factor = dat_LM$task, trace.factor = dat_LM$proficiency, 
                 response = dat_LM$wariai2, fun = mean,
                 type = "b", legend = TRUE, trace.label = "TASK")

認知負荷の主効果は有意です。

4.3 koto LM

4.3.1 Check assumptions

dat_LM %>%
  group_by(task, proficiency) %>%
  identify_outliers(koto)
##  [1] task        proficiency id          trueid      nobe        koto       
##  [7] wariai      wariai2     is.outlier  is.extreme 
## <0 rows> (or 0-length row.names)
dat_LM %>%
  group_by(task, proficiency) %>%
  shapiro_test(koto)
## # A tibble: 6 × 5
##   task  proficiency variable statistic      p
##   <ord> <ord>       <chr>        <dbl>  <dbl>
## 1 L     lower       koto         0.955 0.711 
## 2 L     middle      koto         0.878 0.0814
## 3 L     upper       koto         0.980 0.982 
## 4 M     lower       koto         0.922 0.335 
## 5 M     middle      koto         0.943 0.537 
## 6 M     upper       koto         0.933 0.410
ggqqplot(dat_LM, "koto", ggtheme = theme_bw()) +
  facet_grid(task ~ proficiency)

dat_LM %>%
  group_by(task) %>%
  levene_test(koto ~ proficiency)
## # A tibble: 2 × 5
##   task    df1   df2 statistic     p
##   <ord> <int> <int>     <dbl> <dbl>
## 1 L         2    32      1.71 0.197
## 2 M         2    32      1.60 0.217

4.3.2 Computation

res.aov <- anova_test(
  data = dat_LM, dv = koto, wid = id,
  between = proficiency, within = task
)
get_anova_table(res.aov)
## ANOVA Table (type III tests)
## 
##             Effect DFn DFd     F     p p<.05   ges
## 1      proficiency   2  32 5.199 0.011     * 0.193
## 2             task   1  32 3.372 0.076       0.027
## 3 proficiency:task   2  32 1.787 0.184       0.028
interaction.plot(x.factor = dat_LM$task, trace.factor = dat_LM$proficiency, 
                 response = dat_LM$koto, fun = mean,
                 type = "b", legend = TRUE, trace.label = "TASK")

習熟度の主効果は有意です。

5 Comparison between M and H

dat_MH <- dat %>% filter(task == "M"| task == "H")
dat_MH$task <- ordered(dat_MH$task, levels=c("M","H"))

5.1 Wariai MH

5.1.1 Check assumptions

dat_MH %>%
  group_by(task, proficiency) %>%
  identify_outliers(wariai)
## # A tibble: 1 × 10
##   task  proficiency id    trueid  nobe  koto wariai wariai2 is.outlier is.extr…¹
##   <ord> <ord>       <fct> <fct>  <dbl> <dbl>  <dbl>   <dbl> <lgl>      <lgl>    
## 1 M     upper       11    11        98    59  0.602    4.21 TRUE       FALSE    
## # … with abbreviated variable name ¹​is.extreme
dat_MH %>%
  group_by(task, proficiency) %>%
  shapiro_test(wariai)
## # A tibble: 6 × 5
##   task  proficiency variable statistic      p
##   <ord> <ord>       <chr>        <dbl>  <dbl>
## 1 M     lower       wariai       0.847 0.0392
## 2 M     middle      wariai       0.976 0.960 
## 3 M     upper       wariai       0.826 0.0190
## 4 H     lower       wariai       0.880 0.104 
## 5 H     middle      wariai       0.954 0.692 
## 6 H     upper       wariai       0.949 0.623
ggqqplot(dat_MH, "wariai", ggtheme = theme_bw()) +
  facet_grid(task ~ proficiency)

dat_MH %>%
  group_by(task) %>%
  levene_test(wariai ~ proficiency)
## # A tibble: 2 × 5
##   task    df1   df2 statistic     p
##   <ord> <int> <int>     <dbl> <dbl>
## 1 M         2    32     0.653 0.527
## 2 H         2    32     0.813 0.452

5.1.2 Computation

res.aov <- anova_test(
  data = dat_MH, dv = wariai, wid = id,
  between = proficiency, within = task
)
get_anova_table(res.aov)
## ANOVA Table (type III tests)
## 
##             Effect DFn DFd     F     p p<.05   ges
## 1      proficiency   2  32 2.015 0.150       0.079
## 2             task   1  32 3.378 0.075       0.033
## 3 proficiency:task   2  32 0.096 0.909       0.002
interaction.plot(x.factor = dat_MH$task, trace.factor = dat_MH$proficiency, 
                 response = dat_MH$wariai, fun = mean,
                 type = "b", legend = TRUE, trace.label = "TASK")

認知負荷の主効果は有意傾向です。

5.2 Wariai2 MH

5.2.1 Check assumptions

dat_MH %>%
  group_by(task, proficiency) %>%
  identify_outliers(wariai2)
##  [1] task        proficiency id          trueid      nobe        koto       
##  [7] wariai      wariai2     is.outlier  is.extreme 
## <0 rows> (or 0-length row.names)
dat_MH %>%
  group_by(task, proficiency) %>%
  shapiro_test(wariai2)
## # A tibble: 6 × 5
##   task  proficiency variable statistic      p
##   <ord> <ord>       <chr>        <dbl>  <dbl>
## 1 M     lower       wariai2      0.926 0.373 
## 2 M     middle      wariai2      0.962 0.807 
## 3 M     upper       wariai2      0.838 0.0265
## 4 H     lower       wariai2      0.906 0.219 
## 5 H     middle      wariai2      0.938 0.476 
## 6 H     upper       wariai2      0.868 0.0622
ggqqplot(dat_MH, "wariai2", ggtheme = theme_bw()) +
  facet_grid(task ~ proficiency)

dat_MH %>%
  group_by(task) %>%
  levene_test(wariai2 ~ proficiency)
## # A tibble: 2 × 5
##   task    df1   df2 statistic     p
##   <ord> <int> <int>     <dbl> <dbl>
## 1 M         2    32    0.148  0.863
## 2 H         2    32    0.0157 0.984

5.2.2 Computation

res.aov <- anova_test(
  data = dat_MH, dv = wariai2, wid = id,
  between = proficiency, within = task
)
get_anova_table(res.aov)
## ANOVA Table (type III tests)
## 
##             Effect DFn DFd     F     p p<.05   ges
## 1      proficiency   2  32 2.182 0.129       0.100
## 2             task   1  32 1.643 0.209       0.009
## 3 proficiency:task   2  32 0.689 0.509       0.008
interaction.plot(x.factor = dat_MH$task, trace.factor = dat_MH$proficiency, 
                 response = dat_MH$wariai2, fun = mean,
                 type = "b", legend = TRUE, trace.label = "TASK")

5.3 koto MH

5.3.1 Check assumptions

dat_MH %>%
  group_by(task, proficiency) %>%
  identify_outliers(koto)
## # A tibble: 1 × 10
##   task  proficiency id    trueid  nobe  koto wariai wariai2 is.outlier is.extr…¹
##   <ord> <ord>       <fct> <fct>  <dbl> <dbl>  <dbl>   <dbl> <lgl>      <lgl>    
## 1 H     lower       20    20       149    65  0.436    3.77 TRUE       FALSE    
## # … with abbreviated variable name ¹​is.extreme
dat_MH %>%
  group_by(task, proficiency) %>%
  shapiro_test(koto)
## # A tibble: 6 × 5
##   task  proficiency variable statistic      p
##   <ord> <ord>       <chr>        <dbl>  <dbl>
## 1 M     lower       koto         0.922 0.335 
## 2 M     middle      koto         0.943 0.537 
## 3 M     upper       koto         0.933 0.410 
## 4 H     lower       koto         0.872 0.0832
## 5 H     middle      koto         0.904 0.177 
## 6 H     upper       koto         0.888 0.111
ggqqplot(dat_MH, "koto", ggtheme = theme_bw()) +
  facet_grid(task ~ proficiency)

dat_MH %>%
  group_by(task) %>%
  levene_test(koto ~ proficiency)
## # A tibble: 2 × 5
##   task    df1   df2 statistic     p
##   <ord> <int> <int>     <dbl> <dbl>
## 1 M         2    32     1.60  0.217
## 2 H         2    32     0.438 0.649

5.3.2 Computation

res.aov <- anova_test(
  data = dat_MH, dv = koto, wid = id,
  between = proficiency, within = task
)
get_anova_table(res.aov)
## ANOVA Table (type III tests)
## 
##             Effect DFn DFd     F     p p<.05   ges
## 1      proficiency   2  32 5.222 0.011     * 0.216
## 2             task   1  32 0.239 0.629       0.001
## 3 proficiency:task   2  32 2.123 0.136       0.020
interaction.plot(x.factor = dat_MH$task, trace.factor = dat_MH$proficiency, 
                 response = dat_MH$koto, fun = mean,
                 type = "b", legend = TRUE, trace.label = "TASK")

習熟度の主効果は有意です。

6 まとめ

6.1 LとM(外在性負荷の有無)

発話の語彙の多様さの結果は、

延べ語数に対する異なり語数の割合では、習熟度の主効果は有意傾向でした。

延べ語数 x2の平方根に対する異なり語数の割合では、認知負荷の主効果は有意でした。

異なる語数では、習熟度の主効果は有意でした。

6.2 MとH(内在性負荷の有無)

延べ語数に対する異なり語数の割合では、認知負荷の主効果は有意傾向でした。

延べ語数 x2の平方根に対する異なり語数の割合では、有意な効果はなかった。

異なる語数では、習熟度の主効果は有意でした。