Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Positive log likelihoods in xtmixed models


From   "Mansour Farahani" <mfarahan@hsph.harvard.edu>
To   <statalist@hsphsun2.harvard.edu>
Subject   Re: st: Positive log likelihoods in xtmixed models
Date   Wed, 17 Oct 2007 10:58:35 -0400

Since your dependent var is not confined between 0 and 1, like in a binary var, your log likelihood is positive. So, this happens when you have a continuous dependent var.

Mansour

>>> "Kieran McCaul" <kamccaul@meddent.uwa.edu.au> 10/17/07 10:12 AM >>>
Hi everyone,

I'm running some mixed models of growth in aortic diameter over time.
I've run a series of models similar to this one, where a_size is the
diameter in mm.  I've also repeated all of these models, using the log
of a_size as the dependent variable.

gen ln_size = ln(a_size)

Examples of two such models are shown below.

My question is, why am I getting positive log likelihoods for the second
model that uses ln_size as the dependent variable?
I'm getting positive log likelihoods for all of the models that I run on
ln_size.



. xi:xtmixed  a_size  i.opg_1181gc*years  || id: years , cov(unstruct)
mle var
i.opg_1181gc      _Iopg_1181g_1-3     (naturally coded; _Iopg_1181g_1
omitted)
i.opg_1~c*years   _IopgXyears_#       (coded as above)

Performing EM optimization: 

Performing gradient-based optimization: 

Iteration 0:   log likelihood = -7914.8871  
Iteration 1:   log likelihood = -7914.8867  

Computing standard errors:

Mixed-effects ML regression                     Number of obs      =
3557
Group variable: id                              Number of groups   =
627

                                                Obs per group: min =
2
                                                               avg =
5.7
                                                               max =
14


                                                Wald chi2(5)       =
640.10
Log likelihood = -7914.8867                     Prob > chi2        =
0.0000

------------------------------------------------------------------------
------
      a_size |      Coef.   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+----------------------------------------------------------
------
_Iopg_1181~2 |  -.0194946   .5571894    -0.03   0.972    -1.111566
1.072577
_Iopg_1181~3 |   .7094095   .5990142     1.18   0.236    -.4646367
1.883456
       years |   1.402274   .1243886    11.27   0.000     1.158477
1.646071
_IopgXyear~2 |  -.0719107   .1479563    -0.49   0.627    -.3618998
.2180784
_IopgXyear~3 |   .1316498   .1595169     0.83   0.409    -.1809976
.4442971
       _cons |     34.729   .4675183    74.28   0.000     33.81268
35.64531
------------------------------------------------------------------------
------

------------------------------------------------------------------------
------
  Random-effects Parameters  |   Estimate   Std. Err.     [95% Conf.
Interval]
-----------------------------+------------------------------------------
------
id: Unstructured             |
                  var(years) |   1.669906    .132318      1.429702
1.950467
                  var(_cons) |   26.87369   1.577405      23.95325
30.15021
            cov(years,_cons) |   3.654421   .3432374      2.981688
4.327154
-----------------------------+------------------------------------------
------
               var(Residual) |   1.519602   .0462945      1.431522
1.613101
------------------------------------------------------------------------
------
LR test vs. linear regression:       chi2(3) =  7130.28   Prob > chi2 =
0.0000

Note: LR test is conservative and provided only for reference.





. xi:xtmixed  ln_size  i.opg_1181gc*years  || id: years , cov(unstruct)
mle var
i.opg_1181gc      _Iopg_1181g_1-3     (naturally coded; _Iopg_1181g_1
omitted)
i.opg_1~c*years   _IopgXyears_#       (coded as above)

Performing EM optimization: 

Performing gradient-based optimization: 

Iteration 0:   log likelihood =  5058.5355  
Iteration 1:   log likelihood =  5058.5375  
Iteration 2:   log likelihood =  5058.5375  

Computing standard errors:

Mixed-effects ML regression                     Number of obs      =
3557
Group variable: id                              Number of groups   =
627

                                                Obs per group: min =
2
                                                               avg =
5.7
                                                               max =
14


                                                Wald chi2(5)       =
657.50
Log likelihood =  5058.5375                     Prob > chi2        =
0.0000

------------------------------------------------------------------------
------
     ln_size |      Coef.   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+----------------------------------------------------------
------
_Iopg_1181~2 |  -.0003805   .0146312    -0.03   0.979    -.0290571
.0282961
_Iopg_1181~3 |   .0189981   .0157294     1.21   0.227     -.011831
.0498272
       years |   .0345352   .0030077    11.48   0.000     .0286403
.0404301
_IopgXyear~2 |  -.0016794   .0035764    -0.47   0.639    -.0086891
.0053302
_IopgXyear~3 |   .0025355   .0038578     0.66   0.511    -.0050257
.0100968
       _cons |   3.539662   .0122765   288.33   0.000     3.515601
3.563724
------------------------------------------------------------------------
------

------------------------------------------------------------------------
------
  Random-effects Parameters  |   Estimate   Std. Err.     [95% Conf.
Interval]
-----------------------------+------------------------------------------
------
id: Unstructured             |
                  var(years) |    .000947   .0000819      .0007994
.0011218
                  var(_cons) |   .0185358   .0010865      .0165241
.0207924
            cov(years,_cons) |   .0017135   .0002094      .0013031
.0021239
-----------------------------+------------------------------------------
------
               var(Residual) |   .0010365   .0000323      .0009751
.0011019
------------------------------------------------------------------------
------
LR test vs. linear regression:       chi2(3) =  6880.49   Prob > chi2 =
0.0000

Note: LR test is conservative and provided only for reference.

______________________________________________
Kieran McCaul MPH PhD
WA Centre for Health & Ageing (M573)
University of Western Australia
Level 6, Ainslie House
48 Murray St
Perth 6000
email: kamccaul@meddent.uwa.edu.au
http://myprofile.cos.com/mccaul 
_______________________________________________



*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index