Helmut ★★★ ![]() ![]() Vienna, Austria, 2013-07-04 22:22 (4309 d 18:38 ago) Posting: # 10938 Views: 14,435 |
|
Dear all, some veterans might remember this thread from 2007 (!) where I showed that WinNonlin assumes equal variances in parallel designs. This week Linda Hughes of Pharsight posted a coding at the Extranet which works both in Phoenix and ‘classical’ WinNonlin (I tested PHX 6.3 and WNL 5.3). Her solution follows a hint given at SAS’ knowledge base. Of course, our SAS-guru Detlew knew that already. ![]() Here is my setup in disply <- function(table) { In Phoenix you need a Subject variable and a dummy, which contains 1 in all cells. For simplicity I named it Period .In the default coding you have only one Fixed Effect, namely Treatment . Now for the trick:In the Setup map additionally Subject and Period to Classification .Fixed: Treatment Variance Structure > Repeated: (![]() Variance Blocking Variable (Subject): Subject Now let’s see.
PE 90% CI CVtot. CV(R) CV(T) As a side effect Phoenix spits out the treatments’ total variances in Var(Period*Treatment*Subject)_11 (R) and Var(Period*Treatment*Subject)_12 (T). In the balanced case the mean of these variances equals the total (pooled) total variance of the standard set-up. In the next release of Phoenix (~1st half 2014), the dummy variable will not be needed any more (i.e., can be left empty). <div lang="de" xml:lang="de"> Was lange währt, wird endlich gut. </div>
— Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
ElMaestro ★★★ Denmark, 2013-07-04 23:16 (4309 d 17:44 ago) @ Helmut Posting: # 10939 Views: 11,917 |
|
Hi Helmut and all, this looks to me like an ugly work-around rather than a solution. I am not a WNL user but I'd like to understand why that type of coding fixes it. I believe WNL will fit this model via REML, and on basis of the syntax I imagine this means a covariance matrix with two squared sigmas on the diagonal and zero elsewhere. But to get through to the 'correct' CI there must be a step for derivation of the denominator DF which happens to coincide with the DF you get via the Welch correction when just doing ordinary unpaired t-test with unequal variances. Perhaps that's similar to the SATT option in SAS (which I also don't use). Could be checked? So, what is really going on within WNL when that weird coding principle is applied - Why does it give the seemingly right result? Anyone knows? — Pass or fail! ElMaestro |
Helmut ★★★ ![]() ![]() Vienna, Austria, 2013-07-05 00:13 (4309 d 16:47 ago) @ ElMaestro Posting: # 10940 Views: 11,868 |
|
Hi ElMaestro, ❝ this looks to me like an ugly work-around rather than a solution. Right. Solution was my term. ![]() Set up the Repeated subtab of the Variance Structure tab as: ❝ […] I'd like to understand why that type of coding fixes it. So do I. ❝ I believe WNL will fit this model via REML, … REML is the only language WinNonlin speaks. ❝ … and on basis of the syntax I imagine this means a covariance matrix with two squared sigmas on the diagonal and zero elsewhere. You are the Matrazenkaiser. Reasonable assumption. ❝ But to get through to the 'correct' CI there must be a step for derivation of the denominator DF which happens to coincide with the DF you get via the Welch correction when just doing ordinary unpaired t-test with unequal variances. Perhaps that's similar to the SATT option in SAS (which I also don't use). Could be checked? Sure. Satterthwaite is WinNonlin’s standard setup. I’m not in the office so can’t check what will happen with the other option ‘Residual’. ❝ So, what is really going on within WNL when that weird coding principle is applied - Why does it give the seemingly right result? Anyone knows? Maybe. Too many cooks spoil the broth. Pharsight’s statisticians ≠ coders. — Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
ElMaestro ★★★ Denmark, 2013-07-05 00:37 (4309 d 16:23 ago) @ Helmut Posting: # 10941 Views: 11,876 |
|
Hi Helmut, thanks for the comments. In perspective, could this methodology then be extended to a 3-treatment parallel study (e.g. US Ref, EU Ref, Test)? I am thinking we'd just need another sigma squared on the diagonal and then be good to go? If that's the case then the WNL approach –however counterintuitive and retarded it might seem– could provide a solution to a problem which cannot be resolved by the standard t-test approach? Oh and by the way, I think this would imply that the denominator DFs would have to be calculated from treatment A, B as well as C, when a 90% CI for A/B is constructed - that's perhaps also worthy of a heated debate further down the road...? ![]() — Pass or fail! ElMaestro |
Helmut ★★★ ![]() ![]() Vienna, Austria, 2013-07-05 01:08 (4309 d 15:52 ago) @ ElMaestro Posting: # 10942 Views: 11,958 |
|
Hi ElMaestro, ❝ In perspective, could this methodology then be extended to a 3-treatment parallel study (e.g. US Ref, EU Ref, Test)? Intuitively – if we walk on EMA’s stony ground of ‘leave one out’ – I would say so.* Duno what will happen if we keep all treatments in the model. ❝ I am thinking we'd just need another sigma squared on the diagonal and then be good to go? I feel tempted to give you all statisticians’ standard answer on any arbitrary question: “Positively maybe!” ❝ If that's the case then the WNL approach –however counterintuitive and retarded it might seem– could provide a solution to a problem which cannot be resolved by the standard t-test approach? See above. Any ideas how to code that in R without setting the Silly-o-Meter on fire? ❝ Oh and by the way, I think this would imply that the denominator DFs would have to be calculated from treatment A, B as well as C, when a 90% CI for A/B is constructed - that's perhaps also worthy of a heated debate further down the road...? Sure. We are moving in a circle. Remember the sim’s Detlew performed in Dec 2011?
— Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
Helmut ★★★ ![]() ![]() Vienna, Austria, 2013-07-05 17:13 (4308 d 23:47 ago) @ ElMaestro Posting: # 10945 Views: 12,466 |
|
Hi ElMaestro, ❝ […] there must be a step for derivation of the denominator DF which happens to coincide with the DF you get via the Welch correction when just doing ordinary unpaired t-test with unequal variances. Given the two variances and sample sizes PHX/WNL’s degrees of freedom agree with R (21.4306 for the full data set and 10.7555 for the modified one); checked to 14 significant digits. According to Phoenix’ User’s Guide The linear model used in linear mixed effects modeling is: Y~N(Xb,V) where X is a matrix of fixed known constants, b is an unknown vector of constants, and V is the variance matrix dependent on other unknown parameters. Wald (1943)1 developed a method for testing hypotheses in a rather general class of models. To test the hypothesis H0: Lb = 0, the Wald statistic is: (Lβ)T[L([XTV–1X)–1LT]–1(Lβ) where β and V are estimators of β and V. L must be a matrix such that each row is in the row space of X. The Wald statistic is asymptotically distributed under the null hypothesis as a χ² random variable with q = rank(L) degrees of freedom. In common variance component models with balanced data, the Wald statistic has an exact F-distribution. Using the χ² approximation results in a test procedure that is too liberal. LinMix uses a method based on analysis techniques described by Allen and Cady (1982)2 for finding an F-distribution to approximate the distribution of the Wald statistic. … followed by two pages in matrix-notation I can’t comprehend (aka hazelnut brain). Let’s have a look at the modified data set (full precision). s21 0.129240461704103, n1 12 s22 0.563916088422299, n2 9 If I trust Wikipedia (s21+s22)2/[s41/(n1–1)+s42/(n2–1)] = 11.64240178 (≠ 10.75546079) ![]() Aha! (s21/n1+s22/n2)2/{s41/[n12(n1–1)]+s42/[n22(n2–1)]} = 10.75546079 ![]() ![]() Funny enough the radio buttons above turn out to be a gimmick without any effect. Whatever you choose – the dfs are identical. Strange: ![]()
— Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
ElMaestro ★★★ Denmark, 2013-07-05 19:08 (4308 d 21:52 ago) @ Helmut Posting: # 10946 Views: 11,920 |
|
Hi Helmut, ❝ If I trust Wikipedia ❝ (s21+s22)2/[s41/(n1–1)+s42/(n2–1)] = 11.64240178 (≠ 10.75546079) 10.76 appears correct. Quickie: WelchDF=function(V1, V2, N1, N2) But I have to admit I am still one big question mark as to why all this works correctly. All the matrix explanation and stuff is rather gibberish to me. I looked up what SAS writes about DDFM=SATT and I felt like hitting myself with a hammer after reading two lines of it. — Pass or fail! ElMaestro |
Helmut ★★★ ![]() ![]() Vienna, Austria, 2013-07-05 19:15 (4308 d 21:46 ago) @ ElMaestro Posting: # 10947 Views: 11,885 |
|
Hi ElMaestro, ❝ ❝ If I trust Wikipedia ❝ ❝ (s21+s22)2/[s41/(n1–1)+s42/(n2–1)] = 11.64240178 (≠ 10.75546079) WP is a strange piece of cake. The formula was correct on 2013-04-16, an anonymous editor from Austin, Texas screwed up on 2013-06-27, and corrected today by my humble self. I love audit-trails. ❝ 10.76 appears correct. In the meantime I have edited my post… ❝ Quickie: Nice. ❝ But I have to admit I am still one big question mark as to why all this works correctly. All the matrix explanation and stuff is rather gibberish to me. I looked up what SAS writes about DDFM=SATT and I felt like hitting myself with a hammer after reading two lines of it. You are not alone. — Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
ElMaestro ★★★ Denmark, 2013-07-05 20:25 (4308 d 20:35 ago) @ Helmut Posting: # 10948 Views: 11,907 |
|
Hi Helmut, at this point allow me to sum it up so far: Noone knows why, but if you are an egg-head with an IQ of 6 billion and qualified for a professorship at MIT and you chose to play around with 9 incomprehensible matrices from an obscure mixed model whose specification in WinNonlin is completely counterintuitive then you may be able to achieve exactly the same results as any lay person like you and I can derive from using 4 seconds on googling "Welch-Satterthwaite". Science is really making progress these days. Pharsight are you reading this? (Come on Simon, we know you are!) — Pass or fail! ElMaestro |
Helmut ★★★ ![]() ![]() Vienna, Austria, 2013-07-05 20:40 (4308 d 20:20 ago) @ ElMaestro Posting: # 10949 Views: 12,097 |
|
Hi ElMaestro, ❝ […] if you are an egg-head with an IQ of 6 billion and qualified for a professorship at MIT… At least chances for the former are somewhat low:
❝ Science is really making progress these days. Yep. ❝ Pharsight are you reading this? (Come on Simon, we know you are!) ![]() BTW, to quote Senn and Grieve* (2) Why would an investigator plan a trial with the object of proving equality of two formulations if the variances were believed different?
— Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |