Learn R Programming

MVTests (version 1.1)

Manova: One Way Multivariate Analysis of Variance (MANOVA)

Description

Manova function computes one-way MANOVA test and gives confidence intervals

Usage

Manova(data, group, method = "Wilks", CI = "FALSE", alpha = 0.05,
  Homogeneity = TRUE)

Arguments

data

a data frame.

group

a group vector

method

The method that will be used for MANOVA. These methods are "Wilks", "Roy" and "Hotelling-Lawley". default method="Wilks".

CI

a logical argument. If CI="TRUE", then the decision matrices based on confidence intervals obtained for all variables and groups are calculated. CI values are calculated only in Roy method. default CI=FALSE.

alpha

Significance Level that will be used for confidence intervals. default alpha=0.05

Homogeneity

a logical argument. If Homogeneity=TRUE, then classical MANOVA methods which are under the assumption that covariance matrices of groups are homogeneity are used. Otherwise, the MANOVA approach (James, 1954) without homogeneous covariance matrices assumption is used. Default Homogeneity=TRUE. The homogeneity test for covariance matrices is performed BoxM function.

Value

a list with 9 elements:

Method

The method used for MANOVA

Test.Stat

The value of the test statistic for the selected method

App.Stat

The approximate value of F or Chi-Squared statistic. The Manova function uses F statistic when the covariance matrices are homogeneity; otherwise, it uses Chi-squared Statistic.

df

The F or Chi-Squared statistic's degree of freedom

p.value

p value

Decision.Matrices

When method="Roy" and CI="TRUE", it gives the decision matrices based on confidence intervals obtained for all variables and groups. If between groups decision is TRUE for any variable, it means that the mean vectors of these groups are statistically different. When the covariance matrices are not homogeneity, confidence intervals are not calculated.

alpha

The alpha value using in confidence intervals

Descriptive

Descriptive Statistics for all groups

Homogeneity

It gives the result of the assumption that covariance matrices are homogeneity.

Details

This function computes the MANOVA test for more than two independent samples with and without the assumption that covariance matrices are homogeneity. The hypotheses are H0:Mu_1=Mu_2=...=Mu_g and H1:At least a Mu_j is different from others (j=1,2,...,g). When H0 is rejected, this function computes confidence intervals for all variables to determine variable(s) affecting on rejection decision.

References

Rencher, A. C. (2003). Methods of multivariate analysis (Vol. 492). John Wiley & Sons.

Tatlidil, H. (1996). Uygulamali Cok Degiskenli Istatistiksel Yontemler. Cem Web.

James, G. S. (1954). Tests of linear hypotheses in univariate and multivariate analysis when the ratios of the population variances are unknown. Biometrika, 41(1/2), 19-43.

Tsagris M. T. (2014). Multivariate statistical functions in R. Athens, Nottingham and Abu Halifa (Kuwait).

Examples

Run this code
# NOT RUN {
data(iris)

# Wilk's Test
results.Wilks <- Manova(data=iris[,1:4],group=iris[,5],alpha=0.01)
summary(results.Wilks)

 
# Hotelling and Lawley's Test
results.HL <- Manova(data=iris[,1:4],group=iris[,5], method="Hotelling-Lawley")
summary(results.HL)

# Roy's Test
results.Roy <- Manova(data=iris[,1:4],group=iris[,5], method="Roy")
summary(results.Roy)

#Roy's Test with Confidence Intervals 
results.RoyCI <- Manova(data=iris[,1:4],group=iris[,5], method="Roy",CI=TRUE)
summary(results.RoyCI)


# James's Test
results.James <- Manova(data=iris[,1:4],group=iris[,5],Homogeneity=FALSE)
summary(results.James)
# }

Run the code above in your browser using DataLab