Error in the code

Dear community,

when I type in my code, R give me the following error. See code and error in the attached picture.
Can you tell me what my mistake is and how I can fix it?

Thank you a lot!

Welcome to the community @joeweide98! It appears glm() is expecting admit to be a numeric value between 0 and 1. Below is one way to recode yes/no to 1/0.

mydata$admit = as.numeric(mydata$admit == 'yes')
1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.