Re: [R] Testing equality of coefficients in coxph model

From: Frank Harrell <f.harrell_at_vanderbilt.edu>
Date: Tue, 12 Apr 2011 06:09:13 -0700 (PDT)

Another approach is to use the rms package:

require(rms)
f <- cph(Surv(...) ~ x1 + x2 + ...)
contrast(f, list(x1=1, x2=0), list(x1=0, x2=1))

Frank

djmuseR wrote:
>
> Hi:
>
> Another possible approach (untested) would be to compare the two models
>
> m1 <- coxph(Surv(Start, End, Death.ID) ~ x1 + x2 + a1 + a2 + a3)
> m0 <- coxph(Surv(Start, End, Death.ID) ~ I(x1 + x2) + a1 + a2 + a3)
> anova(m0, m1)
>
> This should be able to test H_0: beta_1 = beta_2. If you want to test that
> they are both equal to a specified [nonzero] constant, that's a different
> test entirely (e.g., beta_1 = 1 = beta_2) - in that case, offset() might
> be
> useful.
>
> HTH,
> Dennis
>
> On Tue, Apr 12, 2011 at 2:19 AM, Michael Haenlein
> &lt;haenlein_at_escpeurope.eu&gt;wrote:
>

>> Dear all,
>>
>> I'm running a coxph model of the form:
>> coxph(Surv(Start, End, Death.ID) ~ x1 + x2 + a1 + a2 + a3)
>>
>> Within this model, I would like to compare the influence of x1 and x2 on
>> the
>> hazard rate.
>> Specifically I am interested in testing whether the estimated coefficient
>> for x1 is equal (or not) to the estimated coefficient for x2.
>>
>> I was thinking of using a Chow-test for this but the Chow test appears to
>> work for linear regression only (see:
>> http://en.wikipedia.org/wiki/Chow_test).
>> Another option I was thinking of is to estimate an alternative model in
>> which the coefficients for x1 and x2 are constraint to be equal and to
>> compare the fit of such a constraint model with the one of an
>> unconstraint
>> one. But again I'm not sure how this can be done using coxph.
>>
>> Could anyone help me out on this please?
>>
>> Thanks,
>>
>> Michael
>>
>>
>>
>> Michael Haenlein
>> Associate Professor of Marketing
>> ESCP Europe
>> Paris, France
>>
>>        [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-help_at_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]]
>
> ______________________________________________
> R-help_at_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.
>


Frank Harrell
Department of Biostatistics, Vanderbilt University
--
View this message in context: http://r.789695.n4.nabble.com/Testing-equality-of-coefficients-in-coxph-model-tp3444099p3444585.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help_at_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.
Received on Tue 12 Apr 2011 - 13:12:58 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 12 Apr 2011 - 14:10:29 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive