Plot, print and extract permutation tests. Objects of class 'krandtest'
are lists.
as.krandtest(sim, obs, alter = "greater", call = match.call(),
names = colnames(sim), p.adjust.method = "none", output = c("light", "full"))# S3 method for krandtest
plot(x, mfrow = NULL, nclass = 10, main.title = x$names, ...)
# S3 method for krandtest
print(x, ...)
# S3 method for krandtest
[(x, i)
# S3 method for krandtest
[[(x, i)
plot.krandtest
draws the p simulated values histograms and the position of the observed value.
[.krandtest
returns a krandtest
object and
[[.krandtest
returns a randtest
object.
a matrix or data.frame of simulated values (repetitions as rows, number of tests as columns
a numeric vector of observed values for each test
a vector of character specifying the alternative hypothesis for each test. Each element must be one of "greater" (default), "less" or "two-sided". The length must be equal to the length of the vector obs, values are recycled if shorter.
a call order
a vector of names for tests
a string indicating a method for multiple adjustment, see p.adjust.methods
for possible choices.
a character string specifying if all simulations should be stored ("full"
). This was the default until ade4
1.7-5.
Now, by default ("light"
), only the distribution of simulated values is stored in element plot
as produced by the hist
function.
an object of class 'krandtest'
a vector of the form 'c(nr,nc)', otherwise computed by as special own function n2mfrow
a number of intervals for the histogram. Ignored if object output is "light"
a string of character for the main title
further arguments passed to or from other methods
numeric indices specifying elements to extract
Daniel Chessel and Stéphane Dray stephane.dray@univ-lyon1.fr
randtest
wkrandtest <- as.krandtest(obs = c(0, 1.2, 2.4, 3.4, 5.4, 20.4),
sim = matrix(rnorm(6*200), 200, 6))
wkrandtest
plot(wkrandtest)
wkrandtest[c(1, 4, 6)]
wkrandtest[[1]]
Run the code above in your browser using DataLab