R/RayleighTest.R

RayleighTest <- function (azimuths) 
{
    n = length(azimuths)
    m_module = MeanModule(azimuths)
    z = n * (m_module^2)
    p = exp(-z)
    if (round(p, 3) == 0) {
        print(paste("Rayleigh Test: P-value for the hypothesis of uniformity < 0.001"))
    }
    else {
        print(paste("Rayleigh Test: P-value for the hypothesis of uniformity =", 
            round(p, 3)))
    }
}

Try the VecStatGraphs2D package in your browser

Any scripts or data that you put into this service are public.

VecStatGraphs2D documentation built on May 2, 2019, 12:36 p.m.