Terry, thanks very much! 

Professor Langholz used a SAS software trick to estimate absolute risk by 
creating a fake variable "entry_time" that is 0.001 less than the variable 
"exit_time" (i.e. time to event), and then use both variables in Phreg. Is this 
equivalent to your creating a dummy survival with time=1?

Another question is, is using offset(logweight) inside the formula of coxph() 
the same as using weight=logweight argument in coxph(), because my 
understanding 
of Professor Langholz's approach for nested case-control study is weighted 
regression?

Thank you very much for the help.

John






________________________________
From: Terry Therneau <thern...@mayo.edu>

Cc: r-help@r-project.org
Sent: Mon, February 28, 2011 6:59:23 AM
Subject: Re: [R] nested case-control study

> 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.
>

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.)


      
        [[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.

Reply via email to