The n ext crackpot iteration [Two-Stage / GS Designs]

posted by Helmut Homepage – Vienna, Austria, 2017-08-20 04:20 (2440 d 18:15 ago) – Posting: # 17717
Views: 27,564

Capt’n,

some remarks. More maybe tomorrow.

❝ The polynomial provides a fantastic approximation within our entire interval of interest.


Played around a little. Based on the AIC the 4th degree is the winner indeed.

##note: We might not want to write blah^3 etc if we optimize for speed, not sure.


Old wisdom. Here with my coefficients (total sample sizes [not N/seq], exact method for GRM 0.95, 80% power, CV 0.1–1.0).

library(microbenchmark)
a <- c(5.897943, -40.988390, 603.109578, -338.281351, 70.43138)
old.school <- function(a, CV) {
  x <- a[1] + a[2]*CV + a[3]*CV*CV + a[4]*CV*CV*CV + a[5]*CV*CV*CV*CV
  x + (2 - x %% 2)
}
lazy <- function(a, CV) {
  x <- a[1] + a[2]*CV + a[3]*CV^2 + a[4]*CV^3 + a[5]*CV^4
  x + (2 - x %% 2)
}
res <- microbenchmark(old.school(a, CV), lazy(a, CV), times=500L,
                      control=list("random", warmup=10))
boxplot(res, boxwex=0.25, las=1)
options(microbenchmark.unit="us")
print(res)


## perhaps ceil would be better?


I would round up to the next even (as above).

❝ You see, the sample size estimates are sort of almost perfect already. If you want to remove the very few 1's and -1's then just increase the polynomial degree above.


That doesn’t help. With CV <- seq(0.1, 1, 0.01) I got a match in 46/91 and +2 in 45/91. OK, conservative.

Dif-tor heh smusma 🖖🏼 Довге життя Україна! [image]
Helmut Schütz
[image]

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

Complete thread:

UA Flag
Activity
 Admin contact
22,993 posts in 4,828 threads, 1,651 registered users;
148 visitors (0 registered, 148 guests [including 8 identified bots]).
Forum time: 22:35 CEST (Europe/Vienna)

Never never never never use Excel.
Not even for calculation of arithmetic means.    Martin Wolfsegger

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