Statalist


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

Re: st: -graph twoway (function ...)- question


From   Nick Winter <[email protected]>
To   [email protected]
Subject   Re: st: -graph twoway (function ...)- question
Date   Fri, 25 Jul 2008 09:21:27 -0400

Hi,

Yes, you would need to use the -save- option to save the dataset of predicted probabilities for each group, then manually combine them and create your graph from there. Automation of that sort of process is theoretically on my list to add to -oprobpr-, but don't hold your breath for it to happen any time soon.

The help file example is a mistake--the adj() option was renamed to levels() along the way.

- NW


Andrea Bennett wrote:

Thanks for this hint, I didn't know your app!

But, after having played around with it, I fear it is not possible to have multiple probability lines in one graph? E.g. I would want to show the change in the probability but for each of the three age categories separately (but in one graph). Is this possible? Would I need to deal with the -save- option? And last, it seem not possible to display confidence intervals, right?

When I would like to display changes in probabilities, what else is available as an option. I know the prvalue/praccum command which I will try next. Any good input is welcomed, though!

Kind regards,

Andrea

P.S. In your help file, in the "examples" section, there is a line "oprobpr mpg, adj(weight=2500, foreign=0)" while the option -adj- is not discussed (and does not work).


On Jul 24, 2008, at 3:37 PM, Nick Winter wrote:


I don't have an answer to your specific question, but another way to go is to plot predicted probabilities. My -oprobpr- package might help for this. (-oprobpr- only works after -oprobit- not -probit-, but oprobit will estimate the same model as probit if there are only two response categories; just use the -categories()- option to specify which response category you want plotted.

-Nick Winter

Andrea Bennett wrote:

Dear all,
I have estimated average marginal effects from a probit regression with -margeff- and would like to generate a graph which plots the marginal effects for 3 age categories (dummies) dependent on a continuous variable called cont.
The model is as such:
y = b0 + b1*age2 + b2*age3 + b3*age2*cont +b4*age3*cont + b5*cont + controls
As age2 and age3 are dummies, would the following graph command be correct:
twoway (function age1 = _b[cont]*x, range(0 0.5)) (function age2 = _b[age2] + (_b[cont] + _b[cont_age2])*x, range(0 0.5)) (function age3 = _b[age3] + (_b[cont] + _b[cont_age3])*x, range(0 0.5))
The way I understand it, since I have now marginal effects I can work equivalently to linear models. Then the above graph should be correct, right? Further, this would also be correct when introducing other interactions with -cont- as long as I am looking at the marginal effects of age groups when -cont- changes?
Many thanks for your considerations,
Andrea
*
* 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/
--
--------------------------------------------------------------
Nicholas Winter                                 434.924.6994 t
Assistant Professor                             434.924.3359 f
Department of Politics                  [email protected] e
University of Virginia          faculty.virginia.edu/nwinter w
PO Box 400787, 100 Cabell Hall
Charlottesville, VA 22904

*
*   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/
*
*   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/
--
--------------------------------------------------------------
Nicholas Winter                                 434.924.6994 t
Assistant Professor                             434.924.3359 f
Department of Politics                  [email protected] e
University of Virginia          faculty.virginia.edu/nwinter w
PO Box 400787, 100 Cabell Hall
Charlottesville, VA 22904

*
*   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/



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