I have a dataset with explanatory variable $X$ and response variable $Y$. Besides, there is a two-level factor $S_{j}, j=1,2$. The random error variance might be different between these two strata. I am applying three models to a data set.
Model 1, simple linear regression model: $Y_{i}=\alpha+\beta\times X_{i}+\epsilon_{i}$ where $\epsilon_{i} ~N(0,\sigma^{2})$
Model 2, linear regression model with varying variance per sratum: $Y_{i}=\alpha+\beta\times X_{i}+\epsilon_{i}$ where $\epsilon_{i} ~N(0,\sigma^{2}_{j})$. (The coefficients of this model can be estimated using generalized least squares)
Model 3: stratified linear model: $Y_{i}=\alpha+\beta_{1}\times X_{i,j=1}+\beta_{2}\times X_{i,j=2}+\epsilon_{i}$ where $\epsilon_{i} ~N(0,\sigma^{2})$
I have read that model 1 and 2 are nested, and the null hypothesis for the likelihood ratio test is H0: $\sigma_{1}=\sigma_{2}$. Similarly, model 1 and 3 are nested, with H0: $\beta_{1}=\beta_{2}$.
According to my understanding, a nested model means that we are able to assign some of the parameters to zero. In these examples, I find it quite difficult to assign some parameters to zero. Can someone help me to clarify this? Can I find some formal definition of what a nested model is?
I could think of re-wiring $\sigma_{2}=\sigma_{1}+\delta$ or $\beta_{2}=\beta_{1}+\delta$. Thus, both null hypothesis become $\delta=0$. However, my concerns is that the $\sigma$ or $\beta$ in model 1 are estimated from the entire dataset, while $\sigma_{i}$ or $\beta_{i}$ are estimated from strata. Is this a problem?