Вопрос

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