dat_items %>%filter(question =="effect") %>%group_by(group, effect, time) %>%summarise(mean_true =round(mean(response, na.rm =TRUE), 2) ) %>%ungroup() %>%pivot_wider(names_from ="time", values_from ="mean_true") %>%mutate("Difference"= Post - Pre#sdt_category = rep(c("false alarm", "hit"), 4) ) %>%rename(Condition = group, Effect = effect) %>%relocate(Condition, Effect) %>%nice_table(file ="tab-desc-prop-response.docx", title ="Proportion of graphs rated as showing an intervention effect" )
Table Proportion of graphs rated as showing an intervention effect
Condition
Effect
Pre
Post
Difference
Control
None
0.15
0.20
0.05
Control
Trend
0.76
0.81
0.05
Control
Slope
0.62
0.70
0.08
Control
Trend+Slope
0.95
0.95
0.00
Training
None
0.14
0.16
0.02
Training
Trend
0.85
0.70
-0.15
Training
Slope
0.66
0.68
0.02
Training
Trend+Slope
0.98
0.91
-0.07
“Traditional” Manova
Code
dat_subjects %>%slice(1:20) %>%nice_table()
id_subject
time
trend
slope
group
prop
03fRnek513UP
Pre
0
0
Training
0.2
03fRnek513UP
Pre
0
1
Training
0.8
03fRnek513UP
Pre
1
0
Training
0.9
03fRnek513UP
Pre
1
1
Training
1.0
03fRnek513UP
Post
0
0
Training
0.4
03fRnek513UP
Post
0
1
Training
0.7
03fRnek513UP
Post
1
0
Training
0.5
03fRnek513UP
Post
1
1
Training
0.9
0crR6ITOH4Hn
Pre
0
0
Training
0.2
0crR6ITOH4Hn
Pre
0
1
Training
0.9
0crR6ITOH4Hn
Pre
1
0
Training
1.0
0crR6ITOH4Hn
Pre
1
1
Training
1.0
0crR6ITOH4Hn
Post
0
0
Training
0.6
0crR6ITOH4Hn
Post
0
1
Training
0.9
0crR6ITOH4Hn
Post
1
0
Training
1.0
0crR6ITOH4Hn
Post
1
1
Training
1.0
15Eh1B5Nmc70
Pre
0
0
Training
0.0
15Eh1B5Nmc70
Pre
0
1
Training
0.8
15Eh1B5Nmc70
Pre
1
0
Training
1.0
15Eh1B5Nmc70
Pre
1
1
Training
1.0
Between subject factor is group and within subject factors are time, trend, and slope.
Code
fit <-ezANOVA( dat_subjects, wid = id_subject, dv = prop, within =list(time, trend, slope), between = group, type =3)nice_table(fit$ANOVA, decimals =2)
Effect
DFn
DFd
F
p
p<.05
ges
group
1.00
115.00
0.11
0.74
0.00
time
1.00
115.00
0.00
0.95
0.00
trend
1.00
115.00
1,124.79
0.00
*
0.58
slope
1.00
115.00
1,050.28
0.00
*
0.44
group:time
1.00
115.00
16.85
0.00
*
0.02
group:trend
1.00
115.00
0.01
0.91
0.00
group:slope
1.00
115.00
1.06
0.30
0.00
time:trend
1.00
115.00
26.39
0.00
*
0.01
time:slope
1.00
115.00
0.94
0.33
0.00
trend:slope
1.00
115.00
138.22
0.00
*
0.16
group:time:trend
1.00
115.00
5.27
0.02
*
0.00
group:time:slope
1.00
115.00
3.64
0.06
0.00
group:trend:slope
1.00
115.00
0.24
0.62
0.00
time:trend:slope
1.00
115.00
0.05
0.82
0.00
group:time:trend:slope
1.00
115.00
7.68
0.01
*
0.00
Analyses with multilevel model
Code
dat <- dat_items %>%filter(question =="effect") %>%mutate(response =factor(response, labels =c("No", "Yes"))) %>%rename(Condition = group, Effect = effect, Time = time)dat %>%slice(1:30) %>%select(id_subject, Condition, Time, Effect, response) %>%nice_table()
id_subject
Condition
Time
Effect
response
03fRnek513UP
Training
Pre
Trend+Slope
Yes
03fRnek513UP
Training
Pre
Trend
Yes
03fRnek513UP
Training
Pre
Trend+Slope
Yes
03fRnek513UP
Training
Pre
Slope
Yes
03fRnek513UP
Training
Pre
Slope
No
03fRnek513UP
Training
Pre
Slope
Yes
03fRnek513UP
Training
Pre
None
No
03fRnek513UP
Training
Pre
None
No
03fRnek513UP
Training
Pre
Trend+Slope
Yes
03fRnek513UP
Training
Pre
Slope
Yes
03fRnek513UP
Training
Pre
Slope
Yes
03fRnek513UP
Training
Pre
None
No
03fRnek513UP
Training
Pre
Trend
Yes
03fRnek513UP
Training
Pre
Trend
Yes
03fRnek513UP
Training
Pre
Trend+Slope
Yes
03fRnek513UP
Training
Pre
Trend
Yes
03fRnek513UP
Training
Pre
Slope
Yes
03fRnek513UP
Training
Pre
None
No
03fRnek513UP
Training
Pre
Trend+Slope
Yes
03fRnek513UP
Training
Pre
None
No
03fRnek513UP
Training
Pre
Trend
Yes
03fRnek513UP
Training
Pre
Slope
No
03fRnek513UP
Training
Pre
Trend+Slope
Yes
03fRnek513UP
Training
Pre
Trend+Slope
Yes
03fRnek513UP
Training
Pre
None
No
03fRnek513UP
Training
Pre
None
No
03fRnek513UP
Training
Pre
Trend+Slope
Yes
03fRnek513UP
Training
Pre
None
Yes
03fRnek513UP
Training
Pre
Slope
Yes
03fRnek513UP
Training
Pre
Slope
Yes
Variables slope and trend are aggrgated into a new variable “effect” with for levels: “None”, “Trend”, “Slope”, “Trend+Slope”