Learn R Programming

smsets (version 2.0.0)

OnewayMANOVA: Tests in One-way MANOVA with extra information

Description

An R function to test the difference of mean vectors among the levels of a single factor with respect to p response variables. Sum of squares and cross-products matrices involved in the MANOVA can be optionally displayed. Test statistics produced are the same as those implemented in summary.manova

Usage

OnewayMANOVA(x, group)

Value

Returns an object of class "OnewayMANOVA", a list containing the following components:

nameA character string describing the function.TThe total sum of squares and cross-product matrix, defined as \(\mathbf{T} = \mathbf{B} + \mathbf{W}\), with \(\mathbf{B}\) and \(\mathbf{W}\) described below.WThe within-sample or residual sum of squares and cross-product matrix.BThe between-sample sum of squares and cross-product matrixx.mnvAn object of class "manova" (and some other classes) produced by function manova, to be passed as argument in summary.OnewayMANOVA in order to produce the approximate F-tests.
groupA character string specifying the name of the factor defining groups.levels.groupA vector showing the levels in factor group.data.nameA character string giving the name of the data.variablesA character string vector containing the variable names.dataThe data frame analyzed.

Arguments

x

A data frame with one factor and p response variables.

group

Factor defining groups. It must be one of the columns in x.

Author

Jorge Navarro Alberto, ganava4@gmail.com

Details

This function is a simplified version of manova, focusing in multivariate analysis of variance for one single factor with respect to p responses. The print method in OnewayMANOVA is similar to that in summary.manova, producing the same approximate F tests in the one-way MANOVA. A simplified printout of the sums of squares and product matrices involved in the analysis can optionally be chosen.

References

Manly, B.F.J., Navarro Alberto, J.A. and Gerow, K. (2024) Multivariate Statistical Methods. A Primer. 5th Edn. Chapman and Hall/CRC.

Examples

Run this code
data(skulls)
res.MANOVA <- OnewayMANOVA(skulls, group = Period)
# Brief output
res.MANOVA

Run the code above in your browser using DataLab