Nitpicker! [Two-Stage / GS Designs]

posted by Helmut Homepage – Vienna, Austria, 2017-08-22 13:33  – Posting: # 17730
Views: 22,964

Hi ElMaestro,

» 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.
  1. 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


  2. 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


Cheers,
Helmut Schütz
[image]

The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes

Complete thread:

Activity
 Admin contact
20,142 posts in 4,248 threads, 1,387 registered users;
online 10 (0 registered, 10 guests [including 5 identified bots]).
Forum time (Europe/Vienna): 15:12 CET

Maturity is the capacity to endure uncertainty.    John Finley

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