The e(rules) matrix is listed as one of the returned matrices after -erturn
list- thought it listed in the manual.
I believe it has to with marking collinear variables, though this is only a
guess. The problem can be replicated using the auto dataset and one
solution appears to be using only non-collinear variables.
For example:
. sysuse auto, clear
(1978 Automobile Data)
. svyset [pw = weight], strata(fore)
pweight: weight
VCE: linearized
Strata 1: foreign
SU 1: <observations>
FPC 1: <zero>
. mark low if price < 5000
. xi: svy, subpop(fore): probit low mpg i.rep
i.rep78 _Irep78_1-5 (naturally coded; _Irep78_1 omitted)
(running probit on estimation sample)
note: _Irep78_2 dropped due to collinearity
note: _Irep78_4 dropped due to collinearity
Survey: Probit regression
<snip>
. matrix list e(rules)
e(rules)[2,4]
c1 c2 c3 c4
_Irep78_2 4 0 0 0
_Irep78_4 4 0 0 0
. mfx
invalid e(rules) matrix
r(322);
. qui xi i.rep
// Using only rep78_3 and rep78_5 since rep78_1 is initially dropped
// and rep78_2 and rep78_4 are collinear
. qui svy, subpop(fore): probit low mpg _Irep78_3 _Irep78_5
. matrix list e(rules)
e(rules)[1,4]
c1 c2 c3 c4
r1 0 0 0 0
. mfx
Marginal effects after svy:probit
y = Pr(low) (predict)
= .22207314
---------------------------------------------------------------------------
variable | dy/dx Std. Err. z P>|z| [ 95% C.I. ] X
---------+------------------------------------------------------------------
mpg | .0436511 .01827 2.39 0.017 .007841 .079461 20.0721
_Irep7~3*| .3748922 .33032 1.13 0.256 -.272516 1.0223 .473065
_Irep7~5*|-.1324062 .14408 -0.92 0.358 -.414794 .149981 .122126
----------------------------------------------------------------------------
(*) dy/dx is for discrete change of dummy variable from 0 to 1
Hope this helps,
Scott
> -----Original Message-----
> From: [email protected] [mailto:owner-
> [email protected]] On Behalf Of Richard Williams
> Sent: Saturday, February 04, 2006 3:34 PM
> To: [email protected]
> Subject: Re: st: mfx after svy: probit - "invalid e(rules) matrix" error
>
> At 03:48 PM 2/4/2006, Erin Strumpf wrote:
>
> >That may have to suffice for now, until I can figure out what an
> >e(rules) matrix is....
>
> Good question. I can't find it in either the manuals or the online help.
>
> Do make sure that you not only have Stata 9.1, but the latest and
> greatest version of 9.1, i.e. type
>
> -update all-
>
> You might also try it without the -subpop- option. The similar
> examples I have tried all work fine, which makes me suspect that
> either (a) you aren't 100% up to date or (b) maybe there is something
> odd about your variables or your subpop variable.
>
> One other thing you might try: If your data were svyset in Stata 8,
> then the svyprobit command should work with them. It would be something
> like
>
> xi: svyprobit rfullret tx2 i.ragey_e rfemale i.rraceeth i.raedcat,
> subpop(temp)
> mfx
>
> If it was svyset in Stata 9, you may be able to first do something like
>
> version 8.2: svyset...
>
>
>
> -------------------------------------------
> Richard Williams, Notre Dame Dept of Sociology
> OFFICE: (574)631-6668, (574)631-6463
> FAX: (574)288-4373
> HOME: (574)289-5227
> EMAIL: [email protected]
> WWW (personal): http://www.nd.edu/~rwilliam
> WWW (department): http://www.nd.edu/~soc
>
> *
> * 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/