library (dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library (readxl)
library (car)
## Zorunlu paket yükleniyor: carData
##
## Attaching package: 'car'
## The following object is masked from 'package:dplyr':
##
## recode
library(effectsize)
anova_data <- read_excel("C:/Users/melik/Downloads/anova_dataset.xlsx")
head(anova_data)
## # A tibble: 6 × 3
## participant_id group anxiety_score
## <chr> <chr> <dbl>
## 1 MIN_001 Mindfulness 52.0
## 2 MIN_002 Mindfulness 46.9
## 3 MIN_003 Mindfulness 53.2
## 4 MIN_004 Mindfulness 60.2
## 5 MIN_005 Mindfulness 46.1
## 6 MIN_006 Mindfulness 46.1
anova_data$group <- as.factor(anova_data$group)
glimpse (anova_data)
## Rows: 277
## Columns: 3
## $ participant_id <chr> "MIN_001", "MIN_002", "MIN_003", "MIN_004", "MIN_005", …
## $ group <fct> Mindfulness, Mindfulness, Mindfulness, Mindfulness, Min…
## $ anxiety_score <dbl> 51.97, 46.89, 53.18, 60.18, 46.13, 46.13, 60.63, 54.14,…
table(anova_data$group)
##
## Control Exercise Mindfulness
## 90 95 92
by(anova_data$anxiety_score,
anova_data$group,
shapiro.test)
## anova_data$group: Control
##
## Shapiro-Wilk normality test
##
## data: dd[x, ]
## W = 0.99129, p-value = 0.8211
##
## ------------------------------------------------------------
## anova_data$group: Exercise
##
## Shapiro-Wilk normality test
##
## data: dd[x, ]
## W = 0.98017, p-value = 0.1597
##
## ------------------------------------------------------------
## anova_data$group: Mindfulness
##
## Shapiro-Wilk normality test
##
## data: dd[x, ]
## W = 0.98912, p-value = 0.652
leveneTest(anxiety_score ~ group, data = anova_data)
## Levene's Test for Homogeneity of Variance (center = median)
## Df F value Pr(>F)
## group 2 0.8155 0.4435
## 274
anova_model <- aov(anxiety_score ~ group, data = anova_data)
summary(anova_model)
## Df Sum Sq Mean Sq F value Pr(>F)
## group 2 5119 2559.7 41.61 <2e-16 ***
## Residuals 274 16856 61.5
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
TukeyHSD(anova_model)
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = anxiety_score ~ group, data = anova_data)
##
## $group
## diff lwr upr p adj
## Exercise-Control -4.551064 -7.269890 -1.832238 0.0002986
## Mindfulness-Control -10.567418 -13.307724 -7.827111 0.0000000
## Mindfulness-Exercise -6.016354 -8.719961 -3.312746 0.0000009
eta_squared(anova_model, partial = FALSE)
## # Effect Size for ANOVA (Type I)
##
## Parameter | Eta2 | 95% CI
## -------------------------------
## group | 0.23 | [0.16, 1.00]
##
## - One-sided CIs: upper bound fixed at [1.00].
Sonuç; Tek yönlü ANOVA sonucunda üç grubun sınav kaygısı puanları arasında anlamlı fark bulunmuştur. Çoklu karşılaştırmalar, mindfulness grubunun en düşük sınav kaygısına sahip olduğunu göstermiştir. Grup etkisinin büyüklüğü η² = 0.23 olarak bulunmuştur.