# SV: st: Problems with calculating marginal effects for categorical variables in ologit models

 From "Lina Jonsson" <[email protected]> To <[email protected]> Subject SV: st: Problems with calculating marginal effects for categorical variables in ologit models Date Wed, 23 Apr 2008 11:13:21 +0200

```Hello.

I recieve the same error message when I'm using margeff after ologit.

When entering:

xi: ologit F24 i.SDO i.F17_A [pweight=VIKT] if F24!=6
margeff, dummies(_I*)

I recieve:

r(111);

But I don't think the problem lies within the dummies option because I recieve the same error message when I'm using the margeff command without specifying , dummies(_I*)

Any ideas what could be the problem?

Best regards

/Lina Jonsson

> -----Ursprungligt meddelande-----
> Fr�n: [email protected]
> [mailto:[email protected]] F�r Joao Ricardo F. Lima
> Skickat: den 22 april 2008 13:31
> Till: [email protected]
> �mne: Re: st: Problems with calculating marginal effects for
> categorical variables in ologit models
>
> Eva,
>
> or then
>
> margeff, dummies(d*)
>
> because he said "D are all dummies for which you want to
> calculate the marginal
> > effects" not B.
>
> Best,
>
> Joao Lima
>
>
> 2008/4/22, Eva Poen <[email protected]>:
> > I cannot reproduce your problem using the auto data (see example
> > below). Btw, it's unlikely that you have literally typed -Margeff,
> > dummies (B *)-. Instead, you probably wrote -margeff, dummies(B*)-.
> >
> > Also, you said "D are all dummies for which you want to
> calculate the
> > marginal effects". The option -dummies- does not mean that marginal
> > effects will be calculated only for these variables. The option
> > ensures that, for the process of calculating marginal effects, only
> > one of the dummies will be set equal to 1, while all others
> are set to 0.
> >
> > If you send the exact code of your ologit model and the margeff
> > command to the list, people will be more likely to help.
> >
> > Eva
> >
> > ** example
> > sysuse auto, clear
> > tab headroom, gen(hr) /* create dummies */ ologit rep78
> foreign  hr1
> > hr2 hr3 hr4 hr5 hr6 hr7 margeff, dummies(hr*)
> > ** end of example
> >
> >
> >
> >
> > 2008/4/22, [email protected]
> <[email protected]>:
> > > Dear users,
> > >
> > >  My question is following one: I do not know how to calculate
> > > average marginal effects (AME) for categorical variables
> with more
> > > than two categories?
> > >  In my ordered logit model, I have a dependent variable with 4
> > > categories and 5 categorical explanatory variables, 3 of
> them with
> > > more than two categories. I tried to implement the method
> of Tam�s
> > > Bartus which is decribed in his article "Estimation of
> marginal effects using margeff"
> > > (2005). His suggestion is to use the following command:
> > >  Margeff, dummies (B *)
> > >  where D are all dummies for which you want to calculate the
> > > marginal effects.
> > >  The problem is that by trying to do this I got the
> following error:
> > >
> > >  I would appreciate very much any suggestions.
> > >
> > >  *
> > >  *   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/
> >
>
>
> --
> -------------------------------
> Joao Ricardo Lima
> Professor
> UFPB-CCA-DCFS
> +553138923914
> -------------------------------
>
> *
> *   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/
```

• Follow-Ups:
• References: