Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: Adjusting for age in logistic regression


From   "G. ter Riet" <[email protected]>
To   [email protected]
Subject   RE: st: Adjusting for age in logistic regression
Date   Fri, 12 Nov 2004 09:28:18 +0100

Hi Peter,
I use to check the graph produced by this do file for Stata 8 to see whether age requires dummy coding. (<lowess> was <ksm> in Stata 7)

capture program drop smooth
program smooth
capture drop x prob smoothval  _Iage*
set more off
sort age
gen x=_n
xi: logistic yvar i.age, asis
predict prob, p
lowess prob x, gen(smoothval) logit
end


Gerben ter Riet, MD PhD, Academic Medical Center


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



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