I'm running a logistic regression for an alumni population to indicate what factors relate to odds of giving. For gender I have a variable that I coded (1,0) so it's binary. If I want to include degrees (i.e. BA, BS, MBA, and PHD) do I create 4 binary variables so that if someone has a BA then they would have 1 in the BA column but 0 for BS, MBA, and PHD? I just want to take sure I code it correctly. Thank you!
You can code highest degree (4 categories) in one of four dummy variables, dropping one in analysis. It is common to use highest degree for people with more than one.
You might want to track people with multiple degrees, eg, both a BA and MBA. If there are a sufficient number, then you can go either of two directions.
One way is to have a category for each combination of degrees (total of 15 since everyone has a degree). Several categories will be empty and you will drop those and one of the categories that has respondents. Some categories might be too small for useful analysis and you might combine some after examining the frequencies.
You could also consider an in-between categorization where you categorize each person in each category for which they have a degree. Some people will be in two categories, some in three, nearly none in four. If there are sufficient numbers of people you should be able to include all four variables in a regression analysis.
I suspect that MBAs are the best givers. You want to capture that kind of information in your coding.
You can do exactly what you are saying, except that you can (read: should) only use three binary variables if you have 4 levels, or you will create a singular model fit.
What software are you using? This can be easily implemented in R without manually creating binary variables. If you have them coded in R as a character or factor, you don't need to do anything, otherwise, something like this:
m <- glm(y ~ x1 + x2 + as.factor(x3), family = binomial, data = df)