[R] nested case-control study
Terry Therneau
therneau at mayo.edu
Mon Feb 28 15:59:23 CET 2011
> 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.)
More information about the R-help
mailing list