# Interpretation of R output of logistic regression with two categorical variables

I am using logistic regression within R to analyze my data, but I don't know how to interpret it with 2 categorical variables (the examples I found on the internet and / or stackoverflow were only with categorical variable).

I want to know which factors influence the whether or not an individual has a disease (1: yes, 0: no). My data are structured according to:

City: Manhattan, New York
hospital: St. Mary, Avante, Copperfield
bloodshugar: 1, 28, 7 ... , 66 (numeric)
timetoreact: 113, 423, 334, ... (numeric),


I have put all of these factors (i.e., disease dependent on: City, hospital, City:hospital, ...) into my glm. In the output I am encountering the problem that the first level of my factors alphabetically seemingly disappear, so for my factor of city, "Manhattan" does not appear, for hospital "Avante" is gone (and so on).

The output reports:

NewYork:Bloodshugar: Coeff.: 0.034


This makes it difficult for me to determine how some of the levels of my factors interact, e.g., Manhattan:Bloodshugar does not appear in my output.

Is it the difference of the incline from the probability on bloodshugar in Newyork in comparison to Manhattan? Where would I look to see if the probability of having a disease is positively or negatively correlated with bloodshugar in New York? When there's written bloodshugar: Coef.: 0.021, is it the bloodshugar "mean" of Manhattan and New York or is it just from Manhattan?

What is the intercept now? Is it the probability that individuals will have a disease when treated in the Avantehospital and raised in Manhattan (because it's always the first letter)?

I hope I gave enough information and am happy to provide more detail if necessary.

## 1 Answer

In the output I am encountering the problem that the first level of my factors alphabetically seemingly disappear, so for my factor of city, "Manhattan" does not appear, for hospital "Avante" is gone (and so on)

I guess these levels are set as reference category. To change a reference level, use relevel().

This makes it difficult for me to determine how some of the levels of my factors interact, e.g., Manhattan:Bloodshugar does not appear in my output.

As said above, Manhattan seems to be the reference level, which is not included in the output. NewYork:Bloodshugar is the interaction term of City New York with Bloodshugar values, i.e. the moderating effect of New York on (the relation of) Bloodshugar and disease.