View source: R/randtest.dist.R
randtest.dist | R Documentation |
Measures the distance between the observed statistic from a "randtest"
object and some specific quantile of the simulated data.
## S3 method for class 'dist' randtest(randtest, quantile = c(0.025, 0.975), abs = FALSE)
randtest |
an object of class |
quantile |
a |
abs |
|
To compare the observed value to the simulated median value, you can use quantile = 0.5
.
Also note that when using abs = FALSE
(default), a negative value means that the observed statistic is within the request quantiles.
Thomas Guillerme
randtest
randtest.dispRity
## Simple example dummy_matrix <- matrix(rnorm(500), 100, 5) ## Testing whether the mean of a random subset ## is different than the means of 100 subsets dummy_test <- randtest.dispRity(dummy_matrix, subset = sample(1:100, 20), metric = mean) dummy_test ; plot(dummy_test) ## The distance between the observed data and the 95% quantile randtest.dist(dummy_test) ## The absolute distance from the median randtest.dist(dummy_test, quantile = 0.5, abs = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.