Dancing with the dice [Regulatives / Guidelines]

posted by d_labes  – Berlin, Germany, 2012-06-18 17:38 (4747 d 18:00 ago) – Posting: # 8774
Views: 13,458

Hi Mon Captain, dear Helmut,

❝ ❝ while (sum(x) != 0) x <- sign(rnorm(size))


❝ ... It completely permutes equal numbers of TR and RT (or -1's and 1's).


Not really. It rolls the 'binary dice' 24 times again and again until the vector of +1's and -1's has the same number of both entries (is 'balanced').

Thus while being programmed along an "incredibly elegant way of achieving a lot with minimum coding" not so very effective concerning computational time if one considers what is intended (have seen more than 20 loop passes in a short experimentation).

Regards,

Detlew

Complete thread:

UA Flag
Activity
 Admin contact
23,424 posts in 4,927 threads, 1,671 registered users;
25 visitors (0 registered, 25 guests [including 16 identified bots]).
Forum time: 11:38 CEST (Europe/Vienna)

Truth and clarity are complementary.    Niels Bohr

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