Computes the two-sided p value for the null hypothesis, where the null hypothesis is that the slope is zero. It is based on the binomial distribution. Note that the result does not depend on the magnitude of the individual slope values only depends on the number of positive slopes and number of negative slopes.
Examples
s <- c(-1.0, 0, 0.5, 0.55, 3.0)
pValue <- pVal(s)