Al Gore Rhythms [🇷 for BE/BA]
❝ Hope you have already waited for me.
Yesss!
❝ Here are the results of the SAS Proc Power.
❝ Seems the power is calculated in this case totally wrong!
Fascinating.
❝ My own rolled code (relying on Owens Q-functions, undocumented but available in SAS) gives:
That’s the more interesting part (homebrew)!
n % power n % power
------------------------------------------------
#1 Diletti et al. 4 >70 6 >90
#2 PASS 4 72.90
#3 D Labes' SAS code 4 72.9014 6 98.6992
#4 nQuery Advisor 7 4 71.559 6 97.943
#5 R-code 4 66.674 6 98.697
#6 FARTSSIE 1.6 4 66.674 6 98.697
#7 StudySize 2.0.1 4 15.9 (!) 6 93.201
n=4 takes the lead by 4:3! Observations:
#5 (based on Algorithm AS 243) and #6 give identical results. This is not surprising, because the VBA-routine within FARTSSIE was written by Russell V. Lenth, the author of AS 243. #2/3 agree; for n=6 power is comparable with #5/6. #4 calculates lower power than #1-3, but still would suggest n=4. The difference between #1-3 and #5/6 might be due to different algorithms for estimating the noncentral t-distribution (#1/3: ?, #2: AS 243?, #4: AS 184, #5/6: AS 243). #7 uses approximations (Ref. 2 in this post); however, yields conservative results.
Maybe I should contact Dieter Hauschke to join the party…
Edit: Many, many years later.
library(PowerTOST)
res <- data.frame(method = c("exact", "mvt", "nct", "central"),
n = NA_integer_, power = NA_real_)
for (j in 1:nrow(res)) {
res[j, 2:3] <- sampleN.TOST(CV = 0.075, theta0 = 1,
targetpower = 0.7,
method = res$method[j],
print = FALSE)[7:8]
}
print(res, row.names = FALSE)
method n power
exact 4 0.7290143
mvt 4 0.7290142
nct 6 0.9869738
central 6 0.9611687
Dif-tor heh smusma 🖖🏼 Довге життя Україна!
Helmut Schütz
The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
Complete thread:
- R-Code for Power in 2×2 Cross-over Helmut 2006-12-28 21:33 [🇷 for BE/BA]
- Power in Diletti's sample size table Helmut 2007-01-01 23:59
- Approximate Power Helmut 2007-01-06 15:17
- Power Calculation for replicate crossover design mathews 2008-04-03 13:19
- Power Calculation for replicate crossover design Helmut 2008-04-03 13:49
- Power Calculation for replicate crossover design mathews 2008-04-04 13:21
- Power Calculation for replicate crossover design Helmut 2008-04-03 13:49
- Exact Power Helmut 2009-09-25 19:20
- Exact Power ElMaestro 2009-09-27 23:27
- Software validation Helmut 2009-09-28 15:21
- All the important answers are here! ElMaestro 2009-09-28 19:12
- All the important answers are here! Helmut 2009-09-28 19:52
- All the important answers are here! ElMaestro 2009-09-28 20:18
- All the important answers are here! yjlee168 2009-09-28 21:30
- All the important answers are here! Helmut 2009-09-28 23:18
- 42! SASophylistic power oracle d_labes 2009-09-29 13:37
- Al Gore RhythmsHelmut 2009-09-29 14:52
- Al Gore Rhythms ElMaestro 2009-09-29 18:14
- Al Gore Rhythms yjlee168 2009-09-29 23:55
- Al Gore RhythmsHelmut 2009-09-29 14:52
- 42! SASophylistic power oracle d_labes 2009-09-29 13:37
- All the important answers are here! yjlee168 2009-09-29 23:49
- All the important answers are here! Helmut 2009-09-28 23:18
- All the important answers are here! Helmut 2009-09-28 19:52
- All the important answers are here! ElMaestro 2009-09-28 19:12
- Software validation Helmut 2009-09-28 15:21
- Exact Power ElMaestro 2009-09-27 23:27
- Power Calculation for replicate crossover design mathews 2008-04-03 13:19
- Approximate Power Helmut 2007-01-06 15:17
- R-Code for Power in 2×2 Cross-over KDA 2019-01-23 04:24
- R-Code for Power in 2×2 Cross-over Ohlbe 2019-01-27 18:24
- R-Code for Power in 2×2 Cross-over Brus 2021-12-02 15:00
- R-Code for Power in 2×2 Cross-over ElMaestro 2021-12-02 15:15
- R-Code for Power in 2×2 Cross-over Helmut 2021-12-02 17:30
- R-Code for Power in 2×2 Cross-over Helmut 2021-12-02 16:57
- R-Code for Power in 2×2 Cross-over ElMaestro 2021-12-02 15:15
- Power in Diletti's sample size table Helmut 2007-01-01 23:59