Let's assume that:

• we are interested in the effect of X1 on Y
• that our data suits well for hierarchical modelling
• different cities have different number of subjects in our data

Y ~ x1 + CITY


Hierarchical model:

Y ~ x1 + (1 | CITY)


I know that both models' conditional effects of X1 on Y are adjusted to CITY. But what are the differences in these two types of adjustings? When should we prefer adjusting with additive and when with hierarchical modelling?

Difference is in how the sample draw is treated in these cases. In fixed effects estimation (former), parameters are estimated for the given term expecting that it is a fixed quantile, while in the hierarchical model, parameter of the random effect term is considered to be a random variate (It is by default centered at 0 but offsets can be easily introduced). It is assumed for the former model that error is independently normally distributed, while for the later the assumption is relaxed with opportunity to allow specification of custom variance structure or either grouping factor (CITY) or the error or both.