[R] Differences in output of lme() when introducing interactions

Therneau, Terry M., Ph.D. therneau at mayo.edu
Wed Jul 22 15:15:04 CEST 2015


"Type III" is a peculiarity of SAS, which has taken root in the world.  There are 3 main 
questions wrt to it:

1. How to compute it (outside of SAS).  There is a trick using contr.treatment coding that 
works if the design has no missing factor combinations, your post has a link to such a 
description.  The SAS documentation is very obtuse, thus almost no one knows how to 
compute the general case.

2. What is it?  It is a population average.  The predicted average treatment effect in a 
balanced population-- one where all the factor combinations appeared the same number of 
times.  One way to compute 'type 3' is to create such a data set, get all the predicted 
values, and then take the average prediction for treatment A, average for treatment B, 
average for C, ...  and test "are these averages the same".   The algorithm of #1 above 
leads to another explanation which is a false trail, in my opinion.

3. Should you ever use it?  No.  There is a very strong inverse correlation between 
"understand what it really is" and "recommend its use".   Stephen Senn has written very 
intellgently on the issues.

Terry Therneau


On 07/22/2015 05:00 AM, r-help-request at r-project.org wrote:
> Dear Michael,
> thanks a lot. I am studying the marginality and I came across to this post:
>
> http://www.ats.ucla.edu/stat/r/faq/type3.htm
>
> Do you think that the procedure there described is the right one to solve my problem?
>
> Would you have any other online resources to suggest especially dealing with R?
>
> My department does not have a statician, so I have to find a solution with my own capacities.
>
> Thanks in advance
>
> Angelo



More information about the R-help mailing list