| Type: | Package |
| Title: | Rank-Based Tests for Multivariate Data in Nonparametric Factorial Designs |
| Version: | 0.1.1 |
| Date: | 2026-09-01 |
| Maintainer: | Sarah Friedrich <sarah.friedrich@math.uni-augsburg.de> |
| Depends: | R (≥ 4.5.0) |
| Description: | Implemented are an ANOVA-type test statistic for testing hypotheses formulated in Mann-Whitney-type effects in nonparametric factorial designs. Statistical inference is based on a wild or a sample-specific bootstrap approach as described in 'Dobler et al. (2019) <doi:10.1007/s10463-019-00717-3>'. The unweighted treatment effects considered do not depend on sample sizes and allow for transitive ordering. The package thus provides an extension of the univariate 'rankFD' package to multivariate data. |
| License: | GPL-2 | GPL-3 |
| Imports: | MASS (≥ 7.3-43), parallel, methods, multcomp |
| LazyData: | TRUE |
| Suggests: | knitr, rmarkdown, GFD |
| Encoding: | UTF-8 |
| RoxygenNote: | 7.3.3 |
| VignetteBuilder: | knitr, rmarkdown |
| URL: | https://github.com/smn74/rankMANOVA |
| BugReports: | https://github.com/smn74/rankMANOVA/issues |
| NeedsCompilation: | no |
| Packaged: | 2026-09-01 13:50:04 UTC; sfriedrich |
| Author: | Sarah Friedrich [aut, cre], Dennis Dobler [aut], Markus Pauly [aut] |
| Repository: | CRAN |
| Date/Publication: | 2026-09-12 08:30:02 UTC |
Marketing Data
Description
A dataset containing information on the annual household income along with 13 other demographic factors of shopping mall customers in the San Francisco Bay Area.
Usage
data(marketing)
Format
A data frame with 8993 rows and 14 variables:
- Income
ANNUAL INCOME OF HOUSEHOLD (PERSONAL INCOME IF SINGLE)
- Sex
Sex, 1= male, 2 = female
- Marital
Marital status
- Age
Age (categorized)
- Edu
Education: 1. Grade 8 or less 2. Grades 9 to 11 3. Graduated high school 4. 1 to 3 years of college 5. College graduate 6. Grad Study
- Occupation
Occupation
- HowLong
HOW LONG HAVE YOU LIVED IN THE SAN FRAN./OAKLAND/SAN JOSE AREA?
- Dual
DUAL INCOMES (IF MARRIED)
- Persons
PERSONS IN YOUR HOUSEHOLD
- Persons<18
PERSONS IN HOUSEHOLD UNDER 18
- Status
HOUSEHOLDER STATUS
- Type
TYPE OF HOME
- Ethnic
ETHNIC CLASSIFICATION
- Language
WHAT LANGUAGE IS SPOKEN MOST OFTEN IN YOUR HOME? 1. English 2. Spanish 3. Other
Source
Impact Resources, Inc., Columbus, OH (1987). Dataset available from https://hastie.su.domains/ElemStatLearn/data.html, formerly part of the ElemStatLearn package.
Pairwise post-hoc comparisons in nonparametric multivariate factorial designs
Description
Pairwise post-hoc comparisons in nonparametric multivariate factorial designs
Usage
pairwise(object, type = NULL, base = 1, factor = NULL, uni = FALSE, ...)
Arguments
object |
A |
type |
The type of the pairwise comparison must be specified here. Calculation is based on the contrMat function in package multcomp, see the corresponding help page for details on the types of contrasts available. |
base |
An integer specifying which group is considered the baseline group
for Dunnett contrasts, see |
factor |
If desired, the specific factor for which the calculations shall be computed. Defaults to all factors present in the model (without interactions, though). |
uni |
Logical: should univariate comparisons also be computed? Default is FALSE. |
... |
Not used yet. |
Details
The pairwise function computes p-values for pairwise comparisons as provided by
contrMat. For the nonparametric comparisons,
only Tukey's all-pairwise and Dunnett's many-to-one comparisons are used.
Note that due to the formulation of our effect size vectors, these tests can be performed by applying
the closed testing principle, i.e., no alpha-correction is needed, see Dobler, Friedrich and Pauly (2019)
for details.
NOTE: If an interaction is significant in the main model, the data set should be split accordingly for the post-hoc analyses. Thus, the pairwise comparisons are not computed for interaction effects.
Value
p-values for the multivariate and (if desired) univariate pairwise comparisons of the chosen factor.
References
Dobler, D., Friedrich, S., and Pauly, M. (2019). Nonparametric MANOVA in meaningful effects. Annals of the Institute of Statistical Mathematics.
See Also
Display rankMANOVA object
Description
Returns a short summary of the results (test statistic with p-values)
Usage
## S3 method for class 'rankMANOVA'
print(x, ...)
Arguments
x |
A rankMANOVA object |
... |
Additional parameters (currently not used) |
Value
No return value, print()-function
Rank-based Tests for Multivariate Data in Nonparametric Factorial Designs
Description
The rankMANOVA function calculates an ANOVA-type statistic (ATS) with (wild) bootstrap p-values for nonparametric factorial designs with multivariate data.
Usage
rankMANOVA(
formula,
data,
iter = 10000,
alpha = 0.05,
para = FALSE,
CPU,
dec = 3,
seed = NULL,
resampling = "bootstrap",
nested.levels.unique = FALSE
)
Arguments
formula |
A model |
data |
A data.frame containing the variables in
|
iter |
The number of iterations used for calculating the resampled statistic. The default option is 10,000. |
alpha |
A number specifying the significance level; the default is 0.05. |
para |
Logical: should parallel computing be used? Default is FALSE. |
CPU |
The number of cores used for parallel computing. If omitted, cores are
detected via |
dec |
Number of decimals the results should be rounded to. Default is 3. |
seed |
A random seed for the resampling procedure. If omitted, no reproducible seed is set. |
resampling |
The resampling method to be used, one of "bootstrap" (sample-specific bootstrap approach) and "WildBS" (wild bootstrap approach with Rademacher weights). The default is "WildBS". |
nested.levels.unique |
A logical specifying whether the levels of the nested factor(s) are labeled uniquely or not. Default is FALSE, i.e., the levels of the nested factor are the same for each level of the main factor. For an example and more explanations see the GFD package and the corresponding vignette. |
Details
Implemented is an ANOVA-type test statistic for testing hypotheses formulated in Mann-Whitney-type
effects in nonparametric factorial designs. Statistical inference is based on a wild or a sample-specific
bootstrap approach. The unweighted treatment effects considered do not depend on sample sizes and allow for
transitive ordering. The package thus provides an extension of the univariate rankFD
package to multivariate data.
Value
A rankMANOVA object containing the following components:
Descriptive |
Some descriptive statistics of the data for all factor level combinations. Displayed are the number of individuals per factor level combination and the unweighted treatment effects for each dimension. |
Test |
The test statistic(s) and p-value(s) based on the chosen bootstrap approach. |
NOTE
The number of bootstrap iterations has been set to 100 in the examples due to runtime restrictions on CRAN. Usually it is recommended to use at least 1000 iterations.
References
Dobler, D., Friedrich, S., and Pauly, M. (2017). Nonparametric MANOVA in Mann-Whitney effects.
See Also
Examples
data("marketing")
mymar <- marketing[, c("Sex", "Income", "Edu")]
mymar2 <- na.omit(mymar)
test <- rankMANOVA(cbind(Income, Edu) ~ Sex, data = mymar2, iter=100,
resampling = "WildBS", CPU = 1)
summary(test)
Summarizing a rankMANOVA object
Description
Returns a summary of the results including sample sizes and unweighted treatment effects for all groups as well as the test statistic with resampling-based p-values
Usage
## S3 method for class 'rankMANOVA'
summary(object, ...)
Arguments
object |
A rankMANOVA object |
... |
Additional parameters (currently not used) |
Value
No return value, summary()-function
Univariate post-hoc comparisons in nonparametric multivariate factorial designs
Description
Univariate post-hoc comparisons in nonparametric multivariate factorial designs
Usage
univariate(object, factor = NULL, data, ...)
Arguments
object |
A |
factor |
The factor for which univariate comparisons are desired. Must be one of the factors used in the main analysis, of course. Defaults to all factors in the model (without interactions). |
data |
The data set to be used for the analysis. If none is specified, the data used for fitting
|
... |
Not used yet. |
Details
The univariate function computes p-values for univariate comparisons. If no factor is specified, all factors in the model are used. In this case, the unweighted effects don't change compared to the multivariate model and are thus not returned, only p-values and test statistics for the univariate tests. Details on the tests can be found in Dobler, Friedrich and Pauly (2019). Note that due to the formulation of our effect size vectors, these tests can be performed by applying the closed testing principle, i.e., no alpha-correction is needed.
NOTE: If an interaction is significant in the main model, the data set should be split accordingly for the post-hoc analyses. Thus, the univariate comparisons are not computed for interaction effects.
Value
p-values for the univariate post-hoc comparisons of the chosen factor.
References
Dobler, D., Friedrich, S., and Pauly, M. (2019). Nonparametric MANOVA in meaningful effects. Annals of the Institute of Statistical Mathematics.