Sensitivity analysis for all ABE designs [Power / Sample Size]
❝ below the code for all designs covered in PowerTOST()
, conventional (unscaled) ABE. You have to paste the functions only once to the R-console and call the function Sens()
with values defined in the end or call it directly, e.g.,
❝ Sens(CV=0.24, GMR=1.07, pwr.target=0.8, pwr.min=0.7, des="3x6x3")
THX for that code. Maybe there is a better solution than pasting the function into the R-console: Incorporating it into PowerTOST

May need also some thinking about the return value(s) of the function.
BTW: What did you mean by your sentence in your post above "This little exercise is not a substitute for the sensitivity analysis which should be performed in study planning ..."?
Sens()
not useful in real life?❝ Note that the code tries to keep the degree of imbalance as close as possible between sequences. In real life other combinations may occur. As already noted by Detlew in this post the more imbalanced a study is, the lower the power.*
This is surely a minor shortcoming of your code. But if we assume drop-outs by random its a reasonable attempt I think in the planning phase where we don't have 'real life' data. And at least I have no "better" idea.
❝ ...
❝ @R-Freaks: The construction of imbalanced sequences is both lengthy and clumsy. Any suggestions are welcome.
Will try it if time allows

Idea: use number of sequences = steps from
known.designs()
and make a general solution of the n's in sequence groups - looping over sequences.❝
- If a sequence is completely lost,
power2.TOST()
– correctly? – gives power=0. See these two examples:❝
power2.TOST(CV=0.2, n=c(1, 2, 3, 3, 3, 3), design="3x6x3")
❝ power2.TOST(CV=0.2, n=c(0, 3, 3, 3, 3, 3), design="3x6x3")
If this is truly correct? Don't think so.
Simply the design changes to another one. Maybe also to one not implemented.
In your example it changes to "3x5x3". Not in
known.designs()
!This can't handled properly in PowerTOST at moment. No df's, no design constant ...
Eventually
power2.TOST()
should throw an error/warning if it encounters some n's = zero.Regards,
Detlew
Complete thread:
- Deviating from assumptions Helmut 2014-08-08 15:44 [Power / Sample Size]
- Some Nitpicking d_labes 2014-08-12 09:12
- Some Nitpicking Helmut 2014-08-12 10:49
- R-code for all ABE designs Helmut 2014-08-12 17:21
- Sensitivity analysis for all ABE designsd_labes 2014-08-13 09:30
- Sensitivity analysis for all ABE designs Helmut 2014-08-13 14:49
- R-code shortening d_labes 2014-08-13 16:32
- Suggestions / Sneak Preview Helmut 2014-08-13 16:42
- Suggestions / Sneak Preview d_labes 2014-08-15 09:01
- Suggestions / Sneak Preview Helmut 2014-08-15 12:02
- Mehl returned! d_labes 2014-08-15 11:27
- Mehl returned! Helmut 2014-08-15 11:42
- Suggestions / Sneak Preview d_labes 2014-08-15 09:01
- Suggestions / Sneak Preview Helmut 2014-08-13 16:42
- Sensitivity analysis for all ABE designsd_labes 2014-08-13 09:30
- Some Nitpicking d_labes 2014-08-12 09:12