perm.oneway.anova {wPerm}R Documentation

Permutation One-Way ANOVA Test

Description

Performs a permutation (randomization) test for location, using trimmed data (trim = 0 gives untrimmed data) on several independent samples.

Usage

perm.oneway.anova(x, y, trim = 0, ford = NULL, R = 9999)

Arguments

x

a (non-empty) vector of observations of the (response) variable.

y

a vector of the corresponding populations (levels of the factor).

trim

the fraction (0 to 0.5) of observations to be trimmed from each sample; default is 0.

ford

an optional integer vector giving the change from alphabetical order of the populations to some other desired order.

R

number of replications (default = 9999).

Details

The null hypothesis is that the distributions of the variable are identical on all the populations. The alternative hypothesis is that the distributions of the variable have systematically larger values on some of the populations than on others.

Value

A list with class "perm.oneway.anova" containing the following components:

Perm.values

the values of the test statistic obtained from the permutations.

Header

the main title for the output.

Response

the name of the (response) variable.

Factor

the name of the factor.

Levels

the populations (levels of the factor).

n

the sample sizes.

Mean

the sample means.

SD

the sample standard deviations.

Statistic

the test statistic; here, always F.trim.

Observed

the observed value of the test statistic.

P.value

the P-value or a statement like P < 0.001.

p.value

the P-value.

Trim

the trim value.

Author(s)

Neil A. Weiss

Examples

# Last year's energy consumptions, to the nearest 10 million BTU, for
# independent random samples of households in the four U.S. regions.
data("energy")
str(energy)
attach(energy)

# Permutation one-way ANOVA to decide whether the energy distributions
# have systematically larger values in some U.S. regions than in others.
# Regions ordered to Northeast, Midwest, South, and West; 999 replications.
perm.oneway.anova(ENERGY, REGION, ford = c(2,1,3,4), R = 999)

detach(energy)  # clean up

[Package wPerm version 1.0.1 Index]