Skip to contents

Thin extender over randtests::runs.test for a non-parametric test of randomness in a numeric sequence.

Usage

morie_randtests_runs(x, ...)

Arguments

x

A numeric vector.

...

Further arguments forwarded to randtests::runs.test (e.g. alternative, threshold, pvalue, plot).

Value

A list with $method = "randtests::runs.test" and $raw (an htest object).

Examples

if (requireNamespace("randtests", quietly = TRUE)) {
  set.seed(1)
  morie_randtests_runs(rnorm(40))
}
#> $method
#> [1] "runs_test (rmorie native)"
#> 
#> $raw
#> $raw$statistic
#> [1] -0.3203616
#> 
#> $raw$p.value
#> [1] 0.7486942
#> 
#> $raw$runs
#> [1] 20
#> 
#> $raw$n1
#> [1] 20
#> 
#> $raw$n2
#> [1] 20
#> 
#> $raw$method
#> [1] "Runs Test (rmorie native)"
#> 
#>