bayesglm을 사용할 때 예측 기능에 문제가 있습니다. 필자는 샘플 데이터가 부족한 경우 샘플 데이터보다 더 많은 레벨이있을 때이 문제가 발생할 수 있다고 말하는 게시물을 읽었지 만 적합 및 예측 기능에 동일한 데이터를 사용하고 있습니다. Predict는 보통 glm으로는 정상적으로 작동하지만 bayesglm에서는 작동하지 않습니다. 예 :베이 스 예측, 경계 첨자
control <- y ~ x1 + x2
# this works fine:
glmObject <- glm(control, myData, family = binomial())
predicted1 <- predict.glm(glmObject , myData, type = "response")
# this gives an error:
bayesglmObject <- bayesglm(control, myData, family = binomial())
predicted2 <- predict.bayesglm(bayesglmObject , myData, type = "response")
Error in X[, piv, drop = FALSE] : subscript out of bounds
# Edit... I just discovered this works.
# Should I be concerned about using these results?
# Not sure why is fails when I specify the dataset
predicted3 <- predict(bayesglmObject, type = "response")
bayesglm 개체를 사용하여 예측하는 방법을 알아낼 수 없습니다. 어떤 아이디어? 감사!