Learn R Programming

npmv (version 2.4.0)

nonpartest: Nonparametric Comparison of Multivariate Samples

Description

Performs analysis of one-way multivariate data using nonparametric techniques developed since 2008. Allows for small samples and ordinal variables, or even mixture of the different variable types ordinal, quantitative, binary. Using F-approximations for ANOVA Type, Wilks' Lambda Type, Lawley Hotelling Type, and Bartlett Nanda Pillai Type test statics, as well as a permutation test for each, the package compares the multivariate distributions of the different samples. Also computes nonparametric relative effects.

Usage

nonpartest(formula,data,permtest=TRUE,permreps=10000,plots=TRUE, tests=c(1,1,1,1),releffects=TRUE,...)

Arguments

formula
an object of class "formula", with a single explanatory variable and multiple response variables (or one that can be coerced to that class).
data
an object of class "data.frame", containing the variables in the formula.
permtest
logical. If TRUE the p-values for the permutation test are returned
permreps
number of replications in permutation test
plots
logical. If TRUE box plots are produced for each response variable versus treatment
tests
vector of zeros and ones which specifies which test statistics are to be calculated. A 1 corresponds to the test statistics which are to be returned
releffects
logical. If TRUE the relative effects are returned
...
Graphical parameters to be passed to the boxplot function.

Value

Returns a list of 2 data frames if relative effects are turned on, otherwise returns a single data frame. First data frame consist of p-values for test statistics and permutation test (if permutation test is turned on), second data frame consist of relative effects for each response variable.

Warning

The nonparametric methods implemented in the code have been developed for complete data with no missing values. The code automatically produces a warning if there is missing data. Under certain conditions, the matrices H and G are singular (See literature for explanation of H and G), for example when the number of response variables exceeds the sample size. When this happens, only the ANOVA type statistic can be computed. The code automatically produces a warning if H or G are singular.

Details

The nonparametric methods implemented in the code have been developed for complete data with no missing values. The code automatically produces a warning if there is missing data.

References

Arne C. Bathke , Solomon W. Harrar, and Laurence V. Madden. "How to compare small multivariate samples using nonparametric tests," Computational Statistics and Data Analysis 52 (2008) 4951-4965

Brunner E, Domhof S, Langer F (2002), Nonparametric Analysis of Longitudinal Data in Factorial Experiments. Wiley, New York.

Chunxu Liu, Arne C. Bathke, Solomon W. Harrar. "A nonparametric version of Wilks' lambda-Asymptotic results and small sample approximations" Statistics and Probability Letters 81 (2011) 1502-1506

Horst, L.E., Locke, J., Krause, C.R., McMahaon, R.W., Madden, L.V., Hoitink, H.A.J., 2005. Suppression of Botrytis blight of Begonia by Trichoderma hamatum 382 in peat and compost-amended potting mixes. Plant Disease 89, 1195-1200.

Examples

Run this code
data(sberry)
nonpartest(weight|bot|fungi|rating~treatment,sberry,permreps=1000)

Run the code above in your browser using DataLab