I am trying to add my raw data to a ggpredict plot. However, I get the warning message "Removed 398 rows containing missing values (geom_point)" and some of my data points seem to be missing.
'''m3<- lmer(div~log(travel.time)+scale(spinsandplain)+scale(ThreeYearRain)+scale(claylake)+
(1|circleID),na.action=na.fail, data=data, REML=FALSE)
# Get the curve
d<-ggpredict(m3, terms = "travel.time[exp]")
d<-plot(d,show.title = FALSE)
d+xlim(0,10.5)+ylim(0,2.5)
# Get the raw data
sp3<-ggplot(data, aes(x=travel.time, y=div)) + geom_point()+xlim(0,10.5)+ylim(0,2.5)
sp3
# Combine the curve and raw data
d<-ggpredict(m3, terms = "travel.time[exp]")
plot(d, show.title= FALSE, rawdata=TRUE) +
xlim(0,10.5)+ylim(0,2.5) +
labs(x= "Time) +
labs(y= "(H')") +
theme(panel.grid.major = element_blank()) +
theme(panel.grid.minor = element_blank()) +
theme(panel.border = element_blank()) +
theme(axis.line = element_line(colour="black")) +
theme(legend.position= "none")'''
Do you know why this is, how to resolve it? Thanks in advance, Leanne
The curve: enter image description here
The raw data: enter image description here
Combined: enter image description here