Fred Wolfe mentioned that -xtmixed- could not be used with -mi estimate- and I
replied that they could be used together if one specified -mi estimate-'s
-cmdok- option:
. mi estimate, cmdok: xtmixed ...
The full post can be found at
http://www.stata.com/statalist/archive/2009-08/msg00384.html.
Alan Taylor <[email protected]> then wrote,
> It might be helpful to know, roughly speaking, what the distinction is
> between a command which officially supports mi and one, like xtmixed, which
> can be used with cmdok.
Commands are officially supported by -mi estimate- if they
1. produce the numerical results that -mi estimate- needs and stores them
where -mi estimate- expects (explained below)
2. work properly with available -mi estimate- postestimation tools, and
3. produce good-looking -mi estimate- output.
When I wrote my reply, I happened to know that -xtmixed- meets the first
requirement. -xtmixed- will be added to the list of supported commands once
we verify that it meets the other requirements, too. Most Stata estimation
commands meet requirement (1). To meet requirement (1), the command must
1.1 save its name in global macro -e(cmd)-,
1.2 save the estimated coefficients in -e(b)-
1.3 save the full variance-covariance matrix estimate in -e(V)-,
1.4 save the residual degrees of freedom in -e(df_r)- or, if there is
no such concept as residual degrees, leave -e(df_r)- undefined.
-xtmixed- meets the above requirements. As an example, Stata's -exlogistic-
estimation command violates (1.3) in that it does not even estimate the full
variance-covariance matrix, and therefore should not be used with -mi
estimate, cmdok-.
In any case, when you specify -cmdok-, you are asserting (1.1)-(1.4) are
true.
The only reason that -xtmixed- is not on the list of supported commands is
because we have not yet performed adequate testing of (2) and (3). The issues
here are not concerns about inaccurate or inappropriate results, but merely
that the output might look ugly.
-xtmixed- will eventually be listed as officially supported along with other
estimation commands.
--Yulia
[email protected]
P.S. Programmers:
If you want to write an estimation command that works with -mi estimate-
even without the user specifying -cmdok-, see "Writing programs for use
with mi" in -help program properties-.
<end>
*
* 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/