I have a beta regression model in R, have generated predicted (fitted) values based on my data, and plotted lines of those fitted values on a scatter plot of the actual data. I'm most used to GLMMs, and, at least in practice, have been thinking about the beta regression in a similar way.
However, the fitted values for this additive-only fixed-effects model are not creating a straight line, nor are the slopes the same between groups. I was expecting the fitted values to show the same slope, with different intercepts per group. Was that the wrong expectation? Or does this suggest there is an issue with either my data or implementation?
About the data:
y = a 0 to 1 proportion value of [# individuals in an experiment plot on a vegetation type]/[# individuals found across vegetation types within that plot]
x_coverage = a 0 to 1 proportion value of [amount of a vegetation type in a plot]/[total amount of vegetation measured in that plot]
x_type = a categorical factor of the type of vegetation a measurement was taken on
9 plots in the study (study site was once considered as a random variable, but AICc has me leaving it out), a section of the data:
About the model:
gamlss(data=newbyplotvegpred, y ~ x_coverage + x_type, family="BEINF0")
Used a zero-inflated hurdle model version of the beta regression (BEINF0), as
y contains zero-values (which are fairly believable as real zeros given our methods). Transforming the data and using plain BE changed the fitted values, but not the fact that slopes varied by vegetation type. Double checks with package
glmmtmb give essentially the same results.
Predicted values were generated by
predict(MODEL, type = "response). Not specifying
type, defaults to values scaled to the predictor vars (as I understand it), and indeed produce same-slope lines. But truly wacky intercepts.
Fitted values put into ggplot with geom_point and geom_line (< 10 data points, catches an error for geom_smooth).
Any thoughts on what's up with these regression lines I'm plotting. The
summary(MODEL) output is sensible, and I feel like that aspect of the our approach has been reasonable. Thank you!