Dear Stata community,
I am encountering a problem when comparing nested RE models (xtreg fitted with the mle option) via a classical LR-test. Somehow, the likelihood of the “constant-only” model depends on the included covariates which cannot be right according to my statistical understanding (I may be wrong…
). Thus, the lrtest command breaks down, consequently.
I suppose that the five iteration steps used in the maximization algorithm by Stata are not enough for convergence in my cases, but I have not found a solution to control the maximization of the constant-only model. The maximization options seem to control only the “full model” iteration.
Of course, I can use other statistical ways to answer my research questions, but, still, I would like to know, if someone has an idea how to solve this problem!
Here are the syntax-lines and the Stata output (only the iterations – the sample is the same for both models). I am using Stata 13.1(SE). The regression models here are just for the illustration of my problem (not relevant scientifically).
xtreg f1_b_adl_mean_p f0_b_adl_mean pat_geschl, re mle
Fitting constant-only model:
Iteration 0: log likelihood = -1007.1993
Iteration 1: log likelihood = -959.5081
Iteration 2: log likelihood = -948.76029
Iteration 3: log likelihood = -947.83178
Iteration 4: log likelihood = -947.82099
Fitting full model:
Iteration 0: log likelihood = -811.72657
Iteration 1: log likelihood = -811.59739
Iteration 2: log likelihood = -811.54593
Iteration 3: log likelihood = -811.54571
Random-effects ML regression Number of obs = 380
Group variable: pat_fk_arzt Number of groups = 86
est store model_1
xtreg f1_b_adl_mean_p f0_b_adl_mean if _est_model_1==1, re mle
Fitting constant-only model:
Iteration 0: log likelihood = -1007.6565
Iteration 1: log likelihood = -959.62366
Iteration 2: log likelihood = -948.75704
Iteration 3: log likelihood = -947.81074
Iteration 4: log likelihood = -947.79955
Fitting full model:
Iteration 0: log likelihood = -811.72428
Iteration 1: log likelihood = -811.59933
Iteration 2: log likelihood = -811.55918
Iteration 3: log likelihood = -811.55903
Random-effects ML regression Number of obs = 380
Group variable: pat_fk_arzt Number of groups = 86
est store model_2
lrtest model_1 model_2
log likelihood of null models differ: -947.821 vs. -947.7996
r(498);
Thank you very much!
Best wishes,
Johannes Hertel
I am encountering a problem when comparing nested RE models (xtreg fitted with the mle option) via a classical LR-test. Somehow, the likelihood of the “constant-only” model depends on the included covariates which cannot be right according to my statistical understanding (I may be wrong…

I suppose that the five iteration steps used in the maximization algorithm by Stata are not enough for convergence in my cases, but I have not found a solution to control the maximization of the constant-only model. The maximization options seem to control only the “full model” iteration.
Of course, I can use other statistical ways to answer my research questions, but, still, I would like to know, if someone has an idea how to solve this problem!
Here are the syntax-lines and the Stata output (only the iterations – the sample is the same for both models). I am using Stata 13.1(SE). The regression models here are just for the illustration of my problem (not relevant scientifically).
xtreg f1_b_adl_mean_p f0_b_adl_mean pat_geschl, re mle
Fitting constant-only model:
Iteration 0: log likelihood = -1007.1993
Iteration 1: log likelihood = -959.5081
Iteration 2: log likelihood = -948.76029
Iteration 3: log likelihood = -947.83178
Iteration 4: log likelihood = -947.82099
Fitting full model:
Iteration 0: log likelihood = -811.72657
Iteration 1: log likelihood = -811.59739
Iteration 2: log likelihood = -811.54593
Iteration 3: log likelihood = -811.54571
Random-effects ML regression Number of obs = 380
Group variable: pat_fk_arzt Number of groups = 86
est store model_1
xtreg f1_b_adl_mean_p f0_b_adl_mean if _est_model_1==1, re mle
Fitting constant-only model:
Iteration 0: log likelihood = -1007.6565
Iteration 1: log likelihood = -959.62366
Iteration 2: log likelihood = -948.75704
Iteration 3: log likelihood = -947.81074
Iteration 4: log likelihood = -947.79955
Fitting full model:
Iteration 0: log likelihood = -811.72428
Iteration 1: log likelihood = -811.59933
Iteration 2: log likelihood = -811.55918
Iteration 3: log likelihood = -811.55903
Random-effects ML regression Number of obs = 380
Group variable: pat_fk_arzt Number of groups = 86
est store model_2
lrtest model_1 model_2
log likelihood of null models differ: -947.821 vs. -947.7996
r(498);
Thank you very much!
Best wishes,
Johannes Hertel