clshift: Number of Crossings and Longest Run

View source: R/auxiliary.r

clshiftR Documentation

Number of Crossings and Longest Run

Description

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.

Usage

clshift(seri, shift = 0, type = 0)

Arguments

seri

numeric; seri a sequence of random draws

shift

numeric; shift for the observatoobs

type

numeric; 0 number of crossings, 1 longest run

Value

number of crossings or longest run, numeric


ToreWentzel-Larsen/crossrun documentation built on April 19, 2022, 9:19 a.m.