Hi, I am wondering if there is a package for doing conditional logistic regression for nested case-control study as described in "Estimation of absolute risk from nested case-control data" by Langholz and Borgan (1997) where Horvitz-Thompson sampling weight (log of (number in the risk set divided by the number sampled)) is used with regression. In SAS Proc Phreg, this is implemented as an offset (offset=logweight). I checked clogistic() in Epi package and clogit() in survival package, but couldn't figure out how to incorporate this weighting with either. Also when considering nested case-control sampling for Cox proportional hazards model, the above method can estimate absolute risk of developing disease over a specified time interval. Appreciate if anyone has any suggestion on how to do this in R. Thanks very much! John [[alternative HTML version deleted]]
Hi: Using package sos: # install.packages('sos') # if necessary library(sos) findFn('conditional logistic regression') the following appear to be reasonable candidates to start investigating: * clogit() in package survival * clogistic() in package Epi * clogistCalc() in package saws * the TwoStepClogit package HTH, Dennis On Sat, Feb 26, 2011 at 10:37 PM, array chip <arrayprofile@yahoo.com> wrote:> Hi, I am wondering if there is a package for doing conditional logistic > regression for nested case-control study as described in "Estimation of > absolute > risk from nested case-control data" by Langholz and Borgan (1997) where > Horvitz-Thompson sampling weight (log of (number in the risk set divided by > the > number sampled)) is used with regression. In SAS Proc Phreg, this is > implemented > as an offset (offset=logweight). I checked clogistic() in Epi package and > clogit() in survival package, but couldn't figure out how to incorporate > this > weighting with either. > > > Also when considering nested case-control sampling for Cox proportional > hazards > model, the above method can estimate absolute risk of developing disease > over a > specified time interval. Appreciate if anyone has any suggestion on how to > do > this in R. > > Thanks very much! > > John > > > > [[alternative HTML version deleted]] > > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > >[[alternative HTML version deleted]]
Thomas, thank you for pointing this out! On another note, do you think coxph() will also take offset(logweight) as part of the formula? Or just use the argument weight=logweight in coxph()? Thanks! John ________________________________ From: Thomas Lumley <tlumley@uw.edu> Sent: Sun, February 27, 2011 12:14:25 PM Subject: Re: [R] nested case-control study clogit() takes offsets as part of the formula casestatus ~ predictor +strata(matchedset) +offset(logweight) -thomas> Hi, I am wondering if there is a package for doing conditional logistic > regression for nested case-control study as described in "Estimation of >absolute > risk from nested case-control data" by Langholz and Borgan (1997) where > Horvitz-Thompson sampling weight (log of (number in the risk set divided bythe> number sampled)) is used with regression. In SAS Proc Phreg, this is >implemented > as an offset (offset=logweight). I checked clogistic() in Epi package and > clogit() in survival package, but couldn't figure out how to incorporate this > weighting with either. > > > Also when considering nested case-control sampling for Cox proportionalhazards> model, the above method can estimate absolute risk of developing disease overa> specified time interval. Appreciate if anyone has any suggestion on how to do > this in R. > > Thanks very much! > > John > > > > [[alternative HTML version deleted]] > > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > >-- Thomas Lumley Professor of Biostatistics University of Auckland [[alternative HTML version deleted]]
> Hi, I am wondering if there is a package for doing conditionallogistic> regression for nested case-control study as described in "Estimationof> absolute > risk from nested case-control data" by Langholz and Borgan (1997)where> Horvitz-Thompson sampling weight (log of (number in the risk setdivided by> the > number sampled)) is used with regression. In SAS Proc Phreg, this is > implemented > as an offset (offset=logweight). I checked clogistic() in Epi packageand> clogit() in survival package, but couldn't figure out how toincorporate> this > weighting with either. >The clogit command is simply a wrapper for coxph. To fit a nested case-control model directly with coxph: 1. Create a dummy surival with time=1 (or any number you like) and status = 1 for case, 0 for control. 2. Create a group vector such that each case-control set is one group. 3. coxph(dummy ~ x1 + x2 + .... + strata(grp), data=mydata) You now can use the offset statement just as you did in phreg. In fact, doing this directly in coxph is exactly like doing it directly in phreg. (The last time I looked the phreg manual proposed a more complex rule for creating the dummy time/status pair. It also works but no differently than the simple one above.)