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: -gllamm- vs -meglm-
From
[email protected] (Isabel Canette, StataCorp)
To
[email protected]
Subject
Re: st: -gllamm- vs -meglm-
Date
Tue, 02 Jul 2013 17:32:22 -0500
Jeph Herrin <stata(at)spandrel(dot)net> is getting the "initial values not
feasible" error from -meglm- for a model and dataset that -gllamm- is able
to fit:
> This is my first use of the new mixed effects GLM routine in Stata 13, and I
> am trying to reproduce results I have using -gllamm- from SSC. My question
> pertains to the use of the -startgrid()- option.
> Using -gllamm- I estimated
. gllamm depvar, i(id) link(log) family(poisson)
> which after 5 iterations reports:
------------------------------------------------------------------------------
depvar | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
_cons | 3.392516 .0015251 2224.39 0.000 3.389527 3.395505
------------------------------------------------------------------------------
Variances and covariances of random effects
------------------------------------------------------------------------------
***level 2 (id_hrr)
var(1): .00598911 (.00020843)
------------------------------------------------------------------------------
> However, every attempt to estimate this model using the new -meglm-
> . meglm depvar || id:, link(log) family(poisson)
> gives me "initial values not feasible". I have tried all four different
> startvalue() options, and many different -startgrid() options, with no
> success.
> In particular, I would think that using the above variance estimate in
> -startgrid()- would be a reasonable initial value, but
> . meglm depvar || id:, link(log) family(poisson) startgrid(.005989)
> also produces "initial values not feasible". Anyone have any thoughts on why
> one model converges quickly and the other not at all? I have 30k obs in 100
> groups.
With Jeph's help, we were able to reproduce the problem.
The data used to reproduce the problem contained some groups that contain more
than one-thousand (1,000) observations. The resulting conditional
log-likelihood contributions from these groups were large and negative, making
it possible to yield missing values in some of the intermediate analytical
derivative calculations. We could not find a set of starting values that
allowed the analytical derivatives to be computed without getting some missing
values.
-gllamm- employs numerical derivatives, so it did not have any trouble fitting
this model. There is a not documented option of -meglm- that specifies
numerical derivatives be used instead of analytics. This option is
-evaltype(gf0)-.
. meglm depvar || id:, link(log) family(poisson) evaltype(gf0)
By default, -meglm- employs mean-variance adaptive quadrature, so the
equivalently specified model in -gllamm- is:
. gllamm depvar, i(id) link(log) family(poisson) adapt
Although the -me- commands were not designed to work with data containing such
large groups, we plan to add and document a more esthetically pleasing synonym
for option -evaltype(gf0)- to help in this case. Rest assured that the
-evaltype(gf0)- option will continue to work for the foreseeable future now that
we have announced its existence on Statalist.
--Isabel --Jeff
icanette(at)stata(dot)com jpitblado(at)stata(dot)com
*
* 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/