Is a 2-way ANOVA immune to Simpson's Paradox? Sometimes continuous data is of the type that would result in Simpson's Paradox findings if groups were simply aggregated.  (See, for example, "Example #2: Baseball" on this page https://www.kdnuggets.com/2020/09/simpsons-paradox.html.)
In that type of situation, would analyzing the data using a 2-way ANOVA always avoid the spurious finding?  In the baseball example, would the paradox effect simply be seen as a year effect and the player effect would be correctly seen?

Look at the image

The right image shows the main effects and the (tiny) cross effect, but it does not directly explain why the marginal distribution on the left is larger for Derek Jeter.
The reason that causes the paradox is that the average over the two years (on the left) is computed with different weights. Derek's good 1996 result counts relatively more strongly than David's good 1996 result because they did this with different amounts of bats.
One way that Simpson's paradox will be apparent is that adding a factor to the model can invert the direction of another effect. Without year as a factor, the effect of Derek vs David is positive. With year included in the model, the effect becomes negative. But, this doesn't make the two-way model immune to the paradox. You need to define this 'immune' carefully. Whether the two-way model is a good thing or not depends on whether you want to consider the extra parameter or not and whichever way is the rigt way to interpret the data, this depends on the context (Simpson's second paradox).
