# [R] Joint test

From: Hein Goemans <hgoemans_at_mail.rochester.edu>
Date: Fri, 06 Feb 2009 15:29:49 -0500

Dear All,

I am estimating a Cox proportional hazard model, with several interactions of the type a*z + a*y + a*x + b*z + b*y + b*x.

I need to know if the first three (the "a"s) are jointly significantly different from the last three (the "b"s). I have tried several approaches, but have been unsuccessful.

Here's the model, and the code I came up with, with the obvious shortcomings.

modelPG2 <- coxph(Surv(t0, t, d) ~ civilian + monarch + txmonarch

+ civwar + lngdpcap + growth
+ tropen4 + dopen4
+ lnpop
+ age0 + entry1 + powtimes
+ initiator2 + defender2 + inherit
+ milwinsh + millosesh + mildrawsh +
milwinwar + millosewar + mildrawwar

+ civwinsh + civlosesh + civdrawsh +
civwinwar + civlosewar + civdrawwar

+ monwinsh + monlosesh + mondrawsh +
monwinwar + monlosewar + mondrawwar

+ frailty(ccode), na.action=na.exclude,

control=coxph.control(eps=1e-09,iter.max=100,outer.max=100))

library(aod)

# To test if Military Leaders are equally sensitive to the outcome of WAR as Civilian leaders we need a JOINT test. wald.test(b=coef(modelPG2), Sigma = vcov(modelPG2), Terms= c(19:21), H0=c(-2.9101, 2.4028, -1.6504))

#wald.test(b=coef(modelPG2), Sigma = vcov(modelPG2), Terms= c(19:21), H0=c(0, 2.4028, 0))

wald.test(b=coef(modelPG2), Sigma = vcov(modelPG2), Terms= c(25:27), H0=c(-8.2330,2.3041,-0.2626))

Any help would be very much appreciated.

Hein Goemans.

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 Fri 06 Feb 2009 - 20:32:37 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 Fri 06 Feb 2009 - 21:30:16 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.