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.

有帮助吗?

解决方案

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")
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top