Stephanie,
The cancer.dta data doesn't fit a quadratic very well, but do you mean something like this? Coding is stata 9.2.
sysuse cancer
gen age2= age* age
logit died age age2
predict yhatdied
twoway (histogram age if (died == 1), percent yaxis(2) fcolor(sand) lcolor(none) legend(label(1 "Died")))(histogram age if (died==0), percent yaxis(2) fcolor(none) lcolor(black) legend(label(2 "Alive")))(connected yhatdied age, sort), xtitle(age) ytitle(probability death) legend(on) scheme(s2color) name(test)
HR
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Stephanie L Kent
Sent: Friday, September 18, 2009 11:36 AM
To: [email protected]
Subject: st: Graphing quadratic relationship
Dear users,
I would like to graph a relationship between a quadratic independent
variable and my dependent variable to see how y varies acccording to x and
x^2. It's a logistic regression so my DV is 0-1 and I need to show how
both the 0's and 1's vary according to x and x^2. Any advice on how to get
started is much appreciated!
Sincerely,
Stephanie
*
* 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/