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: moptimize gf evaluator
From
[email protected] (Jeff Pitblado, StataCorp LP)
To
[email protected]
Subject
Re: st: moptimize gf evaluator
Date
Tue, 16 Nov 2010 15:46:13 -0600
Klaus Pforr <[email protected]> had a follow-up question related to
-moptimize()- and the -gf- evaluator types:
> Thank you for extensive and helpful answer. I'm still waiting for my
> copy of the new edition of "ML with stata".
>
> And it is correct, that by adding the derivatives of the panel-level log
> likelihood with respect to the beta coefficients, I enable my evaluator
> to correctly handle the robust, cluster and svy options, isn't it? I
> understand the 2006 edition of "ML with stata" and the help files, that
> I need the observation level scores for that.
>
> I want to implement a modified conditional logit estimator, and I want
> it to handle the cluster option (robust and weights are not that
> important, but they seem to processable, once you specify the scores,
> which you need for the cluster option anyway). Therefore it seems
> necessary to implement the evaluator as a gf2 type and not as d2 type
> evaluator. I need the gradient and the hessian to gain speed and
> precision, as the likelihood has a computationally complex denominator.
Yes, the -gf- evaluator types allow for robust, cluster, and -svy- options.
In my previous post, change the line
moptimize_result_display(M)
to
moptimize_result_display(M, "robust")
to get the robust standard errors for the fitted model.
Panels must be nested within clusters for -moptimize()- to compute clustered
variances.
There is currently a bug in how -moptimize()- performs the conformability
check of the scores with the data/groups. This bug causes
-moptimize_result_display(M, "robust")- to exit with a conformability error
before it can report the coefficient table.
We'll have this fixed in a future ado-file update; however, in the mean time,
just change the call
moptimize_init_by(M, panel)
to
moptimize_init_by(M, "i")
to get -moptimize_result_display()- to report the robust standard errors in
the coefficient table.
--Jeff
[email protected]
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/