Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Conditional logistic regression within GAM
From
Lucas Andrés Salas D <[email protected]>
To
[email protected]
Subject
st: Conditional logistic regression within GAM
Date
Mon, 23 Sep 2013 11:55:34 +0200
Dear Jason,
I originally posted a similar question on December 2011 (see:
http://www.stata.com/statalist/archive/2011-12/msg00731.html ). Thanks
to Steve Samuels and Ariel Linden for their answers and references.
I needed a conditional GAM for a matched case-control study. Finally,
I used the user-written program postrcspline from Marteen Buis which
supports clogit.
Below an example comparing logit regression using cubic splines vs GAM approach:
sysuse nlsw88, clear
recode grade 0/5=5
mkspline2 grades = grade, cubic nknots(3)
logit never_married grades*
adjustrcspline
xi: gam never_married grade, family(binomial) df(grade:2) big
gamplot grade, nopres
The plots are practically identical. If you need more information
about the number of knots consult Frank Harrell's book.
clogit is supported using mkspline2. However, if you need to plot then
you should specify manually the link function.
clogit never_married grades*, group ( industry) or
adjustrcspline, link("identity")
adjustrcspline, link("log")
I have not used the xblc user-written program, but it looks promising.
Hope it helps,
Lucas
--
Lucas A Salas, MD MSc MPH PhD (c)
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/