power.inf() [BE/BA News]

posted by d_labes  – Berlin, Germany, 2012-10-09 17:58 (4656 d 10:31 ago) – Posting: # 9359
Views: 12,785

Dear Helmut!

power.noninf(alpha=0.05, CV=0.298, margin=0.8, theta0=0.752, n=277)

❝ # [1] 0.8010803

Remark 1: Formulas implemented assume balanced designs. But power.noninf() doesn't check this :-|.
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. :-D 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! :cool:

❝ ❝ 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? :-D

Regards,

Detlew

Complete thread:

UA Flag
Activity
 Admin contact
23,428 posts in 4,929 threads, 1,687 registered users;
67 visitors (0 registered, 67 guests [including 18 identified bots]).
Forum time: 04:29 CEST (Europe/Vienna)

To know that we know what we know,
and to know that we do not know what we do not know,
that is true knowledge.    Nicolaus Copernicus

The Bioequivalence and Bioavailability Forum is hosted by
BEBAC Ing. Helmut Schütz
HTML5