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

From |
Nick Winter <[email protected]> |

To |
[email protected] |

Subject |
Re: st: RE: -prgen- with a quadratic function |

Date |
Wed, 16 Mar 2005 11:07:05 -0500 |

To clarify my earlier post:

My -oprobpr-, although designed for ordered logit/probit, can handle this, because ordered logit is a more general case of logit. After installing -oprobpr- from SSC, you would do something like this:

. ologit dv age agesq x1 x2 x3

. oprobpr age , levels(agesq=age^2) cat(2)

The -ologit- model estimated will be the same as the equivalent logit model (except that it will estimate a single cut point instead of a constant). The -oprobpr- command then plots predicted probabilities for catgories of the DV versus age, recreating agesq as it does so, and holding the other IVs constant at their means. The cat(2) option indicated that only category 2 (i.e., dv==1) be plotted.

-oprobpr- also gives substantial control over levels of the other IVs, range of the IV to plot against, and more.

--Nick Winter

At 10:03 PM 3/15/2005 +0000, you wrote:

--------------------------------------------------------I don't think Scott Long is a member of Statalist. No matter: your problem should yield to -adjust- followed by an appropriate graph. Nick [email protected] Mariano Sana > Hi Statalisters. Someone experienced with ?prgen- might be > able to answer this. > > I ran a logit model that has, among its predictor variables, > AGE and AGESQ. > The coefficient for AGE is positive and the coefficient for AGESQ is > negative. The turning point is at age 79 or so. I?ve been trying to > generate a graph that shows how predicted probabilities vary > by age for a few groups in my analysis. I used the ?prgen- command from > the Spostado package. > > The graph that I get doesn?t make sense. The probability > increases nonstop > and becomes asymptotic to 1 at age 90 or so. > > I realize that the problem is that ?prgen- cannot vary the > value of AGESQ > as the value of AGE varies. The default for AGESQ is the > mean of AGESQ, > unless I specify another value. Obviously, I need AGESQ to > be the square of AGE as AGE varies. > > By now I think I have no other solution than running > ?prvalue- (also from > the Spostado package) multiple times to get the probabilities > I need for > the graph. Or is there any other way? Is this a question for > Scott Long? * * 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/

Nicholas Winter 607.255.8819 t

Assistant Professor 607.255.4530 f

Department of Government [email protected] e

308 White Hall falcon.arts.cornell.edu/nw53 w

Cornell University

Ithaca, NY 14853-4601

*

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

**References**:**st: RE: -prgen- with a quadratic function***From:*"Nick Cox" <[email protected]>

- Prev by Date:
**Re: st: At risk information with sts graph (was Re: st: <no subject>)** - Next by Date:
**Re: st: Svyset comman in a do file** - Previous by thread:
**Re: st: RE: -prgen- with a quadratic function** - Next by thread:
**Re: st: RE: -prgen- with a quadratic function** - Index(es):

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