Auxiliary function for simclbin, computing the number of crossings (type=0) or longest run (type=2) in a sequence of independent normal observations. Crossings and runs are related to whether the observations are above a shift.
clshift(seri, shift = 0, type = 0)
numeric; seri a sequence of random draws
numeric; shift for the observatoobs
numeric; 0 number of crossings, 1 longest run
number of crossings or longest run, numeric