ptest | R Documentation |
Execute a one-sample permutation test on two numeric vectors. One vector is kept constant while the other is "shuffled" by resampling. This approximates the null hypothesis — that there is no dependency or difference between the variables.
ptest(
x,
y,
FUN,
rk = FALSE,
alternative = c("greater", "less", "two.sided"),
num.s = 250
)
x |
[ |
y |
[ |
FUN |
[ |
rk |
[ |
alternative |
[ |
num.s |
[ |
[numeric(1)
]
The p.value statistic.
x <- iris[[1]]
y <- iris[[2]]
ptest(x, y, FUN = function(x, y) cor(x, y), alternative = "t")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.