cces18D$Classification <- recode(cces18D$Classification, "1=0; 2=1")
cces18D$Classification <- as.factor(cces18D$Classification)
prediction.frame <- expand.grid(CC18_325d = levels(cces18D$CC18_325d))
predictions <- predict.glm(m1,
CC18_325d = prediction.frame, type = "response",se.fit = T)
predictions <- as.tibble(cbind(prediction.frame, predictions))
predictions <- mutate(predictions,
lwr = fit - 1.96*se.fit,
upr = fit + 1.96*se.fit)
Error in data.frame(..., check.names = FALSE) : arguments imply differing number of rows: 0, 58430
6. stop(gettextf("arguments imply differing number of rows: %s", paste(unique(nrows), collapse = ", ")), domain = NA)
5. data.frame(..., check.names = FALSE)
4. cbind(deparse.level, ...)
3. cbind(prediction.frame, predictions)
2. as_tibble(x, ...)
1. as.tibble(cbind(prediction.frame, predictions))