Analysis of Variance - One-Way MANOVA
This feature is only available in Q5.
One-Way MANOVA (Multivariate Analysis Of Variance), is a statistical test which tests the relationship between a set of numeric variables and a single categorical variable.
Contents |
Example
In the example below, shading is proportional to the t-statistics comparing against the row means (See How to Read a Standard R Table), and the font of the cells is bold where the p-value, adjusted for multiple comparisons using the False Discovery Rate correction, is less than or equal to 0.05. The p value column shows the lowest p-value for each row. The overall significance of the table, as shown in the sub-title, is determined by the lowest adjusted p-value in the table. The R-Squared shows the strength of relationship between each outcome variable, one-by-one, and the predictor.
Options
Outcomes The variables to be predicted.
Predictor A variable containing 2 or more groups. If not categorical, it is converted into categories in the analysis.
Robust standard errors Computes standard errors that are robust to violations of the assumption of constant variance. See Robust Standard Errors.
Missing data (see Missing Data Options):
- Error if missing data
- Exclude cases with missing data
Variable names Displays Variable Names in the output.
Binary variables Automatically converts non-ordered categorical variables into binary variables. Note that if this option is not selected, categories values are inferred based on the order of the categories (i.e., the Value Attributes are ignored).
Filter The data is automatically filtered using any filters prior to estimating the model.
Weight Where a weight has been set for the R Output, the calibrated weight is used. See Weights in R.
Technical details
- Tests of individual means are two-sided and comparing to the Grand Mean (i.e., "To mean"). See Analysis of Variance - One-Way ANOVA for more information as well as more options for post hoc testing.
- By modifying the code so that Pillai = TRUE, Pillai's Trace and F-tests can be computed for the overall and row null hypotheses, and Tukey's Range test is used to test within rows; Pilla's trace is not valid where the data is weighted.
Acknowledgements
The linear model is fitted using the lm and manova functions in R. See Analysis of Variance - One-Way ANOVA for acknowledgements relating to the ANOVAs in the outputs.
Code
form.setHeading('One-Way MANOVA'); form.dropBox({label: "Outcomes", types:["Variable: Numeric, Date, Money, Categorical, OrderedCategorical"], name: "formOutcomeVariables", multi:true}) form.dropBox({label: "Predictor", types:["Variable: Numeric, Date, Money, Categorical, OrderedCategorical"], name: "formPredictor"}) form.checkBox({label: "Robust standard errors", name: "formRobust", default_value: false}) form.comboBox({label: "Missing data", alternatives: ["Error if missing data", "Exclude cases with missing data"], name: "formMissing", default_value: "Exclude cases with missing data"}) form.checkBox({label: "Variable names", name: "formNames", default_value: false}) form.checkBox({label: "Categorical as binary", name: "formBinary", default_value: false})
library(flipAnalysisOfVariance) manova <- OneWayMANOVA(data.frame(QInputs(formOutcomeVariables)), QInputs(formPredictor), subset = QFilter, weights = QPopulationWeight, robust.se = formRobust, missing = formMissing, show.labels = !formNames, binary = formBinary, pillai = FALSE, fdr = TRUE)