[R] Testing equality of coefficients in coxph model

2011-04-12 Thread Michael Haenlein
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)

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

2011-04-12 Thread Dr. Pablo E. Verde
haenl...@escpeurope.eu To: r-help@r-project.org Sent: Tuesday, April 12, 2011 11:19 AM Subject: [R] Testing equality of coefficients in coxph model 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

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

2011-04-12 Thread Dennis Murphy
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

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

2011-04-12 Thread Frank Harrell
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