| krandtest {ade4} | R Documentation |
Plot and print many permutation tests. Objects of class 'krandtest' are lists.
## S3 method for class 'krandtest': plot(x, mfrow = NULL, nclass = NULL, main.title = x$names, ...) ## S3 method for class 'krandtest': print(x, ...) as.krandtest(sim, obs, alter="greater", call = match.call(),names=colnames(sim))
x |
: an object of class 'krandtest' |
mfrow |
: a vector of the form 'c(nr,nc)', otherwise computed by as special own function n2mfrow |
nclass |
: a number of intervals for the histogram |
main.title |
: a string of character for the main title |
... |
: further arguments passed to or from other methods |
sim |
a matrix or data.frame of simulated values (repetitions as rows, number of tests as columns |
obs |
a numeric vector of observed values for each test |
alter |
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. |
call |
a call order |
names |
a vector of names for tests |
plot.krandtest draws the p simulated values histograms and the position of the observed value.
Daniel Chessel and Stephane Dray dray@biomserv.univ-lyon1.fr
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)
> library(ade4)
> ### Name: krandtest
> ### Title: Class of the Permutation Tests (in C).
> ### Aliases: krandtest plot.krandtest print.krandtest as.krandtest
> ### Keywords: methods
>
> ### ** Examples
>
> wkrandtest <- as.krandtest(obs=c(0,1.2,2.4,3.4,5.4,20.4),sim=matrix(rnorm(6*200),200,6))
> wkrandtest
class: krandtest
Monte-Carlo tests
Call: as.krandtest(sim = matrix(rnorm(6 * 200), 200, 6), obs = c(0,
1.2, 2.4, 3.4, 5.4, 20.4))
Test number: 6
Permutation number: 200
Test Obs Std.Obs Alter Pvalue
1 test1 0.0 -0.02834009 greater 0.512437811
2 test2 1.2 1.18574569 greater 0.134328358
3 test3 2.4 2.66054714 greater 0.004975124
4 test4 3.4 3.59881829 greater 0.004975124
5 test5 5.4 5.90588303 greater 0.004975124
6 test6 20.4 20.17169340 greater 0.004975124
other elements: NULL
> plot(wkrandtest)

> > > >