문제

I'm using glm function in R to predict, based on a response variable of type factor, that has the following levels positive, negative.

I want to know how to interpret the predictions when using predict (with type=response), because they're probabilities, but of which level, positive or negative?

도움이 되었습니까?

해결책

If you do

levels(your_y_variable)

The first level is used as reference and the model predicts to probability of the second level. You can change the reference using relevel.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top