| pVal {swfscMisc} | R Documentation |
Calculate the p-value for a permutation test.
pVal(obs, null.dist)
obs |
observed value. |
null.dist |
vector of values from permutation null distribution. |
Eric Archer eric.archer@noaa.gov
null.dist <- rnorm(1000) obs <- rnorm(1, mean = 1) plot(density(null.dist), xlim = range(c(obs, null.dist)), main = "") abline(v = obs) print(obs) pVal(obs, null.dist)