Frage

I am looking to do credit scoring using logistic regression in R and I am stumped on this...

If I have a categorical variable "Residence" with factors "Own", "Rent" and "Other" and I want to set the weight of "Other" to zero so that it is neutral in the model what would be the best way to do this in glm in R?

We can do this manually using Fico Model Builder but I'm not sure how to do it in R.

Thanks.

War es hilfreich?

Lösung

If you want to omit cases with Residence=="Other" then use the subset argument to glm().

 logmod <- glm(binaryvar ~ covar1 + Residence, data=dat, 
               subset= Residence =="Other", family="binomial")
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top