# Interpreting regression coefficients with partial dummy vs. effects coding and multiple factors

I have been working with a data file in R that contains two primary categorical variables : study location (study, 19 levels) which is a nuisance variable and race (4 levels) which is the outcome of interest. There are other variables in the model (age) but as they do not change I don't think they impact my question.

I was originally told to run a logistic regression model where both study and race were dummy coded. E.g. for race:

white  0 0 0
black  1 0 0
latino 0 1 0
asian  0 0 1


The results for whether race was significantly different from white were then interpreted from the regression summary of the beta coefficients and their p-values. However, isn't the interpretation of the raceBlack coefficient, for example, the marginal difference between white and black at the reference of the site variable? I then recoded the site variable to effects coding using contrasts(data\$site) = contr.sum(n) yielding, as an example if n=4:

       [,1] [,2] [,3]
site1    1    0    0
site2    0    1    0
site3    0    0    1
site4   -1   -1   -1


This resulted in an expected change to the intercept, but both the estimates and p-values for the race coefficients (still dummy coded) did not change. I thought the new interpretation of the raceBlack coefficient would be, "the difference between white and black at the average of site location." Have I done something incorrectly or does my thinking need correcting?

The correct interpretation of the dummy-coded raceBlack coefficient is the associated difference in outcome from the reference level of race when all other predictors are held constant. The particular way the other predictors are coded doesn't matter if race isn't involved in an interaction with any of them.
As an aside: if location is just a nuisance variable, you might be better off treating it with a random intercept in a mixed model instead of trying to estimate 18 coefficients for its 19 levels.