Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

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


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: SV: st: Problems with calculating marginal effects for categorical variables in ologit models
Date   Wed, 23 Apr 2008 13:14:30 +0100 (BST)

-margeff-, and quite a number of other packages, have appeared in the
Stata Journal and also on SSC. Usually, but not always, the stuff
present of SSC is more recent than the stuff that appears in the Stata
Journal. You can find both by typing -findit margeff-.

Hope this helps,
Maarten

--- Lina Jonsson <[email protected]> wrote:

> Eva,
> 
> When I updated margeff it works! But I downloaded the margeff package
> just a few hours ago after searching for margeff using the search
> command in Stata. Next time I want to download a package, should I
> download it from someplace else to get the latest version? 
> 
> Thank you!
> 
> And also thanks to Richard Williams that also suggested to update
> which I then didn�t try since I just had downloaded the package
> 
> /Lina
>  
> 
> > -----Ursprungligt meddelande-----
> > Fr�n: [email protected] 
> > [mailto:[email protected]] F�r Eva Poen
> > Skickat: den 23 april 2008 11:23
> > Till: [email protected]
> > �mne: Re: st: Problems with calculating marginal effects for 
> > categorical variables in ologit models
> > 
> > Lina,
> > 
> > I cannot reproduce this error. The following example works 
> > fine for me in Stata 9 and 10. -which margeff- returns *! 
> > Version 2.1.7  (10 March 2008) on my machine.
> > 
> > 
> > *** example
> > sysuse auto, clear
> > xi: ologit rep78 foreign i.headroom [pweight=price] margeff 
> > margeff, dummies(_I*)
> > *** end
> > 
> > If this example doesn't work for you, try updating -margeff-. 
> > It might be out of date. Also, tell us which version of Stata 
> > you are using.
> > 
> > Eva
> > 
> > 
> > 2008/4/23 Lina Jonsson <[email protected]>:
> > > 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:
> > >
> > >  [_cut1] not found
> > >  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:
> > >  > > > "[_cut1] not found" r(111)
> > >  > > >
> > >  > > >  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/
> > >
> > 
> > *
> > *   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/
> 


-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


      __________________________________________________________
Sent from Yahoo! Mail.
A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html
*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index