Potentially solved it [Two-Stage / GS Designs]
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
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
Wishing yawl a pleasant rest of the weekend.
EM.
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

Wishing yawl a pleasant rest of the weekend.
EM.
Complete thread:
- Equations for residual sigmas ElMaestro 2011-11-18 08:11
- When it comes to QR factorisation d_labes 2011-11-18 15:44
- Potentially solved itElMaestro 2011-11-20 18:54
- When it comes to QR factorisation d_labes 2011-11-18 15:44