Therneau, Terry M., Ph.D.
2015-Jul-22 13:15 UTC
[R] Differences in output of lme() when introducing interactions
"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
Marc Schwartz
2015-Jul-22 14:29 UTC
[R] Differences in output of lme() when introducing interactions
Hi, In addition to Terry?s great comments below, as this subject has come up frequently over the years, there is also a great document by Bill Venables that is valuable reading: Exegeses on Linear Models http://www.stats.ox.ac.uk/pub/MASS3/Exegeses.pdf Regards, Marc Schwartz> On Jul 22, 2015, at 8:15 AM, Therneau, Terry M., Ph.D. <therneau at mayo.edu> wrote: > > "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
Rolf Turner
2015-Jul-22 23:02 UTC
[R] Differences in output of lme() when introducing interactions
On 23/07/15 01:15, Therneau, Terry M., Ph.D. wrote: <SNIP>> 3. Should you ever use it [i.e. Type III SS]? 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 --- can you please supply an explicit citation? Ta. cheers, Rolf -- Technical Editor ANZJS Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276
Therneau, Terry M., Ph.D.
2015-Jul-23 19:07 UTC
[R] Differences in output of lme() when introducing interactions
The following are in parody (but like all good parody correct wrt the salient features). The musings of Guernsey McPhearson http://www.senns.demon.co.uk/wprose.html#Mixed http://www.senns.demon.co.uk/wprose.html#FDA In formal publication: Senn, Statistical Issues in Drug Development, second edition, Chapter 14: Multicentre Trials Senn, The many modes of meta, Drug information journal, 34:535-549, 2000. The second points out that in a meta analysis no one would ever consider giving both large and small trials equal weights, and relates that to several other bits of standard practice. The 'equal weights' notion embedded in a fixed effects model + SAS type 3 is an isolated backwater. Terry T. PS. The "Devils' Drug Development Dictionary" at the same source has some gems. Three rather random choices: Bayesian - One who, vaguely expecting a horse and catching a glimpse of a donkey, strongly concludes he has seen a mule. Medical Statistician - One who won't accept that Columbus discovered America because he said he was looking for India in the trial Plan. Trend Towards Significance - An ever present help in times of trouble. On 07/22/2015 06:02 PM, Rolf Turner wrote:> On 23/07/15 01:15, Therneau, Terry M., Ph.D. wrote: > > <SNIP> > >> 3. Should you ever use it [i.e. Type III SS]? 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 --- can you please supply an explicit citation? Ta. > > cheers, > > Rolf >
Rolf Turner
2015-Jul-24 02:26 UTC
[R] Differences in output of lme() when introducing interactions
On 24/07/15 07:07, Therneau, Terry M., Ph.D. wrote:> The following are in parody (but like all good parody correct wrt the > salient features). The musings of > Guernsey McPhearson > http://www.senns.demon.co.uk/wprose.html#Mixed > http://www.senns.demon.co.uk/wprose.html#FDA > > > In formal publication: > Senn, Statistical Issues in Drug Development, second edition, Chapter > 14: Multicentre Trials > Senn, The many modes of meta, Drug information journal, 34:535-549, 2000. > > The second points out that in a meta analysis no one would ever consider > giving both large and small trials equal weights, and relates that to > several other bits of standard practice. The 'equal weights' notion > embedded in a fixed effects model + SAS type 3 is an isolated backwater. > > Terry T. > > PS. The "Devils' Drug Development Dictionary" at the same source has > some gems. Three rather random choices: > > Bayesian - One who, vaguely expecting a horse and catching a glimpse of > a donkey, strongly concludes he has seen a mule. > > Medical Statistician - One who won't accept that Columbus discovered > America because he said he was looking for India in the trial Plan. > > Trend Towards Significance - An ever present help in times of trouble. > > > > On 07/22/2015 06:02 PM, Rolf Turner wrote: >> On 23/07/15 01:15, Therneau, Terry M., Ph.D. wrote: >> >> <SNIP> >> >>> 3. Should you ever use it [i.e. Type III SS]? 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 --- can you please supply an explicit citation? Ta.Thanks Terry! cheers, Rolf -- Technical Editor ANZJS Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276