Potentially solved it [Two-Stage / GS Designs]

posted by ElMaestro  – Denmark, 2011-11-20 19:54 (4964 d 13:16 ago) – Posting: # 7683
Views: 4,604

Hmmmm,

I got a very cool idea this morning:

X is invariant for any given N1 and N2 (let those be the number of experimental units at stage 1 and 2). So (XtX)-1Xt is invariant for any given N1 and N2.
For any givev N1, I can generate all possible (XtX)-1Xt's and cache them in memory, just keeping track of the pointers. It consumes sh!tload of memory to go up to e.g. N2=1000, but hey so does Firefox or Excel or whatever. So, once we have y for N1 and an Algore Rhytm for stopping or proceeding to stage 2, we can just calculate N2 and, sim another N2 y-values and append to the first y-vector, then access (XtX)-1Xt that applies that that (N1+N2) through the pointers and multiply it onto the simulated combined y-vector.
This is a quite miraculous speed-up.

One million sims in three seconds and so far all solutions that I checked agree with R's lm.

Now, one of the laws of nature state that when ElMaestro gets a good idea it is usually a bad idea after closer inspection. So I better get started digging into this :pirate:

Wishing yawl a pleasant rest of the weekend.
EM.

Complete thread:

UA Flag
Activity
 Admin contact
23,424 posts in 4,927 threads, 1,674 registered users;
26 visitors (0 registered, 26 guests [including 7 identified bots]).
Forum time: 10:10 CEST (Europe/Vienna)

I have had my results for a long time:
but I do not yet know how I am to arrive
at them.    Carl Friedrich Gauß

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