Error when trying to make a prediction on model average

Trying to make ggpredict work with an average model created with model.avg, but I get the error
"Error: $ operator is invalid for atomic vectors".

If you try the code example bellow you should get the same error. The average model works with the predict function, which is what ggpredict uses. But for some reason unknown to me I can't make it work with ggpredict...


fm1 <- lm(y ~ X1 + X2 + X3 + X4, data = Cement, na.action =

ms1 <- dredge(fm1)
confset.95p <- get.models(ms1, subset = cumsum(weight) <= .95)
avgm <- model.avg(confset.95p)

ggp = ggpredict(avgm, terms = "X1")

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.