Stats is not my strong point but trying to run a regression. I'm aware that it happens because some of these variables are perfectly collinear. However, I do not know how to fix this? Any help would be much appreciated. This is my current script:
### Deviant coding of 'Sex' variable
dat_full$deviant_sex <- scale(ifelse(dat_full$sex == "Female",0,1), scale = F)
## Mean centre predictors
### Complexity
dat_full$stnsci <- scale(ifelse(dat_full$complexity == "scientific", 1, 0), center = T, scale = F)
dat_full$stnnon <- scale(ifelse(dat_full$complexity == "none", 1, 0), center = T, scale = F)
### Timing
dat_full$aftbef <- scale(ifelse(dat_full$timing == "before", 1, 0), center = T, scale = F)
dat_full$aftnon <- scale(ifelse(dat_full$timing == "none", 1, 0), center = T, scale = F)
#regression
fulldata <- lm(verdict ~ stnsci + stnnon +
aftbef + aftnon + stnsci:aftbef +
stnsci:aftnon + stnnon:aftbef +
stnnon:aftnon , data=dat_full)
summary (fulldata)