npExact-package: Nonparametric hypothesis tests

Description Details Author(s) References See Also Examples

Description

npExact provides distribution-free hypothesis tests.

Details

This package contains several new hypothesis tests, which do not require that the user makes assumptions on the underlying distributions.

However, all tests except npStochin can only be applied if there are exogenously given bounds known to the user before gathering the data such that it is known by definition of the underlying process that all observations lie within these bounds.

So for instance, if the data involves percentages then the lower bound is 0 and the upper bound is 100, by definition of the data and not something (like normality) that cannot be deduced from the properties of the data.

Author(s)

Karl Schlag, Oliver Reiter, Peter Saffert, Christian Pechhacker, Simona Jokubauskaite, Tautvilas Janusauskas

References

Karl Schlag, A New Method for Constructing Exact Tests without Making any Assumptions (August, 2008) Department of Economics and Business Working Paper 1109, Universitat Pompeu Fabra

See Also

http://homepage.univie.ac.at/karl.schlag/research/statistics/exacthypothesistesting8.pdf

https://homepage.univie.ac.at/karl.schlag/statistics.php

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
## npMeanPaired
## test whether pain after the surgery is less than before the surgery
data(pain)
npMeanPaired(pain$before, pain$after, lower = 0, upper = 100)

## npMeanSingle
## test whether Americans gave more than 5 dollars in a round of
## the Ultimatum game
data(bargaining)
us_offers <- bargaining$US
npMeanSingle(us_offers, mu = 5, lower = 0, upper = 10, alternative =
"greater", ignoreNA = TRUE) ## no rejection

## npMeanUnpaired
## test whether countries with french origin score lower than
## countries with no french origin
data(french)
origin <- french$french.origin
rest <- french$rest.of.civil
npMeanUnpaired(origin, rest, alternative = "less", ignoreNA = TRUE)

## npStochin
npStochinUnpaired(origin, rest, ignoreNA = TRUE)

## npVarianceSingle
## see if the minority share holder shores have a variance greater
## than 0.05
data(mshscores)
scores <- unlist(mshscores)
npVarianceSingle(scores, lower = 0, upper = 1, v = 0.05, ignoreNA = TRUE)

npExact documentation built on May 2, 2019, 9:58 a.m.