Hi,
I’m modelling some data on reaction times, and I want to do some initial examination of my data, to pick the right distribution. For this, I usually calculate the residuals of my model, plot them and check QQ-plots of the residuals.
However, when I calculate the residuals using:
residuals(mod1)
My resulting plots show that the residual estimated errors are all above zero, and none of them are even close to zero. What could be causing this?
The code I run is as follows, and I’ve added a least replicable example of my data.
Final_example.csv (4.2 KB)
mydata<-read.csv("Final_example.csv",rownames=FALSE,header=TRUE,na = "-")
mydata$Time=as.numeric(as.character(mydata$Time))
mydata$GC=as.factor(mydata$Ground_XCAZNOPY)
mydata$Block=mydata$Block
mydata$Plant=as.factor(mydata$Plant)
mydata$BA=as.factor(mydata$BA)
mydata$Vegetation=as.factor(mydata$Vegetation)
mydata$Food=as.factor(mydata$Food)
mod1<-brm(Time~BA+GC+Food+Plant+Vegetation+(BA:GC)+(BA:Food)+(BA:Plant)+(GC:Food)+(1|Block),data=mydata)
res<-residuals(mod1)
plot(res)
qqnorm(res)
qqline(res)
The residual plot and QQ-plot is also attached here.