Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: decrease ll nested models sem
From
[email protected] (Jeff Pitblado, StataCorp LP)
To
[email protected]
Subject
Re: st: decrease ll nested models sem
Date
Wed, 26 Mar 2014 17:23:13 -0500
Volker Lang <[email protected]> is using -sem- and noticed that the
log-likelihood decreased when adding an exogenous variable.
> I'm fitting a log-linear regression model using "sem".
> (It shall later be extended to a path model with robust s.e.'s,
> therefore "sem".)
>
> Question:
> Why does the log likelihood in comparison of the two nested models
> estimated with "sem" decrease?
> (It does not happen if I use a different estimation command, e.g.,
> "sureg .. , isure".
> Also, in this case coefficients and s.e.'s estimated by "sem" and
> "sureg .. , isure" are identical,
> so why does the log likelihood differ between these estimation
> commands at all?)
>
> Here is the output:
>
> . sem (grade_l <- infov_l)
> ..
> Iteration 1: log likelihood = -175.8425
>
> Structural equation model Number of obs = 1281
> Estimation method = ml
> Log likelihood = -175.8425
> ..
>
> . sem (grade_l <- infov_l ued_l)
> ..
> Iteration 1: log likelihood = -513.0155
>
> Structural equation model Number of obs = 1281
> Estimation method = ml
> Log likelihood = -513.0155
> ..
>
> . sureg (grade_l infov_l), isure
> Iteration 1: tolerance = 7.234e-17
> ..
> . di e(ll)
> -677.17747
>
> . sureg (grade_l infov_l ued_l), isure
> Iteration 1: tolerance = 1.447e-16
> ..
> . di e(ll)
> -656.64981
Notice that the reported log-likelhoods between the "equivalent" -sem- and
-sureg, isure- models do not agree.
Model 1: grade_l <- infov_l
sem: -175.8425
sureg, isure: -677.17747
Model 1: grade_l <- infov_l ued_l
sem: -513.0155
sureg, isure: -656.64981
This hints that -sem- is computing a difference log-likelihood from -sureg-.
In fact, -sem-'s log-likelihood is not conditional on the observed exogenous
variables while -sureg, isure-'s is.
If Volker intends to make direct comparisons between the reported
log-likelihoods from -sem- output, such as the -lrtest- command, then all
observed exogenous variables must be present in the fitted models; otherwise,
the likelihoods are not comparable.
Here is a silly example using the auto data. We will use -lrtest- to test the
significance of the -trunk- coefficient.
. sysuse auto
# constrained model
. sem (mpg <- turn trunk@0)
. est store sem0
# full model
. sem (mpg <- turn trunk)
. est store sem1
. lrtest sem0 sem1
We can easily verify/validate the results from -lrtest- by using -regress-:
. regress mpg turn
. est store reg0
. regress mpg turn trunk
. est store reg1
. lrtest reg0 reg1
--Jeff
[email protected]
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/