1AS-unitあたりの誤用数 (e_asunit)、誤用を含む節数 (e_ari_count)、誤用を含まない節数 (e_nashi_count)、誤用を含まないAS-unitの割合 (e_nashi_as_count_wariai)を使って分析した。
library(tidyverse)## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
## ✔ ggplot2 3.4.0 ✔ purrr 1.0.0
## ✔ tibble 3.1.8 ✔ dplyr 1.0.10
## ✔ tidyr 1.2.1 ✔ stringr 1.5.0
## ✔ readr 2.1.3 ✔ forcats 0.5.2
## ── 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/accuracy0322_result.xlsx", sheet = "Sheet6")
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"))bxp <- ggboxplot(
dat, x = "task", y = "e_asunit", add = "jitter",
color = "proficiency", palette = "lancet"
)
bxp + ggtitle("e_asunit")bxp <- ggboxplot(
dat, x = "task", y = "e_nashi_as_count_wariai", add = "jitter",
color = "proficiency", palette = "lancet"
)
bxp + ggtitle("e_nashi_as_count_wariai")bxp <- ggboxplot(
dat, x = "task", y = "e_ari_count", add = "jitter",
color = "proficiency", palette = "lancet"
)
bxp + ggtitle("e_ari_count")bxp <- ggboxplot(
dat, x = "task", y = "e_nashi_count", add = "jitter",
color = "proficiency", palette = "lancet"
)
bxp + ggtitle("e_nashi_count")bxp <- ggboxplot(
dat, x = "task", y = "e_nashi_count_wariai", add = "jitter",
color = "proficiency", palette = "lancet"
)
bxp + ggtitle("e_nashi_count_wariai")dat_MH <- dat %>% filter(task == "M"| task == "H")
dat_MH$task <- ordered(dat_MH$task, levels=c("M","H"))bxp <- ggboxplot(
dat_MH, x = "task", y = "e_asunit", add = "jitter",
color = "proficiency", palette = "lancet"
)
bxp + ggtitle("e_asunit")dat_MH %>%
group_by(task, proficiency) %>%
identify_outliers(e_asunit)## # A tibble: 3 × 11
## task proficiency e_asu…¹ e_nas…² e_ari…³ e_nas…⁴ e_nas…⁵ id trueid is.ou…⁶
## <ord> <ord> <dbl> <dbl> <dbl> <dbl> <dbl> <fct> <fct> <lgl>
## 1 H lower 1.14 0.143 6 3 0.429 30 31 TRUE
## 2 H middle 2.11 0 11 0 0 2 3 TRUE
## 3 H middle 1.67 0.167 5 3 0.5 24 24 TRUE
## # … with 1 more variable: is.extreme <lgl>, and abbreviated variable names
## # ¹e_asunit, ²e_nashi_as_count_wariai, ³e_ari_count, ⁴e_nashi_count,
## # ⁵e_nashi_count_wariai, ⁶is.outlier
dat_MH %>%
group_by(task, proficiency) %>%
shapiro_test(e_asunit)## # A tibble: 6 × 5
## task proficiency variable statistic p
## <ord> <ord> <chr> <dbl> <dbl>
## 1 M lower e_asunit 0.917 0.292
## 2 M middle e_asunit 0.885 0.102
## 3 M upper e_asunit 0.963 0.829
## 4 H lower e_asunit 0.828 0.0222
## 5 H middle e_asunit 0.806 0.0109
## 6 H upper e_asunit 0.943 0.539
ggqqplot(dat_MH, "e_asunit", ggtheme = theme_bw()) +
facet_grid(task ~ proficiency)## Warning: The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
dat_MH %>%
group_by(task) %>%
levene_test(e_asunit ~ proficiency)## # A tibble: 2 × 5
## task df1 df2 statistic p
## <ord> <int> <int> <dbl> <dbl>
## 1 M 2 32 0.0760 0.927
## 2 H 2 32 0.990 0.383
res.aov <- anova_test(
data = dat_MH, dv = e_asunit, wid = trueid,
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 1.045 0.363 0.037
## 2 task 1 32 0.560 0.460 0.007
## 3 proficiency:task 2 32 0.394 0.678 0.010
interaction.plot(x.factor = dat_MH$task, trace.factor = dat_MH$proficiency,
response = dat_MH$e_asunit, fun = mean,
type = "b", legend = TRUE, trace.label = "TASK")bxp <- ggboxplot(
dat_MH, x = "task", y = "e_nashi_as_count_wariai", add = "jitter",
color = "proficiency", palette = "lancet"
)
bxp + ggtitle("e_nashi_as_count_wariai")dat_MH %>%
group_by(task, proficiency) %>%
identify_outliers(e_nashi_as_count_wariai)## # A tibble: 2 × 11
## task proficiency e_asu…¹ e_nas…² e_ari…³ e_nas…⁴ e_nas…⁵ id trueid is.ou…⁶
## <ord> <ord> <dbl> <dbl> <dbl> <dbl> <dbl> <fct> <fct> <lgl>
## 1 M upper 0 1 0 12 1.5 4 6 TRUE
## 2 M upper 0 1 0 14 1.4 34 35 TRUE
## # … with 1 more variable: is.extreme <lgl>, and abbreviated variable names
## # ¹e_asunit, ²e_nashi_as_count_wariai, ³e_ari_count, ⁴e_nashi_count,
## # ⁵e_nashi_count_wariai, ⁶is.outlier
dat_MH %>%
group_by(task, proficiency) %>%
shapiro_test(e_nashi_as_count_wariai)## # A tibble: 6 × 5
## task proficiency variable statistic p
## <ord> <ord> <chr> <dbl> <dbl>
## 1 M lower e_nashi_as_count_wariai 0.841 0.0327
## 2 M middle e_nashi_as_count_wariai 0.927 0.347
## 3 M upper e_nashi_as_count_wariai 0.909 0.206
## 4 H lower e_nashi_as_count_wariai 0.915 0.280
## 5 H middle e_nashi_as_count_wariai 0.949 0.616
## 6 H upper e_nashi_as_count_wariai 0.976 0.965
ggqqplot(dat_MH, "e_nashi_as_count_wariai", ggtheme = theme_bw()) +
facet_grid(task ~ proficiency)## Warning: The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
dat_MH %>%
group_by(task) %>%
levene_test(e_nashi_as_count_wariai ~ proficiency)## # A tibble: 2 × 5
## task df1 df2 statistic p
## <ord> <int> <int> <dbl> <dbl>
## 1 M 2 32 0.789 0.463
## 2 H 2 32 0.384 0.684
res.aov <- anova_test(
data = dat_MH, dv = e_nashi_as_count_wariai, wid = trueid,
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 1.203000 0.314 4.50e-02
## 2 task 1 32 0.000026 0.996 3.02e-07
## 3 proficiency:task 2 32 0.295000 0.747 7.00e-03
interaction.plot(x.factor = dat_MH$task, trace.factor = dat_MH$proficiency,
response = dat_MH$e_nashi_as_count_wariai, fun = mean,
type = "b", legend = TRUE, trace.label = "TASK")bxp <- ggboxplot(
dat_MH, x = "task", y = "e_ari_count", add = "jitter",
color = "proficiency", palette = "lancet"
)
bxp + ggtitle("e_ari_count")dat_MH %>%
group_by(task, proficiency) %>%
identify_outliers(e_ari_count)## # A tibble: 3 × 11
## task proficiency e_asu…¹ e_nas…² e_ari…³ e_nas…⁴ e_nas…⁵ id trueid is.ou…⁶
## <ord> <ord> <dbl> <dbl> <dbl> <dbl> <dbl> <fct> <fct> <lgl>
## 1 H lower 0.636 0.455 7 7 0.636 21 20 TRUE
## 2 H lower 1.14 0.143 6 3 0.429 30 31 TRUE
## 3 H middle 2.11 0 11 0 0 2 3 TRUE
## # … with 1 more variable: is.extreme <lgl>, and abbreviated variable names
## # ¹e_asunit, ²e_nashi_as_count_wariai, ³e_ari_count, ⁴e_nashi_count,
## # ⁵e_nashi_count_wariai, ⁶is.outlier
dat_MH %>%
group_by(task, proficiency) %>%
shapiro_test(e_ari_count)## # A tibble: 6 × 5
## task proficiency variable statistic p
## <ord> <ord> <chr> <dbl> <dbl>
## 1 M lower e_ari_count 0.875 0.0904
## 2 M middle e_ari_count 0.880 0.0879
## 3 M upper e_ari_count 0.929 0.372
## 4 H lower e_ari_count 0.867 0.0704
## 5 H middle e_ari_count 0.802 0.00978
## 6 H upper e_ari_count 0.948 0.604
ggqqplot(dat_MH, "e_ari_count", ggtheme = theme_bw()) +
facet_grid(task ~ proficiency)## Warning: The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
dat_MH %>%
group_by(task) %>%
levene_test(e_ari_count ~ proficiency)## # A tibble: 2 × 5
## task df1 df2 statistic p
## <ord> <int> <int> <dbl> <dbl>
## 1 M 2 32 1.18 0.320
## 2 H 2 32 0.392 0.679
res.aov <- anova_test(
data = dat_MH, dv = e_ari_count, wid = trueid,
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 0.558 0.578 0.023000
## 2 task 1 32 0.012 0.914 0.000117
## 3 proficiency:task 2 32 0.586 0.562 0.011000
interaction.plot(x.factor = dat_MH$task, trace.factor = dat_MH$proficiency,
response = dat_MH$e_ari_count, fun = mean,
type = "b", legend = TRUE, trace.label = "TASK")bxp <- ggboxplot(
dat_MH, x = "task", y = "e_nashi_count", add = "jitter",
color = "proficiency", palette = "lancet"
)
bxp + ggtitle("e_nashi_count")dat_MH %>%
group_by(task, proficiency) %>%
identify_outliers(e_nashi_count)## [1] task proficiency e_asunit
## [4] e_nashi_as_count_wariai e_ari_count e_nashi_count
## [7] e_nashi_count_wariai id trueid
## [10] is.outlier is.extreme
## <0 rows> (or 0-length row.names)
dat_MH %>%
group_by(task, proficiency) %>%
shapiro_test(e_nashi_count)## # A tibble: 6 × 5
## task proficiency variable statistic p
## <ord> <ord> <chr> <dbl> <dbl>
## 1 M lower e_nashi_count 0.898 0.175
## 2 M middle e_nashi_count 0.971 0.921
## 3 M upper e_nashi_count 0.891 0.123
## 4 H lower e_nashi_count 0.857 0.0529
## 5 H middle e_nashi_count 0.939 0.486
## 6 H upper e_nashi_count 0.927 0.346
ggqqplot(dat_MH, "e_nashi_count", ggtheme = theme_bw()) +
facet_grid(task ~ proficiency)## Warning: The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
dat_MH %>%
group_by(task) %>%
levene_test(e_nashi_count ~ proficiency)## # A tibble: 2 × 5
## task df1 df2 statistic p
## <ord> <int> <int> <dbl> <dbl>
## 1 M 2 32 8.64 0.00100
## 2 H 2 32 0.910 0.413
res.aov <- anova_test(
data = dat_MH, dv = e_nashi_count, wid = trueid,
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 4.969 0.013 * 0.175
## 2 task 1 32 0.869 0.358 0.009
## 3 proficiency:task 2 32 0.302 0.741 0.006
interaction.plot(x.factor = dat_MH$task, trace.factor = dat_MH$proficiency,
response = dat_MH$e_nashi_count, fun = mean,
type = "b", legend = TRUE, trace.label = "TASK")dat_MH %>%
pairwise_t_test(
e_nashi_count ~ task,
p.adjust.method = "bonferroni"
)## # A tibble: 1 × 9
## .y. group1 group2 n1 n2 p p.signif p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <chr> <dbl> <chr>
## 1 e_nashi_count M H 35 35 0.504 ns 0.504 ns
dat_MH %>%
pairwise_t_test(
e_nashi_count ~ proficiency,
p.adjust.method = "bonferroni"
)## # A tibble: 3 × 9
## .y. group1 group2 n1 n2 p p.signif p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <chr> <dbl> <chr>
## 1 e_nashi_count lower middle 22 24 0.952 ns 1 ns
## 2 e_nashi_count lower upper 22 24 0.00194 ** 0.00581 **
## 3 e_nashi_count middle upper 24 24 0.00188 ** 0.00564 **
dat_LM <- dat %>% filter(task == "L"| task == "M")
dat_LM$task <- ordered(dat_LM$task, levels=c("L","M"))bxp <- ggboxplot(
dat_LM, x = "task", y = "e_asunit", add = "jitter",
color = "proficiency", palette = "lancet"
)
bxp + ggtitle("e_asunit")dat_LM %>%
group_by(task, proficiency) %>%
identify_outliers(e_asunit)## # A tibble: 1 × 11
## task proficiency e_asu…¹ e_nas…² e_ari…³ e_nas…⁴ e_nas…⁵ id trueid is.ou…⁶
## <ord> <ord> <dbl> <dbl> <dbl> <dbl> <dbl> <fct> <fct> <lgl>
## 1 L middle 2.25 0 7 1 0.25 24 24 TRUE
## # … with 1 more variable: is.extreme <lgl>, and abbreviated variable names
## # ¹e_asunit, ²e_nashi_as_count_wariai, ³e_ari_count, ⁴e_nashi_count,
## # ⁵e_nashi_count_wariai, ⁶is.outlier
dat_LM %>%
group_by(task, proficiency) %>%
shapiro_test(e_asunit)## # A tibble: 6 × 5
## task proficiency variable statistic p
## <ord> <ord> <chr> <dbl> <dbl>
## 1 L lower e_asunit 0.947 0.602
## 2 L middle e_asunit 0.903 0.175
## 3 L upper e_asunit 0.954 0.691
## 4 M lower e_asunit 0.917 0.292
## 5 M middle e_asunit 0.885 0.102
## 6 M upper e_asunit 0.963 0.829
ggqqplot(dat_LM, "e_asunit", ggtheme = theme_bw()) +
facet_grid(task ~ proficiency)## Warning: The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
dat_LM %>%
group_by(task) %>%
levene_test(e_asunit ~ proficiency)## # A tibble: 2 × 5
## task df1 df2 statistic p
## <ord> <int> <int> <dbl> <dbl>
## 1 L 2 32 1.38 0.266
## 2 M 2 32 0.0760 0.927
res.aov <- anova_test(
data = dat_LM, dv = e_asunit, wid = trueid,
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 0.516 0.602 0.022
## 2 task 1 32 0.515 0.478 0.005
## 3 proficiency:task 2 32 0.172 0.843 0.003
interaction.plot(x.factor = dat_LM$task, trace.factor = dat_LM$proficiency,
response = dat_LM$e_asunit, fun = mean,
type = "b", legend = TRUE, trace.label = "TASK")bxp <- ggboxplot(
dat_LM, x = "task", y = "e_nashi_as_count_wariai", add = "jitter",
color = "proficiency", palette = "lancet"
)
bxp + ggtitle("e_nashi_as_count_wariai")dat_LM %>%
group_by(task, proficiency) %>%
identify_outliers(e_nashi_as_count_wariai)## # A tibble: 4 × 11
## task proficiency e_asu…¹ e_nas…² e_ari…³ e_nas…⁴ e_nas…⁵ id trueid is.ou…⁶
## <ord> <ord> <dbl> <dbl> <dbl> <dbl> <dbl> <fct> <fct> <lgl>
## 1 L lower 0 1 0 9 1.29 14 13 TRUE
## 2 L middle 2.25 0 7 1 0.25 24 24 TRUE
## 3 M upper 0 1 0 12 1.5 4 6 TRUE
## 4 M upper 0 1 0 14 1.4 34 35 TRUE
## # … with 1 more variable: is.extreme <lgl>, and abbreviated variable names
## # ¹e_asunit, ²e_nashi_as_count_wariai, ³e_ari_count, ⁴e_nashi_count,
## # ⁵e_nashi_count_wariai, ⁶is.outlier
dat_LM %>%
group_by(task, proficiency) %>%
shapiro_test(e_nashi_as_count_wariai)## # A tibble: 6 × 5
## task proficiency variable statistic p
## <ord> <ord> <chr> <dbl> <dbl>
## 1 L lower e_nashi_as_count_wariai 0.849 0.0415
## 2 L middle e_nashi_as_count_wariai 0.962 0.808
## 3 L upper e_nashi_as_count_wariai 0.958 0.748
## 4 M lower e_nashi_as_count_wariai 0.841 0.0327
## 5 M middle e_nashi_as_count_wariai 0.927 0.347
## 6 M upper e_nashi_as_count_wariai 0.909 0.206
ggqqplot(dat_LM, "e_nashi_as_count_wariai", ggtheme = theme_bw()) +
facet_grid(task ~ proficiency)## Warning: The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
dat_LM %>%
group_by(task) %>%
levene_test(e_nashi_as_count_wariai ~ proficiency)## # A tibble: 2 × 5
## task df1 df2 statistic p
## <ord> <int> <int> <dbl> <dbl>
## 1 L 2 32 0.162 0.851
## 2 M 2 32 0.789 0.463
res.aov <- anova_test(
data = dat_LM, dv = e_nashi_as_count_wariai, wid = trueid,
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 0.473 0.628 0.017
## 2 task 1 32 0.935 0.341 0.012
## 3 proficiency:task 2 32 0.951 0.397 0.024
interaction.plot(x.factor = dat_LM$task, trace.factor = dat_LM$proficiency,
response = dat_LM$e_nashi_as_count_wariai, fun = mean,
type = "b", legend = TRUE, trace.label = "TASK")bxp <- ggboxplot(
dat_LM, x = "task", y = "e_ari_count", add = "jitter",
color = "proficiency", palette = "lancet"
)
bxp + ggtitle("e_ari_count")dat_LM %>%
group_by(task, proficiency) %>%
identify_outliers(e_ari_count)## [1] task proficiency e_asunit
## [4] e_nashi_as_count_wariai e_ari_count e_nashi_count
## [7] e_nashi_count_wariai id trueid
## [10] is.outlier is.extreme
## <0 rows> (or 0-length row.names)
dat_LM %>%
group_by(task, proficiency) %>%
shapiro_test(e_ari_count)## # A tibble: 6 × 5
## task proficiency variable statistic p
## <ord> <ord> <chr> <dbl> <dbl>
## 1 L lower e_ari_count 0.900 0.182
## 2 L middle e_ari_count 0.964 0.837
## 3 L upper e_ari_count 0.878 0.0816
## 4 M lower e_ari_count 0.875 0.0904
## 5 M middle e_ari_count 0.880 0.0879
## 6 M upper e_ari_count 0.929 0.372
ggqqplot(dat_LM, "e_ari_count", ggtheme = theme_bw()) +
facet_grid(task ~ proficiency)## Warning: The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
dat_LM %>%
group_by(task) %>%
levene_test(e_ari_count ~ proficiency)## # A tibble: 2 × 5
## task df1 df2 statistic p
## <ord> <int> <int> <dbl> <dbl>
## 1 L 2 32 1.13 0.337
## 2 M 2 32 1.18 0.320
res.aov <- anova_test(
data = dat_LM, dv = e_ari_count, wid = trueid,
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 0.515 0.602 0.019
## 2 task 1 32 0.348 0.560 0.004
## 3 proficiency:task 2 32 0.263 0.770 0.006
interaction.plot(x.factor = dat_LM$task, trace.factor = dat_LM$proficiency,
response = dat_LM$e_ari_count, fun = mean,
type = "b", legend = TRUE, trace.label = "TASK")bxp <- ggboxplot(
dat_LM, x = "task", y = "e_nashi_count", add = "jitter",
color = "proficiency", palette = "lancet"
)
bxp + ggtitle("e_nashi_count")dat_LM %>%
group_by(task, proficiency) %>%
identify_outliers(e_nashi_count)## # A tibble: 2 × 11
## task proficiency e_asu…¹ e_nas…² e_ari…³ e_nas…⁴ e_nas…⁵ id trueid is.ou…⁶
## <ord> <ord> <dbl> <dbl> <dbl> <dbl> <dbl> <fct> <fct> <lgl>
## 1 L lower 0.111 0.889 1 12 1.33 19 19 TRUE
## 2 L upper 0.222 0.778 2 18 2 1 1 TRUE
## # … with 1 more variable: is.extreme <lgl>, and abbreviated variable names
## # ¹e_asunit, ²e_nashi_as_count_wariai, ³e_ari_count, ⁴e_nashi_count,
## # ⁵e_nashi_count_wariai, ⁶is.outlier
dat_LM %>%
group_by(task, proficiency) %>%
shapiro_test(e_nashi_count)## # A tibble: 6 × 5
## task proficiency variable statistic p
## <ord> <ord> <chr> <dbl> <dbl>
## 1 L lower e_nashi_count 0.882 0.110
## 2 L middle e_nashi_count 0.963 0.830
## 3 L upper e_nashi_count 0.927 0.354
## 4 M lower e_nashi_count 0.898 0.175
## 5 M middle e_nashi_count 0.971 0.921
## 6 M upper e_nashi_count 0.891 0.123
ggqqplot(dat_LM, "e_nashi_count", ggtheme = theme_bw()) +
facet_grid(task ~ proficiency)## Warning: The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
## The following aesthetics were dropped during statistical transformation: sample
## ℹ This can happen when ggplot fails to infer the correct grouping structure in
## the data.
## ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
## variable into a factor?
dat_LM %>%
group_by(task) %>%
levene_test(e_nashi_count ~ proficiency)## # A tibble: 2 × 5
## task df1 df2 statistic p
## <ord> <int> <int> <dbl> <dbl>
## 1 L 2 32 0.862 0.432
## 2 M 2 32 8.64 0.00100
res.aov <- anova_test(
data = dat_LM, dv = e_nashi_count, wid = trueid,
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 4.223 0.024 * 0.132
## 2 task 1 32 0.213 0.648 0.003
## 3 proficiency:task 2 32 0.570 0.571 0.015
interaction.plot(x.factor = dat_LM$task, trace.factor = dat_LM$proficiency,
response = dat_LM$e_nashi_count, fun = mean,
type = "b", legend = TRUE, trace.label = "TASK")dat_LM %>%
pairwise_t_test(
e_nashi_count ~ task,
p.adjust.method = "bonferroni"
)## # A tibble: 1 × 9
## .y. group1 group2 n1 n2 p p.signif p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <chr> <dbl> <chr>
## 1 e_nashi_count L M 35 35 0.692 ns 0.692 ns
dat_LM %>%
pairwise_t_test(
e_nashi_count ~ proficiency,
p.adjust.method = "bonferroni"
)## # A tibble: 3 × 9
## .y. group1 group2 n1 n2 p p.signif p.adj p.adj.signif
## * <chr> <chr> <chr> <int> <int> <dbl> <chr> <dbl> <chr>
## 1 e_nashi_count lower middle 22 24 0.504 ns 1 ns
## 2 e_nashi_count lower upper 22 24 0.00393 ** 0.0118 *
## 3 e_nashi_count middle upper 24 24 0.0208 * 0.0625 ns
誤用を含まない節数 (e_nashi_count)
MHでは、Lower < Upper; Middle < Upper, LMでは、Lower < Upper。
外在性負荷が上昇すると、中位群が誤用を含まない節数をより少なく産出しており、正確さが落ちることがわかった。