Dear Paul, > -----Original Message----- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Paul Miller > Sent: Wednesday, April 24, 2013 1:18 PM > To: r-help@r-project.org > Subject: [R] Trouble Computing Type III SS in a Cox Regression using > drop1 and Anova > > Hello All, > > Am having some trouble computing Type III SS in a Cox Regression using > either drop1 or Anova from the car package. Am hoping that people will > take a look to see if they can tell what's going on. > > Here is my R code: >
. . . > > Both drop1 and Anova give me a different p-value than I get from coxph > for both my two-level ps2 variable and for age. This is not what I > would expect based on experience using SAS to conduct similar analyses. > Indeed SAS consistently produces the same p-values. Namely the ones I > get from coxph. > > My sense is that I'm probably misusing R in some way but I'm not sure > what I'm likely to be doing wrong. SAS prodcues Wald Chi-Square results > for its type III tests. Maybe that has something to do with it. > Ideally, I'd like to get type III values that match those from coxph. > If anyone could help me understand better, that would be greatly > appreciated. You've answered your own question: The summary() output gives you Wald tests, and drop1() and Anova() give you LR tests. From ?Anova: "test.statistic: ... for a Cox model, whether to calculate "LR" (partial-likelihood ratio) or "Wald" tests; ..." Thus, if you want the Wald test, you can ask for it (though it escapes me why you prefer it to the LR test). I hope this helps, John ----------------------------------------------- John Fox Senator McMaster Professor of Social Statistics Department of Sociology McMaster University Hamilton, Ontario, Canada ______________________________________________ R-help@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.