randomization: runs test [Regulatives / Guidelines]

posted by Helmut Homepage – Vienna, Austria, 2012-06-16 16:42 (4749 d 21:58 ago) – Posting: # 8756
Views: 13,256

Hi ElMaestro!

❝ I don't think I would use a runs test prior to releasing a randomisation scheme. This screws the principle of randomness; even random sequences will have a significant runs test occasionally and still be 'random' whatever that words means.


OK, but see my A1 above.

❝ ElMaestro's approach: […]



Nice; especially your remarks about NLYWs. Concerning your #3:
require(tseries)
set.seed(16062012)
size      <- 24
sims      <- 1e6
nonrandom <- 0
for (i in 1:sims) {
  x <- 1
  while (sum(x) != 0) x <- sign(rnorm(size))
  x[x ==  1] <- "RT"
  x[x == -1] <- "TR"
  x   <- as.factor(x)
  rt  <- runs.test(x)
  sig <- rt$p.value
  if (sig < 0.05) nonrandom <- nonrandom + 1
}
cat(paste("‘nonrandom’ runs: ", format(100*nonrandom/sims, digits = 4), "%\n"))


Gave 5.895% on your matey’s machine. Don’t know whether 20+ years after the deficiency letter mentioned above inspectors would still react similarly.

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
23,424 posts in 4,927 threads, 1,671 registered users;
21 visitors (0 registered, 21 guests [including 9 identified bots]).
Forum time: 14:41 CEST (Europe/Vienna)

Truth and clarity are complementary.    Niels Bohr

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