I've noticed that there are some data analysis being done in some scientific field where the authors would split out an entire dataset into subsets based on a particular property. One classic example would be splitting an entire dataset into subsets containing control versus disease subjects. What got me a little confused is that the authors would then proceed to build two separate models, one for each subset of the data, and then proceed to compare the models head to head.
Some authors would simply look at the coefficients and say there are "distinct" signatures that separate the regression, others could use a Z test (credit to the post: Testing equality of coefficients from two different regressions) where the formula is as follows:
$Z = \frac{( \beta_1 - \beta_2)}{\sqrt((SE\beta_1)^2 + (SE\beta_2)^2)}$
Where $\beta_1$ and $\beta_2$ are the coefficients of each respective model, and $SE\beta_1$ and $SE\beta_2$ are the standard errors of their respective models.
What confuses me is what's the distinction between using one linear model that interrogates the entire dataset by having the groups (in this example disease versus control) as a fixed effect versus building two separate models and then comparing their coefficients instead?
I believe there is a difference in the math, especially since if it is a linear regression, the OLS method would result in different coefficients if the entire dataset was used (versus building two separate models based on their respective subsets). This is even more alarming to me since if the residuals are different, then the interpretationof one large model versus comapring two separate models are not the same, and then so what is the difference in the interpretation?