Nitpicker! [Two-Stage / GS Designs]
Hi ElMaestro,
No, you were. I’m currently busy with other stuff.
Better to have a look at the current version of sampsiz2.R. There you find in lines 42–46:
You have a point. IMHO, this question should be answered: yes! n1+n2−3 degrees of freedom mentioned already by Mdm. Povin.
Forget my last code. Should be:
Good news: Equal sample sizes (so we can use
❝ I imagine I was not able to explain what I meant??
No, you were. I’m currently busy with other stuff.
❝ I looked at the code available here.
Better to have a look at the current version of sampsiz2.R. There you find in lines 42–46:
# degrees of freedom as expression
# n-2 for 2x2 crossover and 2-group parallel design
dfe <- parse(text="n-2", srcfile=NULL)
# or should that read n-3? see Kieser/Rauch
#dfe <- parse(text="n-3", srcfile=NULL)
You have a point. IMHO, this question should be answered: yes! n1+n2−3 degrees of freedom mentioned already by Mdm. Povin.
Forget my last code. Should be:
n2 <- n + n %% 2 - n1
n1 = 12; stage 2 sample sizes (n2), method = exact
CV sampleN.TOST pwr.TOST sampleN2.TOST pwr.sampleN2.TOST
0.10 NA 0.97308 NA 0.97308
0.15 2 0.81765 2 0.82711
0.20 12 0.83603 12 0.83875
0.25 22 0.81272 22 0.81411
0.30 36 0.81708 36 0.81775
0.35 50 0.80576 50 0.80616
0.40 68 0.81051 68 0.81075
0.45 86 0.80654 86 0.80670
0.50 106 0.80584 106 0.80595
0.55 126 0.80158 126 0.80165
0.60 148 0.80090 148 0.80096
0.65 172 0.80292 172 0.80297
0.70 196 0.80299 196 0.80303
0.75 220 0.80198 220 0.80201
0.80 244 0.80040 244 0.80042
Good news: Equal sample sizes (so we can use
sampleN.TOST()
till we have code specific for the 2nd stage; for studies proceeding to the 2nd stage power wrong in the 3rd decimal or less). Now one of the riddles of Potvin’s paper is resolved. Could never figure out the reported power of the examples.- n1 12, s²1 0.020977 ⇒ N 14, reported power 83.1%.
CV <- mse2CV(0.020977)
print(round(sampleN.TOST(alpha=0.0294, CV=CV, method="shifted",
details=FALSE, print=FALSE)[7:8], 3),
row.names=FALSE)
Sample size Achieved power
14 0.837
print(round(sampleN2.TOST(alpha=0.0294, CV=CV, n1=12,
method="shifted")[8:9], 3),
row.names=FALSE)
Sample size Achieved power
2 0.831
- n1 12, s²1 0.032634 ⇒ N 20, reported power 82.4%.
CV <- mse2CV(0.032634)
print(round(sampleN.TOST(alpha=0.0294, CV=CV, method="shifted",
details=FALSE, print=FALSE)[7:8], 3),
row.names=FALSE)
Sample size Achieved power
20 0.826
print(round(sampleN2.TOST(alpha=0.0294, CV=CV, n1=12,
method="shifted")[8:9], 3),
row.names=FALSE)
Sample size Achieved power
8 0.824
—
Dif-tor heh smusma 🖖🏼 Довге життя Україна!![[image]](https://static.bebac.at/pics/Blue_and_yellow_ribbon_UA.png)
Helmut Schütz
![[image]](https://static.bebac.at/img/CC by.png)
The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
Dif-tor heh smusma 🖖🏼 Довге життя Україна!
![[image]](https://static.bebac.at/pics/Blue_and_yellow_ribbon_UA.png)
Helmut Schütz
![[image]](https://static.bebac.at/img/CC by.png)
The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
Complete thread:
- Initial sample size guess for the Potvin methods ElMaestro 2017-08-19 15:04 [Two-Stage / GS Designs]
- Initial sample size guess for the Potvin methods Helmut 2017-08-19 16:06
- Initial sample size guess for the Potvin methods ElMaestro 2017-08-19 16:14
- Initial sample size guess for the Potvin methods Helmut 2017-08-19 17:12
- Initial sample size guess for the Potvin methods ElMaestro 2017-08-19 17:17
- Confuse-a-Cat Helmut 2017-08-19 17:33
- Confuse-a-Cat ElMaestro 2017-08-19 17:56
- Confuse-a-Cat Helmut 2017-08-19 17:33
- Initial sample size guess for the Potvin methods ElMaestro 2017-08-19 17:17
- loop ↔ vectorized ↔ direct Helmut 2017-08-20 14:40
- loop ↔ vectorized ↔ direct ElMaestro 2017-08-20 15:22
- loop ↔ vectorized ↔ direct Helmut 2017-08-20 16:23
- loop ↔ vectorized ↔ direct ElMaestro 2017-08-20 17:22
- loop ↔ vectorized ↔ direct Helmut 2017-08-20 16:23
- loop ↔ vectorized ↔ direct ElMaestro 2017-08-20 15:22
- Initial sample size guess for the Potvin methods Helmut 2017-08-19 17:12
- Initial sample size guess for the Potvin methods ElMaestro 2017-08-19 16:14
- The n ext crackpot iteration ElMaestro 2017-08-19 20:04
- The n ext crackpot iteration Helmut 2017-08-20 02:20
- The ultimate crackpot iteration! ElMaestro 2017-08-20 14:35
- The ultimate crackpot iteration! Helmut 2017-08-20 15:11
- The ultimate crackpot iteration! ElMaestro 2017-08-20 15:28
- The ultimate crackpot iteration! Helmut 2017-08-20 16:06
- The ultimate crackpot iteration! ElMaestro 2017-08-20 16:15
- The ultimate crackpot iteration! Helmut 2017-08-20 18:58
- The ultimate crackpot iteration! ElMaestro 2017-08-20 19:32
- Suggested code ElMaestro 2017-08-21 18:13
- Nitpicker!Helmut 2017-08-22 13:33
- Nitpicker! ElMaestro 2017-08-22 17:27
- Nitpicker! Helmut 2017-08-22 17:49
- Nitpicker! ElMaestro 2017-08-22 17:59
- Nitpicker! Helmut 2017-08-22 19:15
- Benchmark code ElMaestro 2017-08-22 22:29
- Benchmark code Helmut 2017-08-23 01:48
- Benchmark code ElMaestro 2017-08-22 22:29
- Nitpicker! Helmut 2017-08-22 19:15
- Nitpicker! ElMaestro 2017-08-22 17:59
- Nitpicker! Helmut 2017-08-22 17:49
- Nitpicker! ElMaestro 2017-08-22 17:27
- Nitpicker!Helmut 2017-08-22 13:33
- Suggested code ElMaestro 2017-08-21 18:13
- The ultimate crackpot iteration! ElMaestro 2017-08-20 19:32
- The ultimate crackpot iteration! Helmut 2017-08-20 18:58
- The ultimate crackpot iteration! ElMaestro 2017-08-20 16:15
- The ultimate crackpot iteration! Helmut 2017-08-20 16:06
- The ultimate crackpot iteration! ElMaestro 2017-08-20 15:28
- The ultimate crackpot iteration! Helmut 2017-08-20 15:11
- Initial sample size guess for the Potvin methods Helmut 2017-08-19 16:06