Skip to content
Prev 322344 / 398500 Next

Trouble Computing Type III SS in a Cox Regression

I should hope that there is trouble, since "type III" is an undefined concept for a Cox 
model.  Since SAS Inc fostered the cult of type III they have recently added it as an 
option for phreg, but I am not able to find any hints in the phreg documentation of what 
exactly they are doing when you invoke it.  If you can unearth this information, then I 
will be happy to tell you whether
    a. using the test (whatever it is) makes any sense at all for your data set
    b. if "a" is true, how to get it out of R

I use the word "cult" on purpose -- an entire generation of users who believe in the 
efficacy of this incantation without having any idea what it actually does.  In many 
particular instances the SAS type III corresponds to a survey sampling question, i.e., 
reweight the data so that it is balanced wrt factor A and then test factor B in the new 
sample.  The three biggest problems with type III are that
1: the particular test has been hyped as "better" when in fact it sometimes is sensible 
and sometimes not, 2: SAS implemented it as a computational algorithm which unfortunately 
often works even when the underlying rationale does not hold and
3: they explain it using a notation that completely obscures the actual question.  This 
last leads to the nonsense phrase "test for main effects in the presence of interactions".

There is a "survey reweighted" approach for Cox models, very closely related to the work 
on causal inference ("marginal structural models"), but I'd bet dollars to donuts that 
this is not what SAS is doing.

(Per 2 -- type III was a particular order of operations of the sweep algorithm for linear 
models, and for backwards compatability that remains the core definition even as 
computational algorthims have left sweep behind.  But Cox models can't be computed using 
the sweep algorithm).

Terry Therneau
On 04/24/2013 12:41 PM, r-help-request at r-project.org wrote: