d_labes ★★★ Berlin, Germany, 20140506 13:28 (3249 d 04:37 ago) Posting: # 12917 Views: 6,338 

Dear all, for higher order designs with more than one treatment the EMA guideline recommends us to use only the data relevant for the comparison under consideration. My (seems too) naive attempt for obtaining the degrees of freedom (df) of the corresponding ANOVA (without a further decomposition of the subject effect into sequence and subject nested within sequence) for a 4x4 crossover was: source df Looks correct? But on the output of my SAS dragon for a 4x4 study with 12 subjects and the sequences (Williams design, A=T1, B=T2, C=T3, D=R) CDBA I see the following df for the pairs:
A vs D Any idea what's going on here? — Regards, Detlew 
d_labes ★★★ Berlin, Germany, 20140507 13:43 (3248 d 04:22 ago) @ d_labes Posting: # 12921 Views: 5,491 

Dear all, Follow up 07May: What does R gives us as answer? Function lm() used:
A vs D Seem again a case that the R geeks have a different opinion as SAS. More and more I are convinced that statistics is more an art then sciences . — Regards, Detlew 
Helmut ★★★ Vienna, Austria, 20140507 18:49 (3247 d 23:16 ago) @ d_labes Posting: # 12923 Views: 5,601 

Dear Detlew, ❝ Seem again a case that the R geeks have a different opinion as SAS. Fascinating. 12 subjects, your sequences, EMA all fixed effects, “irrelevant treatments” excluded in Phoenix/WinNonlin: A vs D ❝ More and more I are convinced that statistics is more an art then sciences . Beyond my intellectual reach. What’s going on here? Three pieces of software treat B/D differently from A/D and C/D. Edit: Combinatorial playground. The cells of our pairwise comparisons are:
Shuffled:
All animals are equal, but some animals are more equal than others. George Orwell (Animal Farm, 1945) — Diftor heh smusma 🖖🏼 Довге життя Україна! _{} Helmut Schütz The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes 
d_labes ★★★ Berlin, Germany, 20140508 11:18 (3247 d 06:46 ago) @ Helmut Posting: # 12928 Views: 5,411 

Dear Helmut, ❝ Beyond my intellectual reach ... Me too. I have fiddled a little bit with the expected sequencebyperiod means and intrasubject contrasts (A,B,C,D are the treatment effects, p1... p4 the period effects):
pair B/D Ups! In this parametrization we really have one treatment' parameter and only 2 for the period'. The pair f.i. A/D is left to you . It has one treatment parameter (df=1) and 4 period' parameters which sum to zero (translates into df=3?). — Regards, Detlew 
ElMaestro ★★★ Denmark, 20140508 02:52 (3247 d 15:13 ago) @ d_labes Posting: # 12926 Views: 5,500 

Hi all, I am somewhat sure this is an issue with the lexer and the way it constructs the model matrix. Just a bad quick example, it is 1 AM and grandpa is jetlagged and tired.... Model = lm(foobar~Hötzi+Detlew) Let's say Hötzi has three levels, like Nuts, completely Nuts, and completely utterly Nuts, Detlew has two levels like light smoker and heavy smoker. Since we want an intercept we can at most have a model matrix with 6 columns. Since we fit with an intercept the first col will regularly just be a bunch of ones. If the lexer reads the fixed effects "from behind" then we will have 1 column for Detlew (one for light smoker, perhaps) followed by two for Helmut. The solution gives one value for intercept, one for the factor called Detlew, and two for Hötzi. If the lexer does it the other way around then we get one for intercept, 2 for Hötzi and one for Detlew. Both are correct. In the case with four trt's we could be interested in the effects of a trt for which the lexer rand out of (some) df's. It is a question of whocomesfirst, really. — Pass or fail! ElMaestro 
d_labes ★★★ Berlin, Germany, 20140508 10:38 (3247 d 07:27 ago) @ ElMaestro Posting: # 12927 Views: 5,493 

Dear Ol'Pirate! You really mean that the solution depends on the order of the effects in the model? Just a quick check: My above cited df's in R were obtained with lm(log(AUC)~ tmt + period + subject, data=pair) .Now applying lm(log(AUC)~ subject + tmt + period, data=pair) gives: A vs D Seems you are correct! But IMHO this is not a good behavior. BTW: R and SAS now coincide althoug in SAS the equivalent of the first lm() call was used.The question is left: Why to hell are the df's different between the pairs? — Regards, Detlew 