Description Usage Arguments Details Value See Also Examples
randtest is a generic function. It proposes methods for the following objects between
, discrimin
, coinertia
...
1 2 3 4 5 6 |
xtest |
an object used to select a method |
x |
an object of class |
... |
|
nclass |
a number of intervals for the histogram |
coeff |
to fit the magnitude of the graph |
sim |
a numeric vector of simulated values |
obs |
a numeric vector of an observed value |
alter |
a character string specifying the alternative hypothesis, must be one of "greater" (default), "less" or "two-sided" |
call |
a call order |
If the alternative hypothesis is "greater", a p-value is estimated as: (number of random values equal to or greater than the observed one + 1)/(number of permutations + 1). The null hypothesis is rejected if the p-value is less than the significance level. If the alternative hypothesis is "less", a p-value is estimated as: (number of random values equal to or less than the observed one + 1)/(number of permutations + 1). Again, the null hypothesis is rejected if the p-value is less than the significance level. Lastly, if the alternative hypothesis is "two-sided", the estimation of the p-value is equivalent to the one used for "greater" except that random and observed values are firstly centered (using the average of random values) and secondly transformed to their absolute values. Note that this is only suitable for symmetric random distribution.
as.randtest
returns a list of class randtest
plot.randtest
draws the simulated values histograms and the position of the observed value
mantel.randtest, procuste.randtest, rtest
1 2 3 4 5 6 7 |
Monte-Carlo test
Call: as.randtest(sim = rnorm(200), obs = x0)
Observation: 2.4
Based on 200 replicates
Simulated p-value: 0.004975124
Alternative hypothesis: greater
Std.Obs Expectation Variance
2.53861548 0.01273608 0.88431506
Monte-Carlo test
Call: as.randtest(sim = rnorm(200), obs = x0)
Observation: 3.4
Based on 200 replicates
Simulated p-value: 0.004975124
Alternative hypothesis: greater
Std.Obs Expectation Variance
3.32885390 0.02422058 1.02839191
Monte-Carlo test
Call: as.randtest(sim = rnorm(200), obs = x0)
Observation: 5.4
Based on 200 replicates
Simulated p-value: 0.004975124
Alternative hypothesis: greater
Std.Obs Expectation Variance
6.01536602 -0.04563553 0.81954541
Monte-Carlo test
Call: as.randtest(sim = rnorm(200), obs = x0)
Observation: 20.4
Based on 200 replicates
Simulated p-value: 0.004975124
Alternative hypothesis: greater
Std.Obs Expectation Variance
18.51190736 -0.07774199 1.22366291
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.