0

I have a predictor "Course" that has 50+ values, such as Engineering and Psychology. I'm performing logistic regression analysis with mental health as the response and Course as a predictor, but the output lists each course value, instead one Course variable. How do I combine all of the course values together so that the output is just "Course," and not "CourseEngineering" or "CoursePsychology"? Thanks!

I expected to see just "Course" in the results, but I'm getting "Course" in addition to every course subject, which isn't what I want. Examples are "CourseHuman Resources" and "CourseIT"

Phil
  • 7,287
  • 3
  • 36
  • 66
  • Welcome to StackOverflow. In order for others to help you, more information is required. Please read this: https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example and edit your question to include the suggestions therein. – John Polo Nov 13 '22 at 01:10
  • Greetings! Usually it is helpful to provide a minimally reproducible dataset for questions here so people can troubleshoot your problems. One way of doing this is by using the `dput` function. You can find out how to use it here: https://youtu.be/3EID3P1oisg – Shawn Hemelstrand Nov 15 '22 at 02:19

0 Answers0