Description Details Author(s) References See Also Examples
Performs a permutation test on the difference between two location parameters, a permutation correlation test, a permutation F-test, the Siegel-Tukey test, a ratio mean deviance test. Also performs some graphing techniques, such as for confidence intervals, vector addition, and Fourier analysis; and includes functions related to the Laplace (double exponential) and triangular distributions. Performs power calculations for the binomial test.
(I) Permutation tests
perm.cor.test
performs a permutation test based on Pearson and Spearman correlations.
perm.f.test
performs a permutation F-test and a one-way analysis of variance F-test.
perm.test
performs one-sample and two-sample permutation tests on vectors of data.
rmd.test
performs a permutation test based on the estimated RMD,
the ratio of the mean of the absolute value of the deviances, using two datasets.
siegel.test
performs the Siegel-Tukey test using two datasets.
(II) Confidence intervals
CI.t.test
produces two-sided confidence intervals on population mean,
allowing for a finite population correction.
quantileCI
produces exact confidence intervals on quantiles corresponding
to the stated probabilities, based on the binomial test.
(III) Graphs
coin.toss
illustrates the Law of Large Numbers for proportions.
fourier
determines the Fourier approximation for any function on domain (0, 2π)
and then graphs both the function and the approximation.
lineGraph
constructs a line graph on a vector of numerical observations.
plotCI
plots multiple confidence intervals on the same graph,
and determines the proportion of confidence intervals containing
the true population mean.
plotEcdf
graphs one or two empirical cumulative distribution functions on the same plot.
plotVector
plots one or two 2-dimensional vectors along with their vector sum.
truncHist
produces a truncated histogram, which may be useful if data contain
some extreme outliers.
(IV) Laplace (double exponential) and symmetric triangular distributions
dlaplace
, plaplace
, qlaplace
, and rlaplace
give the density, the distribution function, the quantile function, and random deviates, respectively,
of the Laplace distribution.
dtriang
, ptriang
, qtriang
, and rtriang
give the density, the distribution function, the quantile function, and random deviates, respectively,
of the triangular distribution.
(V) Reading datasets
read.table2
reads table of data from author's website.
scan2
scans data from author's website.
(VI) Additional functions
abbreviation
determines if one character variable is an abbreviation among a
selection of other character variables.
latin
generates a Latin square.
power.binom.test
computes the power of the binomial test of a simple null hypothesis
about a population median.
score
generates van der Waerden scores (i.e., normal quantiles) and exponential
(similar to Savage) scores.
Steven T. Garren, James Madison University, Harrisonburg, Virginia, USA
Higgins, J. J. (2004) Introduction to Modern Nonparametric Statistics.
R-package coin
for additional permutation tests,
and R-package fastGraph
.
1 2 3 4 5 6 7 8 9 | print( x <- rtriang(20,50) )
perm.test( x, mu=25, stat=median )
quantileCI( x, c(0.25, 0.5, 0.75) )
power.binom.test( 20, 0.05, "less", 47, plaplace, 45.2, 3.7 )
fourier (function(x){ (x-pi)^3 }, 4 )
|
[1] 16.331527 11.073387 33.669940 43.412116 30.667683 44.094618 26.317435
[8] 26.208683 27.969395 13.543866 39.246650 4.471731 25.494942 24.359593
[15] 33.829072 11.887257 39.855904 27.766518 21.204405 32.210546
[[1]]
[1] "One-sample permutation test was performed."
[[2]]
[1] "p-value was estimated based on 20000 simulations."
$alternative
[1] "two.sided"
$mu
[1] 25
$p.value
[1] 0.36035
lower upper
0.25 11.07339 26.31744
0.5 21.20441 33.66994
0.75 27.76652 43.41212
[1] 0.6119434
$constant
[1] 0
$cosine.coefficients
[1] 0 0 0 0
$sine.coefficients
[1] -7.739209 -8.369604 -6.135292 -4.747302
$approximation
[1] "g(x) = - 7.74 sin x - 8.37 sin 2x - 6.14 sin 3x - 4.75 sin 4x"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.