power.inf() [BE/BA News]
Dear Helmut!
.
Remark 2: Meanwhile after thinking about I would call it a bug because power.noninf() claims that it calculates the power of a non-inferiority test. But it does this only for theta0 >= margin if margin is <1 and for theta0 <= margin if margin is >1. Otherwise the power of an 'inferiority' test is calculated (exchanged Null and Alternative). I consider to 'repair' the code.
Kuuhl!
Your number came from a sample size planning via CI half-width if I'm right (trial to a given precision).
Ben has developed an R function
He borrowed some code from PowerTOST, namely the (internal) functions
Specific enough for dummies?
❝ power.noninf(alpha=0.05, CV=0.298, margin=0.8, theta0=0.752, n=277)
❝ # [1] 0.8010803

Remark 2: Meanwhile after thinking about I would call it a bug because power.noninf() claims that it calculates the power of a non-inferiority test. But it does this only for theta0 >= margin if margin is <1 and for theta0 <= margin if margin is >1. Otherwise the power of an 'inferiority' test is calculated (exchanged Null and Alternative). I consider to 'repair' the code.
❝ ... I didn’t realize that it’s possible to enter the house through the back door. Of course one can cheat as well (exchanging the limit with the ratio):
❝ sampleN.noninf(alpha=0.05, CV=0.298, theta0=0.8, margin=0.752) ...
Kuuhl!

❝ ❝ Code from this thread (replacing the calls to internal PowerTOST functions to PowerTOST:::func_to_call, f.i. PowerTOST:::.design.no(design)
) gives me 228
❝
❝ Hhm, can you be a little bit more specific (= for dummies like me)?
Your number came from a sample size planning via CI half-width if I'm right (trial to a given precision).
Ben has developed an R function
ss_ci()
to do this in the mentioned thread. He borrowed some code from PowerTOST, namely the (internal) functions
.design.no()
and .design.props()
. These functions are since the introduction of a mandatory NAMESPACE for packages no longer accessible in simple way from outside the package. Therefore you will get an error "function not found" if you run the code unchanged. You have to change the code and call the functions via the package:::name syntax. Type help(":::") in your R console to get some more information.Specific enough for dummies?

—
Regards,
Detlew
Regards,
Detlew
Complete thread:
- Bupropion ER Tablets Helmut 2012-10-05 15:59
- Bupropion ER Tablets jag009 2012-10-05 22:30
- results, wording ElMaestro 2012-10-05 23:35
- Null hypothesis, PowerTOST/sampleN.inf() Helmut 2012-10-06 01:14
- Null hypothesis, PowerTOST/sampleN.inf() ElMaestro 2012-10-07 13:11
- power.inf() d_labes 2012-10-09 08:50
- power.inf() Helmut 2012-10-09 13:38
- power.inf()d_labes 2012-10-09 15:58
- power.inf() Helmut 2012-10-09 19:51
- power.inf()d_labes 2012-10-09 15:58
- power.inf() Helmut 2012-10-09 13:38
- Null hypothesis, PowerTOST/sampleN.inf() Helmut 2012-10-06 01:14