Commit 7432240f authored by Amit Goldenberg's avatar Amit Goldenberg

a bit of housekeeping

parent 1b118eb9
......@@ -24,12 +24,14 @@ pl1way <- function(dat,y,x) {
```{r get and convert the file, include=FALSE}
# setwd("C:/Users/Amit/Dropbox/Research/emotional conformity-non conformity/motivated_contation_EEG_2017/Results")
setwd("C:/Users/ro/OneDrive - Tartu likool/Teadus/REGULATION/16 motivated contagion")
setwd("C:/Users/Amit/Dropbox/Research/emotional conformity-non conformity/motivated_contation_EEG_2017/Results")
#setwd("C:/Users/ro/OneDrive - Tartu likool/Teadus/REGULATION/16 motivated contagion")
d <- read.csv("eeg_data_motivated_contagion.csv")
#d = subset (d, condition != "none")
#ds = subset (d, phase == "social")
......@@ -98,9 +100,13 @@ The alternative is of course to use what we manipulated to regress out brain var
In principle using the difference between and P3.indiv as a depent variable is also a way to do the brain-centric approach. There is some reason to think residualization works better, because variance from the first phase will "leak" into difference scores but not into residualized scores:
```{r, warning=F}
rsd <- lmer( ~ P3.indiv + (1|subject), data = D3)
rsd <- lmer( ~ P3.indiv + (1|subject), data = D3) ; summary (rsd)
ggpairs(cbind(D3[,c("P3.indiv", "","P3.dif")],P3.residuals=resid(rsd)))
### 3) Should we use condition as a factor or as a continuous difference between group and individual ratings?
......@@ -113,7 +119,7 @@ Based on various reasons, including some saturday-night-p-hacking, I stuck to th
```{r, warning=F}
# simplest model
summary(fit <- lmer( ~ P3.indiv + condition + (1|subject), data = D3))
summary(fit <- lmer(P3.dif ~ P3.indiv + condition + (1|subject), data = D3))
# get p-values for the random effects
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment