# Is this a nested model and can I use the likelihood ratio test?

I have a data set, total_data and I applied a model to it. For instance, the model has one parameter $\beta$, and I calculated the log-likelihood of the fitted model (using maximum likelihood method). In the mean time, I have a stratification variable that could divide total_data into two subsets: high_risk_data and low_risk_data. Now, I could apply the same model to each subset, obtaining $\beta_1$ and $\beta_2$. I could sum up the log-likelihood from each fitting and obtain some kind of overall log-likelihood for the total_data under model 2.

Model 1: parameter $\beta$ fitted on total_data;
Model 2: parameters $\beta_1$ and $\beta_2$ fitted on each subset of data.

Can I consider them as nested models, since I have one fewer parameter in model 1? Can I apply the likelihood ratio test to select a better model?

I know a more standard way to obtain something similar to model2: introduce a second stratification variable-group and apply the model ($\beta$,$\beta_{group}$) to the total_data. The likelihood ratio test would be to test against H0:$\beta_{group}=0$. Is this the same as the method I described above?

• What is 'maxlog-likelihood'? Is it the maximum of the log-likelihood, or the maximizer of it? Whichever it is, why can you sum them? Do you mean instead that the log-likelihoods for the subsets can be added to obtain the overall log-likelihood, or that the maximum value of the overall log-likelihood must always be the sum of the two maximum values obtained on the subsets? Jun 20 '13 at 9:40
• Yes, this is what I suppose in this method: the log-likelihoods for the subsets can be added to obtain the overall log-likelihood. I don't know whether this is valid and I need some expert to point out what's the problem with this. Jun 20 '13 at 10:17
• You still need to resolve the question of what you mean by "maxlog-likelihood" earlier; I suggest making an edit to clarify both parts of your question. Jun 20 '13 at 10:19
• I know a more standard way to obtain something similar to model2: introduce a second stratification variable-group and apply the model ($\beta$,$\beta_{group}$) to the total_data. The likelihood ratio test would be to test against H0:$\beta_{group}=0$. Is this the same as the method I described above? Jun 20 '13 at 10:20
• That's a very good question to ask. You should edit to add that to your question. Jun 20 '13 at 10:27

To answer my questions. Yes, they are nested models. Here is an example of linear model. Fitting two separate models to each subgroup:

model 1: $Y=\alpha'+\beta'X_{1}+\epsilon$ (when $X_{2}=group1$)

model 2: $Y=\alpha''+\beta''X_{1}+\epsilon$ (when $X_{2}=group2$)

equals

model3: $Y=\alpha+\beta_{1}X_{1}+\beta_{2}X_{2}+\beta_{3}X_{1}X_{2}+\epsilon$

It turns out that:

$\alpha'=\alpha$

$\beta'=\beta_{1}$

$\alpha''=\alpha+\beta_{2}$

$\beta''=\beta_{1}+\beta_{3}$

and $RSS_{model3}=RSS_{model1}+RSS_{model2}$

Therefore, $Y=\alpha+\beta X_{1}+\epsilon$ is nested in the fitting by using model 1 and 2.