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

posted by ElMaestro  – Denmark, 2015-02-16 13:17 (3777 d 06:31 ago) – Posting: # 14427
Views: 5,531

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,424 posts in 4,927 threads, 1,674 registered users;
58 visitors (0 registered, 58 guests [including 12 identified bots]).
Forum time: 20:49 CEST (Europe/Vienna)

Complex, statistically improbable things are by their nature
more difficult to explain than
simple, statistically probable things.    Richard Dawkins

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