check code for Type III in R [🇷 for BE/BA]

posted by ElMaestro  – Denmark, 2015-02-16 13:17 (4139 d 04:05 ago) – Posting: # 14427
Views: 6,719

Hi WHM,

❝ I've tried drop1() mentioned prior posts but it did now show all SAS showed.


Your code -at a quick glance- looks ok, but this is said without having tried it on data.
You should not necessarily just think that whatever comes out of SAS is what you want to reproduce.

Type III means you will take out each of the various factors one by one wile keeping the others in the model. Your differences in residuals vs the full model residual correspond to the Type III SS for the individual factors. By that definition sequence will not have any appreciable SS (apart from the numerical precision) and precisely that is what you will find in R with drop1. Think about it this way: Sequence is a between-subject factor; you cannot force in an extra column for Sequence RT or TR in the design matrix since any such column can be constructed from the Subject columns and the intercepts with a little addition and subtraction.

SAS will (with the random bogus statement) goa step further and get you a type III SS for the Sequence. This is not plain type III, but perhaps called type III with a useful twist. I will leave the interpretation to you but note that R's output with drop1 is not 'wrong'.

Pass or fail!
ElMaestro

Complete thread:

UA Flag
Activity
 Admin contact
23,654 posts in 4,992 threads, 1,571 registered users;
152 visitors (0 registered, 152 guests [including 15 identified bots]).
Forum time: 18:23 CEST (Europe/Vienna)

Scientists often have a naïve faith that
if only they could discover enough facts about a problem,
these facts would somehow arrange themselves
in a compelling and true solution.    Theodosius Dobzhansky

The Bioequivalence and Bioavailability Forum is hosted by
BEBAC Ing. Helmut Schütz
HTML5