Statalist The Stata Listserver

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

Re: st: graphing rrr from mlogit

From   Maarten buis <>
Subject   Re: st: graphing rrr from mlogit
Date   Wed, 9 May 2007 21:41:45 +0100 (BST)

--- Naomi Spence <> wrote:
> I am using a multinomial logit model to predict type of 
> violence--variable name "violence" with values 0=none,
> 1=psychological, 2=physical.  My main independent variable of
> interest is an index "malsum" that ranges from 0-12. 
> I want a graph that depicts changes in "violence" with increasing
> values of "malsum."  I'm visualizing a graph with 3 lines--one for
> each outcome  category on "violence".  Ideally, I would like the y
> axis to show the relative risks (I'm using mlogit option rrr), but
> I'll settle for predicted probabilities. I have tried a few different
> things, but the best I can do gives me 3 separate graphs with 1 line
> each that I can "combine" to put them on one panel but I'd like to
> have the 3 lines on  the same graph.

*--------------- begin example ----------------
sysuse auto, clear
recode rep78 1/2=3
mlogit rep78 length foreign
prgen length, gen(pr) x(foreign=0) 

twoway line prp3 prp4 prp5 prx, /*
*/ yscale(range(0 1)) ylab(0(.25)1) /*
*/ ytitle("probability")
*------------- end example ------------------
(For more on how to use examples I sent to the Statalist, see: )

Hope this helps,

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

Yahoo! Mail is the world's favourite email. Don't settle for less, sign up for
your free account today* 
*   For searches and help try:

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