Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: categorising continuous variable and generating mean outcome


From   Galina Hayes <galina@uoguelph.ca>
To   statalist@hsphsun2.harvard.edu
Subject   st: categorising continuous variable and generating mean outcome
Date   Tue, 17 Feb 2009 19:24:53 -0500 (EST)

Evening all,
I am sure there is a very simple solution to this but it has me foxed. I have two variables, Y coded as (0,1) and X which is continous. I want to break x down into 10 equal size categories (by range or percentiles, doesn't matter) and generate the mean of Y for each of the 10 categories (call it meanY) and then plot meanY against the centre value of each X category. Does this make sense? Seems like it should be easy,
Thanks
Galina
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index