The ultimate crackpot iteration! [Two-Stage / GS Designs]

posted by ElMaestro  – Belgium?, 2017-08-20 19:32 (1191 d 23:44 ago) – Posting: # 17728
Views: 24,826

Hi Hötzi,

we are not on the same page. Again :-D:-D
I am not sure I get it all, but I think with this code you are calling the same shit over and over again and that is completely unnecessary.
In the beginning of everything, before you initiate the simulation, literally before you make use of the nsims object, you read out the assumed GMR and target power, and on basis of that you can define an array of critical CV's which you initialise with the correct values. Once and for all. Not for every call where you need a sample size.

Note that if you initialise the array of critical values with syntax such as
vecCritCVs<<- rep(0, 400)

or however many values you need then vecCV will be public (I think), due to "<<-".
You can then access the array of critical CV's from within the SampleN.Stg2 function.

We might end up with something like:

sampleN.Stg2.EM <- function(CV)
{
  #all other variable info is already accumulated thin the critical values, so:
  Nps=1
  while (vecCritCVs[Nps]<=CV) Nps=Nps+1
  return(Nps*2) 
}


Can you see what I mean now?:cool::cool:

I could be wrong, but...

Best regards,
ElMaestro

No, of course you do not need to audit your CRO if it was inspected in 1968 by the agency of Crabongostan.

Complete thread:

Activity
 Admin contact
21,206 posts in 4,425 threads, 1,481 registered users;
online 2 (0 registered, 2 guests [including 2 identified bots]).
Forum time: Tuesday 18:16 CET (Europe/Vienna)

All we know about the world teaches us that the effects of A and B
are always different—in some decimal place—for any A and B.
Thus asking “are the effects different?” is foolish.    John W. Tukey

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