I am running a 2 (Gender) x 2 (Advice) between-subjects ANOVA, and both R and SPSS reported the same ANOVA statistics: for Advice: F = 372.012, effect df = 1, error df = 661; and for Gender x Advice: F = 45.449, effect df = 1, error df = 2.
When calculating the partial eta squared, R (across multiple R packages: rstatix and DescTools) reported 0.221 for Advice and 0.031 for Gender x Advice. But, both SPSS and using Lakens' effect size spreadsheet (https://osf.io/ixgcd/) resulted in 0.360 for Advice and 0.064 for Gender x Advice.
Does R calculate partial eta squared values in a different way than the standard?
Here is a sample data set with just the necessary variables to test the problem: https://docs.google.com/spreadsheets/d/15AIyIfTi9YgMWM5FTl163uddPx1E19xfaU-vMDRlJuI/edit?usp=sharing
Here is the code I used in RStudio:
# load packages
library(haven)
library(rstatix)
library(DescTools)
# read in data
sample_data <- read_sav([insert file location])
# gather Perception1 and Perception2 into 2 groups
sample_data <- sample_data %>%
gather(key = "Advice", value = "MaleDom", Perception1,
Perception2) %>%
convert_as_factor(ResponseId, Advice)
# rstatix
# compute anova
anova <- aov(MaleDom ~ Gender*Advice, data = sample_data)
# partial eta squared
partial_eta_squared(anova)
# DescTools
# partial eta squared
EtaSq(anova, type = 2, anova = FALSE)
Here is the syntax I used in SPSS:
GLM Perception1 Perception2 BY Gender
/WSFACTOR=advice 2 Polynomial
/METHOD=SSTYPE(3)
/POSTHOC=Gender(BTUKEY)
/PLOT=PROFILE(Gender*advice)
/PRINT=DESCRIPTIVE ETASQ HOMOGENEITY
/CRITERIA=ALPHA(.05)
/WSDESIGN=advice
/DESIGN=Gender.
Note: I am using SPSS version 26 and R version 3.6.3. I have a Windows 10 with a 64-bit operating system.