I use R with the MuMIn package for Multimodel inference. My global Model is
M.global <- glmer(y ~ c1 + I(c1^2) + c2 + c3 + c4 + (1|subject),data, family =poisson(link="log))
After that I use
M.dredge <- dredge(M.global, m.max=3, subset = dc(cpl,I(cpl^2)))
To calculate all possible models from the global model and rank them by AICc.
m.max limits the number of predictor to 3 and
dc is a dependency chain, so the function takes the squared c1 only if unsquared c1 is included.
m.max is used since the total sample size is 30, and according to Harrels 10:1 rule of thumb there is amximum of 3 predictors to avoid overfitting.
The I use
M.avg <- model.avg(M.dredge, subset= delta < 4, fit=TRUE))
to get the model average across a subset of candidate models with a maximum difference of 4 AICc points to the "best" model having the lowest AICc.
fit = TRUE refits every model in the subset.
Now I can use
M.avg to get the averaged (full and conditional) coefficients for all predictors included in the subset as well as for the confdidence intervals:
Coef <- coef(M.avg, full=TRUE) CI <- confint(M.avg, full=TRUE)
Now my question: Using poisson GLMMs and model averaging, how can I calculate model predictions and according confidence intervals for these predictions, to be used in a graph showing the regression line and confidence bands for that line?
Here they fill in the coefficients in the Model formula by hand and calculate point estimates for a given value (0, and 0.25) for the predictor
f. Afterwards they repeat the procedure with the lower and the upper value of the confidence interval for the coefficients. However, I repeated that and I got something like this: