Description Usage Arguments Details Value Author(s) References See Also Examples
Generalized bootstrap (permutation) test.
1 | genboot.test(nullvec, x, alternative="greater", method="normal", ...)
|
nullvec |
A vector of statistics sampled under the null hypothesis by either bootstrap or permutation. |
x |
The original statistic(s) to be compared with the resampling generated null distribution. |
alternative |
Valid alternatives: greater, less, two.sided. Default to "greater", i.e., x is "significantly greater than the null distribution." I decide to use "greater" as the default option because in my study, most summary statistics are functional norms which warrant one sided test. |
method |
Smoothing method used by the generalized bootstrap p-value estimation. Valid methods: gld (genral lambda distribution), sn (skew-normal), normal, and null (the usual nonparametric estimate). |
... |
other optional parameters passed to |
This function takes one (or a vector of) original statistic x
and a
vector of the same statistic calculated under the null hypothesis by
resampling method (nullvec
) to produce a p-value. When
method="null"
, it uses the common nonparametric estimate, i.e.,
just compute the proportion of members of nullvec
greater or
equal to x
. When method is "gld", "sn", or "normal", the null
vector is used to fit a general lambda distribution (with four
parameters), a skew-normal distribution (three parameters), or a
normal distribution (two parameters); p-value is then computed from
this estimated distribution.
An estimated p-value or a vector of such p-values.
Xing Qiu
[Chernick 1992 book, 6.2.2.], [Dudewicz, 1992], and a reference to the sn package.
1 2 3 4 5 6 7 8 9 10 11 12 | nv <- sort(round(rnorm(200),2))
## These two are very fast
genboot.test(nv, 1:3, method="null")
genboot.test(nv, 1:3, method="normal")
## The following commands require loading the sn and gld packages.
library(sn)
library(gld)
genboot.test(nv, 1:3, method="sn")
## This is quite slow. It take about 10 seconds to run on my PC (4x 2.33GHz), YMMV.
## Not run: genboot.test(nv, 1:3, method="gld")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.