[R] survey package: weights used in svycoxph()
Vinh Nguyen
vqnguyen at uci.edu
Tue May 18 18:45:07 CEST 2010
On Tue, May 18, 2010 at 8:50 AM, Thomas Lumley <tlumley at u.washington.edu> wrote:
>
> > I
>>
>> don't believe so since svycoxph() calls coxph() of the survival
>> package and weights are applied once in the estimating equation. If
>> the weights are implemented in the ratio, could you point me to where
>> in the code this is done? I would like to estimate as in Binder but
>> with custom weights. Thanks.
>
> It happens inside the C code called by coxph(), eg, in
> survival/src/coxfit2.c
>
Thank you for your clarification. I mistakenly assumed weights only
appeared once in the estimating equation, creating a weighted sum of
the score equation. Thinking in retrospect if the weights are to be
used as case weights they better be in the ratio term as well
(wherever there is an at risk indicator).
> Binder's estimating equations are the usual way of applying weights to a Cox
> model, so nothing special is done apart from calling coxph(). To quote the
> author of the survival package, Terry Therneau, "Other formulae change in
> the obvious way, eg, the weighted mean $\bar Z$ is changed to include both
> the risk weights $r$ and the external weights $w$." [Mayo Clinic
> Biostatistics technical report #52, section 6.2.2]
Don't see a section 6.2.2 in this technical report.
More information about the R-help
mailing list