study 2 designs:

2 (Mindset: perspective-taking vs. objective) by

2 (Gender: male vs. female) by

3 (Condition: Personal Need vs. Abstract Need vs. Aphorism)

study 3 designs:

2 (Mindset: perspective-taking vs. objective) by

2 (Gender: male vs. female) by

3 (Condition: Personal Need vs. Abstract Need vs. Aphorism) by

2 (Type: Covid-19 vs. general)

power analysis for study 3

test of interest for study 3:

my guess is we will try to study it with linear regression–so estimating here!

diffScor = \(\beta_0\) + \(\beta_2\)CovidvGeneral + \(\beta_2\)MvF + \(\beta_3\)PerspvObj + \(\beta_4\)type1 + \(\beta_5\)type2 + \(\epsilon_i\)

study 2 test for main effect of Covid-19 vs. aphorism statements:

diffScore = \(\beta_0\) + \(\beta_1\)ApvPN + \(\epsilon_i\)

# 2. ME of covid-19 vs. aphorism

#take perspective taking condition
d2 <- as.data.frame(cbind(participant = dp1$participant, ap_catscore = dp1$ap_p_catscore, pn_catscore = dp1$pn_p_catscore))

#take remain objective condition
d3 <- as.data.frame(cbind(participant = do1$participant, ap_catscore = do1$ap_o_catscore, pn_catscore = do1$pn_o_catscore))

#merge to single dataset
d4 <- as.data.frame(rbind(d2, d3), na.pass = T)

t.test(d4$ap_catscore, d4$pn_catscore, var.equal = F, paired = T)
## 
##  Paired t-test
## 
## data:  d4$ap_catscore and d4$pn_catscore
## t = 3.9685, df = 269, p-value = 9.284e-05
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  0.3746517 1.1123854
## sample estimates:
## mean of the differences 
##               0.7435185
#t = 3.9685, df = 269, p-value = 9.284e-05

#f_val = (PRE/(PA - PC))/((1 - PRE)/(n-PA))

f_val = 3.9685^2
f_val #[1] 15.74899
## [1] 15.74899
n = nrow(d4)
n
## [1] 270
PA = 2
PC = 1

PRE = 15.74899/(268+15.74899)

#get true PRE
eta_sq = 1 - (1-PRE)*((270-1)/(270-2))
eta_sq #0.051979
## [1] 0.051979
pwr.f2.test(u = 6, f2 = .052, sig.level = .05, power = .80)
## 
##      Multiple regression power calculation 
## 
##               u = 6
##               v = 261.3675
##              f2 = 0.052
##       sig.level = 0.05
##           power = 0.8
#total sample size needed: 262

study 2 test for interaction for empathy manipulation and covid-19 vs. non-covid personal need statements:

# Interaction for empathy manipulation and covid vs. non-covid (study 2) 
t.test(dp1$pn_p_catscore, do1$pn_o_catscore, var.equal = F, paired = F)
## 
##  Welch Two Sample t-test
## 
## data:  dp1$pn_p_catscore and do1$pn_o_catscore
## t = 1.9028, df = 255.8, p-value = 0.05819
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.01697305  0.98798754
## sample estimates:
## mean of x mean of y 
## 0.6250000 0.1394928
## #t(255.8) = 1.9028, p = .05819, CI = [-0.017, 0.988]

n = nrow(dp1) + nrow(do1)
n
## [1] 270
f_val = 1.9028^2
f_val #3.620648
## [1] 3.620648
PRE = 3.62/(268+3.62)
PRE
## [1] 0.01332744
PA = 2
PC = 1

eta_sq = 1 - (1 - PRE)*((n - PC)/ (n - PA))
eta_sq #.01
## [1] 0.009645829
pwr.f2.test(u = 6, f2 = 0.01, sig.level = .05, power = .80)
## 
##      Multiple regression power calculation 
## 
##               u = 6
##               v = 1361.737
##              f2 = 0.01
##       sig.level = 0.05
##           power = 0.8
#total sample size needed: 1362, this is about  230 subjects per cell