Helmut ★★★ Vienna, Austria, 2022-06-12 13:37 (953 d 17:58 ago) Posting: # 23051 Views: 4,455 |
|
Dear all, the EMA1–3 recommends for higher-order crossovers the ‘Two-at-a-Time’ approach, i.e., to exclude all but two treatments, leading to Incomplete Block Designs.4 That’s fine, since the ‘All at Once’ approach (an ANOVA of all data) may lead to biased estimates and an inflated Type I Error.5,6 So far I had to deal only with three treatments and planned pairwise comparisons \(\small{\text{A}\;vs\;\text{C}}\) and \(\small{\text{B}\;vs\;\text{C}}\). For a six-sequence Williams’ design we get$$\small{\begin{array}{c|ccc} s/p & \text{I} & \text{II} & \text{III} \\\hline 1 & \text{A} & \text{B} & \text{C}\\ 2 & \text{A} & \text{C} & \text{B}\\ 3 & \text{B} & \text{A} & \text{C}\\ 4 & \text{B} & \text{C} & \text{A}\\ 5 & \text{C} & \text{A} & \text{B}\\ 6 & \text{C} & \text{B} & \text{A}\\ \end{array}{\color{Blue}\mapsto} \begin{array}{c|ccc} s/p & \text{I} & \text{II} & \text{III} \\\hline 1 & \text{A} & {\color{Red}\bullet} & \text{C}\\ 2 & \text{A} & \text{C} & {\color{Red}\bullet}\\ 3 & {\color{Red}\bullet} & \text{A} & \text{C}\\ 4 & {\color{Red}\bullet} & \text{C} & \text{A}\\ 5 & \text{C} & \text{A} & {\color{Red}\bullet}\\ 6 & \text{C} & {\color{Red}\bullet} & \text{A}\\ \end{array}{\color{Blue}\wedge} \begin{array}{c|ccc} s/p & \text{I} & \text{II} & \text{III} \\\hline 1 & {\color{Red}\bullet} & \text{B} & \text{C}\\ 2 & {\color{Red}\bullet} & \text{C} & \text{B}\\ 3 & \text{B} & {\color{Red}\bullet} & \text{C}\\ 4 & \text{B} & \text{C} & {\color{Red}\bullet}\\ 5 & \text{C} & {\color{Red}\bullet} & \text{B}\\ 6 & \text{C} & \text{B} & {\color{Red}\bullet}\\ \end{array}}$$ where \(\small{{\color{Red}\bullet}}\) denotes an excluded treatment. Both IBDs are balanced. Excellent. What about four treatments in a Williams’ design with pairwise comparisons \(\small{\text{A}\;vs\;\text{D}}\), \(\small{\text{B}\;vs\;\text{D}}\), and \(\small{\text{C}\;vs\;\text{D}}\)? $$\small{\begin{array}{c|cccc} s/p & \text{I} & \text{II} & \text{III} & \text{IV}\\\hline 1 & \text{A} & \text{B} & \text{C} & \text{D}\\ 2 & \text{B} & \text{D} & \text{A} & \text{C}\\ 3 & \text{C} & \text{A} & \text{B} & \text{D}\\ 4 & \text{D} & \text{C} & \text{B} & \text{A}\\ \end{array}{\color{Blue}\mapsto} \begin{array}{c|cccc} s/p & \text{I} & \text{II} & \text{III} & \text{IV} \\\hline 1 & \text{A} & {\color{Red}\bullet} & {\color{Red}\bullet} & \text{D}\\ 2 & {\color{Red}\bullet} & \text{D} & \text{A} & {\color{Red}\bullet}\\ 3 & {\color{Red}\bullet} & \text{A} & {\color{Red}\bullet} & \text{D}\\ 4 & \text{D} & {\color{Red}\bullet} & {\color{Red}\bullet} & \text{A}\\ \end{array}{\color{Blue}\wedge} \begin{array}{c|cccc} s/p & \text{I} & \text{II} & \text{III} & \text{IV}\\\hline 1 & {\color{Red}\bullet} & \text{B} & {\color{Red}\bullet} & \text{D}\\ 2 & \text{B} & \text{D} & {\color{Red}\bullet} & {\color{Red}\bullet}\\ 3 & {\color{Red}\bullet} & {\color{Red}\bullet} & \text{B} & \text{D}\\ 4 & \text{D} & {\color{Red}\bullet} & \text{B} & {\color{Red}\bullet}\\ \end{array}{\color{Blue}\wedge} \begin{array}{c|cccc} s/p & \text{I} & \text{II} & \text{III} & \text{IV}\\\hline 1 & {\color{Red}\bullet} & {\color{Red}\bullet} & \text{C} & \text{D}\\ 2 & {\color{Red}\bullet} & \text{D} & {\color{Red}\bullet} & \text{C}\\ 3 & \text{C} & {\color{Red}\bullet} & {\color{Red}\bullet} & \text{D}\\ 4 & \text{D} & \text{C} & {\color{Red}\bullet} & {\color{Red}\bullet}\\ \end{array}}$$ Now the IBDs are imbalanced and hence, lacking period effects have to be assumed. Nasty. Solution: Use one of the 24 arrangements given by Senn.6 Here the first as an example: $$\small{\begin{array}{c|cccc} s/p & \text{I} & \text{II} & \text{III} & \text{IV}\\\hline 1 & \text{A} & \text{B} & \text{C} & \text{D}\\ 2 & \text{B} & \text{A} & \text{D} & \text{C}\\ 3 & \text{C} & \text{D} & \text{A} & \text{B}\\ 4 & \text{D} & \text{C} & \text{B} & \text{A}\\ \end{array}{\color{Blue}\mapsto} \begin{array}{c|cccc} s/p & \text{I} & \text{II} & \text{III} & \text{IV} \\\hline 1 & \text{A} & {\color{Red}\bullet} & {\color{Red}\bullet} & \text{D}\\ 2 & {\color{Red}\bullet} & \text{A} & \text{D} & {\color{Red}\bullet}\\ 3 & {\color{Red}\bullet} & \text{D} & \text{A} & {\color{Red}\bullet}\\ 4 & \text{D} & {\color{Red}\bullet} & {\color{Red}\bullet} & \text{A}\\ \end{array}{\color{Blue}\wedge} \begin{array}{c|cccc} s/p & \text{I} & \text{II} & \text{III} & \text{IV}\\\hline 1 & {\color{Red}\bullet} & \text{B} & {\color{Red}\bullet} & \text{D}\\ 2 & \text{B} & {\color{Red}\bullet} & \text{D} & {\color{Red}\bullet}\\ 3 & {\color{Red}\bullet} & \text{D} & {\color{Red}\bullet} & \text{B}\\ 4 & \text{D} & {\color{Red}\bullet} & \text{B} & {\color{Red}\bullet}\\ \end{array}{\color{Blue}\wedge} \begin{array}{c|cccc} s/p & \text{I} & \text{II} & \text{III} & \text{IV}\\\hline 1 & {\color{Red}\bullet} & {\color{Red}\bullet} & \text{C} & \text{D}\\ 2 & {\color{Red}\bullet} & {\color{Red}\bullet} & \text{D} & \text{C}\\ 3 & \text{C} & \text{D} & {\color{Red}\bullet} & {\color{Red}\bullet}\\ 4 & \text{D} & \text{C} & {\color{Red}\bullet} & {\color{Red}\bullet}\\ \end{array}}$$ All is good. An -script at the end. BTW, the common Latin Square (\(\small{\text{ABCD}\,|\,\text{BCDA}\,|\,\text{CDAB}\,|\,\text{DABC}}\)) would do as well.
— Dif-tor heh smusma 🖖🏼 Довге життя Україна! Helmut Schütz The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
Shuanghe ★★ Spain, 2022-06-12 21:02 (953 d 10:33 ago) @ Helmut Posting: # 23053 Views: 3,647 |
|
Dear Helmut, I vaguelly recall that for 4x4 William design, each row (sequence) and each column (period) should contain A, B, C, and D each exactly once. I think that there's a typo in the 3rd sequence of your first William design. Your 3rd and 4th column do not seem right. So 3rd period would have 2 Bs and 4th had 2 Ds. CABD should be CADB. So It would be ABCD/BDAC/CADB/DCBA. In such case, it would be balanced for pair-wise comparisons. $$\small{\begin{array}{c|cccc} s/p & \text{I} & \text{II} & \text{III} & \text{IV}\\\hline 1 & \text{A} & \text{B} & \text{C} & \text{D}\\ 2 & \text{B} & \text{D} & \text{A} & \text{C}\\ 3 & \text{C} & \text{A} & \text{D} & \text{B}\\ 4 & \text{D} & \text{C} & \text{B} & \text{A}\\ \end{array}{\color{Blue}\mapsto} \begin{array}{c|cccc} s/p & \text{I} & \text{II} & \text{III} & \text{IV} \\\hline 1 & \text{A} & {\color{Red}\bullet} & {\color{Red}\bullet} & \text{D}\\ 2 & {\color{Red}\bullet} & \text{D} & \text{A} & {\color{Red}\bullet}\\ 3 & {\color{Red}\bullet} & \text{A} & \text{D} & {\color{Red}\bullet}\\ 4 & \text{D} & {\color{Red}\bullet} & {\color{Red}\bullet} & \text{A}\\ \end{array}{\color{Blue}\wedge} \begin{array}{c|cccc} s/p & \text{I} & \text{II} & \text{III} & \text{IV}\\\hline 1 & {\color{Red}\bullet} & \text{B} & {\color{Red}\bullet} & \text{D}\\ 2 & \text{B} & \text{D} & {\color{Red}\bullet} & {\color{Red}\bullet}\\ 3 & {\color{Red}\bullet} & {\color{Red}\bullet} & \text{D} & \text{B}\\ 4 & \text{D} & {\color{Red}\bullet} & \text{B} & {\color{Red}\bullet}\\ \end{array}{\color{Blue}\wedge} \begin{array}{c|cccc} s/p & \text{I} & \text{II} & \text{III} & \text{IV}\\\hline 1 & {\color{Red}\bullet} & {\color{Red}\bullet} & \text{C} & \text{D}\\ 2 & {\color{Red}\bullet} & \text{D} & {\color{Red}\bullet} & \text{C}\\ 3 & \text{C} & {\color{Red}\bullet} & \text{D} & {\color{Red}\bullet}\\ 4 & \text{D} & \text{C} & {\color{Red}\bullet} & {\color{Red}\bullet}\\ \end{array}}$$ — All the best, Shuanghe |
Helmut ★★★ Vienna, Austria, 2022-06-12 22:10 (953 d 09:25 ago) @ Shuanghe Posting: # 23054 Views: 3,524 |
|
Hi Shuanghe, long time, no hear! ❝ I vaguelly recall that for 4x4 William design, each row (sequence) and each column (period) should contain A, B, C, and D each exactly once. Absolutely correct. ❝ I think that there's a typo in the 3rd sequence of your first William design. F**k & THX! You are right. ❝ Your 3rd and 4th column do not seem right. So 3rd period would have 2 Bs and 4th had 2 Ds. CABD should be CADB. So It would be ABCD/BDAC/CADB/DCBA. Yep. An updated -script which works for any number of treatments (tested for ≤ 8) at the end. Of course, more than five treatments in a higher-order crossover are not realistic due to the number of periods and likely a Balanced Incomplete Block Design will be used instead. Not implemented yet. An example for the maximum of treatments I ever came across:
DAFCEB and FDEABC and three subjects in each of the other four sequences. However, that’s not relevant because we aim at balance of the IBDs. If you want balance, specify bal <- TRUE . In the example it would require 24 subjects instead of 20.Although there is just one Williams’ design for three treatments, there are six possible for four treatments, twelve for five, 120 for six, and 360 for seven. The function williams() of randomizeBE will arbitrarily select one of them.If you run the script, the chance to get the same sequences like in my example is 1/120. Edit: Don’t use this script. Use the one at the end of this post instead.
— Dif-tor heh smusma 🖖🏼 Довге життя Україна! Helmut Schütz The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
Shuanghe ★★ Spain, 2022-07-10 02:05 (926 d 05:30 ago) @ Helmut Posting: # 23123 Views: 3,322 |
|
Hi Helmut, ❝ long time, no hear! Indeed. COVID, change of company and workload, study, ..., Pretty busy these days. Had to work day and night recently to catch everything up, so I had much less time to read the forum than before... But I'll be in Amsterdam this September for the 5th global BE harmonisation conference, so hopefully we'll have time to have a drink together By the way, the Article section is new, am I right? (Don't tell me I missed this section all those years...) I am supprised that no one mentioned it in the forum. I don't have time to read the lengthy ones yet but I really enjoy the reading among the few short ones that I've picked. ❝ All extracted IBDs are balanced. What I understood about balanced IBD here is that, e.g., the number for A vs. F comparison should be same as number of F vs. A. So there should be 10 for each comparison for 20 in total. If that is a correct understanding, it seems that for B, C and D, yes, but for A and E, not... There're 11 AF (FE) but 9 FA (EF). Shouldn't it be 10 and 10 like B/C/D vs F? ❝ If you run the script, the chance to get the same sequences like in my example is 1/120. I tried the code and obviously I cannot reproduce your result as you said, but among the few runs I had, there is a run with 8 EF and 12 FE, 11 FA (BF) and 9 AF(FB)... — All the best, Shuanghe |
Helmut ★★★ Vienna, Austria, 2022-07-10 18:02 (925 d 13:33 ago) @ Shuanghe Posting: # 23126 Views: 3,525 |
|
Hi Shuanghe, ❝ I'll be in Amsterdam this September for the 5th global BE harmonisation conference, so hopefully we'll have time to have a drink together Great! BioBridges (22/23 September) as well? ❝ By the way, the Article section is new, am I right? (Don't tell me I missed this section all those years...) <1½ years. ❝ I am supprised that no one mentioned it in the forum. Well, I do. Actually I was bored of answering similar questions over and over again. Now I reply only with: “, for details see article XYZ.” ❝ I don't have time to read the lengthy ones yet but I really enjoy the reading among the few short ones that I've picked. THX! ❝ What I understood about balanced IBD here is that, e.g., the number for A vs. F comparison should be same as number of F vs. A. So there should be 10 for each comparison for 20 in total. ❝ If that is a correct understanding, … Of course, it is. ❝ … it seems that for B, C and D, yes, but for A and E, not... There're 11 AF (FE) but 9 FA (EF). Shouldn't it be 10 and 10 like B/C/D vs F? THX for discovering such a nasty bug! If debugging is the process of removing bugs, then programming must be the process of putting them in. Edsger W. Dijkstra New (lengthy) script at the end. More flexible ( theta0 , theta1 , theta2 , target , do.rate , and a vector of references ref can be specified).Call the function with e.g., make.ibds(ntmt = 6, CV = 0.2) :
bal = TRUE in the call:
If you are interested in the performance:
More arguments (NTID, T/R-ratio 0.975, power ≥90%, adjusting for anticipated dropout-rate 5%, runtime suppressed):
You can also assign the stuff to a list-variable for checking. No counting any more.
Comparison of one test with two references:
If all pairwise comparisons are required (i.e., additionally between the tests), the number rises quickly: $$N_\text{comp}=\frac{n!}{2\,(n-2)!}$$ For six treatments we have already 15 pairwise comparisons.
— Dif-tor heh smusma 🖖🏼 Довге життя Україна! Helmut Schütz The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
Shuanghe ★★ Spain, 2022-07-13 17:35 (922 d 13:59 ago) @ Helmut Posting: # 23142 Views: 3,200 |
|
Hi Helmut, ❝ BioBridges (22/23 September) as well? Sure! It would be very nice to see all the familiar faces. Actually I searched the forum several time before but couldn't find any information on BioBridges this year. You used to have a post called eventlist each year and BioBridges is usually on it but it seems this year is an exception. ❝ THX for discovering such a nasty bug! ❝ If debugging is the process of removing bugs, ❝ then programming must be the process of putting them in. Edsger W. Dijkstra Damn, looking at my own code, I must be a bug farmer then ... ❝
❝ ❝ Thanks. I'll save the code to read it later. — All the best, Shuanghe |
Helmut ★★★ Vienna, Austria, 2022-07-13 18:46 (922 d 12:49 ago) @ Shuanghe Posting: # 23143 Views: 3,218 |
|
Hi Shuanghe, ❝ […] I searched the forum several time before but couldn't find any information on BioBridges this year. You used to have a post called eventlist each year and BioBridges is usually on it but it seems this year is an exception. Sorry, too busy with crazy stuff. ❝ Damn, looking at my own code, I must be a bug farmer then ... Welcome to the club! ❝ I'll save the code to read it later. Reading code? Proves that you are real NE?D! Don’t get obstipation of too much Spaghetti viennese (i.e., my coding style). I have stopped reading Stephen King novels. Now I just read C code instead. Richard A. O’Keefe PS: I edited the script. Use the new one. See also there: Scroll down and click . — Dif-tor heh smusma 🖖🏼 Довге життя Україна! Helmut Schütz The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |