Combinatorics [Bioanalytics]

posted by ElMaestro  – Denmark, 2014-08-18 01:17 (3934 d 05:34 ago) – Posting: # 13399
Views: 10,206

Hi Helmut,

❝ ❝ In a BE study involving 26 subjects […] the last 6 subjects had many points above ULOQ.


Yes, that sounds fishy, I overlooked it.

❝ Sometimes concentrations in a few subjects are higher than anticipated, but this should occur at random. Why in the last six subjects? What makes them so special? If I would be an inspector that would ring my alarm bell. I would ask R how likely the observed pattern could occur by pure chance (the code takes a good while to complete; be patient – 28 minutes on my machine):

set.seed(123456)

❝ n   <- 1e8                      # no. of simulations; at least 1 mio needed

❝ x   <- c(rep(0, 20), rep(1, 6)) # 20 "normal" subjects and 6 ">ULOQ"

❝ obs <- 0                        # counter for the "last 6" pattern

❝ for(j in 1:n) { if(sum(tail(sample(x), 6)) == 6) obs <- obs + 1 }

❝ cat("p =", signif(obs/n, 4), "\n")


❝ IMHO p = 4.49·10–6 should trigger an internal investigation.


Your brain must have had too much carbon monoxide recently :-D:smoke:
Consider your resampled vector of zeros and ones - each of them have equal probability, including the one that ends with six ones in a row. So:
1. Your code will converge towards the same value as any other resampled x-vector. Means: If you had observed the need for dilution in e.g. subjects 4, 7, 13, 14, 19 and 25 (or whatever one would subjectively consider 'more random') your code would converge to the same probability.
2. That probability is 6!/(26!/(20!)).
You have 6 1's that you wish to place in your vector. The first 1 has 26 places in can go into, the second 1 has 25 it can go into, and so forth. That's how we get the denominator. In the numerator we have 6*5*4*3*2*1 ways to permute the 6 1's. They just all look the same.

Pass or fail!
ElMaestro

Complete thread:

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

Far better an approximate answer to the right question,
which is often vague, than an exact answer to the wrong question,
which can always be made precise.    John W. Tukey

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