genboot.test: Generalized bootstrap (permutation) test.

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Generalized bootstrap (permutation) test.

Usage

1
genboot.test(nullvec, x, alternative="greater", method="normal", ...)

Arguments

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 starship() or sn.em(), which are the parameter estimating function for general lambda distribution and skew-normal distribution, resp.

Details

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.

Value

An estimated p-value or a vector of such p-values.

Author(s)

Xing Qiu

References

[Chernick 1992 book, 6.2.2.], [Dudewicz, 1992], and a reference to the sn package.

See Also

starship, sn.em

Examples

 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")

ygu427/iSPREADR documentation built on May 20, 2019, 4:37 p.m.