PermutationDistribution {coin} | R Documentation |
Density, distribution, quantile and support of permutation distributions of conditional independence tests.
dperm(object, x, ...) pperm(object, q, ...) qperm(object, p, ...) support(object, ...)
object |
an object inheriting from class
|
x |
vector of a standardized statistics. |
q |
vector of a standardized statistics. |
p |
vector of probabilities. |
... |
further arguments to be passed to methods. |
density function of a permutation distribution.
distribution function of a permutation distribution.
quantile function for a permutation distribution.
the support of a permutation distribution.
### artificial 2-sample problem df <- data.frame(y = rnorm(20), x = gl(2, 10)) ### Ansari-Bradley test at <- ansari_test(y ~ x, data = df, distribution = "exact") ### density of the exact distribution of the Ansari-Bradley statistic dens <- sapply(support(at), dperm, object = at) ### plot density plot(support(at), dens, type = "s") ### 95% quantile qperm(at, 0.95) ### one-sided p-value pperm(at, statistic(at))