The ANOVA Tab

The ANOVA tab analyzes whether the means of a response variable differ across groups defined by categorical variables. Both one-way and two-way designs are supported. It assumes independent, between-subjects observations and does not support repeated measures or paired data—for example, the same patient measured before and after treatment or multiple samples from the same unit. For those designs, use a GLMM with the subject as the random-effect group.

Basic Usage

Open the Tab

Select Analysis > ANOVA... from the menu bar.

Run an Analysis

Configure the following in the settings panel:

  1. Select a dataset from Dataset
  2. Choose One-Way or Two-Way under Analysis Type
  3. Select a categorical variable for Factor A (Categorical)
  4. Select a numeric variable for Response Variable (Numeric)
  5. Click Run Analysis

Changing the variable selection or the analysis settings after a run makes the displayed results no longer belong to the current settings. MIDAS removes those results from the view and shows a message asking you to run the analysis again. Restoring the previous settings brings the results back. Changing Dataset also resets the variable selection, so the results are discarded instead.

Data Format

Data must be in long format with one row per observation. Each row contains the factor value and the response variable value. Use Reshape to convert wide-format data.

One-Way ANOVA

Analyzes differences in the response variable means across groups defined by a single categorical factor.

Statistical Model

yij=μ+αi+εijy_{ij} = \mu + \alpha_i + \varepsilon_{ij}

yijy_{ij} is the jj-th observation in group ii, μ\mu is the overall mean, αi\alpha_i is the effect of group ii, and εij\varepsilon_{ij} is the error term.

Assessing Group Differences

ANOVA decomposes the total variation in the response variable into between-group variation and residual variation. The decomposition appears as SS, df, and MS in the ANOVA table. Of the effect sizes, η² shows the proportion of the total variation attributable to the factor in the sample, and ω² is an estimate of that proportion in the population. The magnitude and precision of group differences can be read from the simultaneous confidence intervals for pairwise differences from Tukey HSD. The group mean confidence intervals in Group Statistics show the precision of each group mean estimate.

Variable Selection

Which columns can be selected as factors and as the response variable follows the column's measurement scale. Columns that do not meet the requirement still appear in the list, but are grayed out and cannot be selected.

Factor A (Categorical) and Factor B (Categorical) take a categorical variable that defines the groups. Columns with a nominal or ordinal scale can be selected. When an ordinal column is selected, ANOVA estimates no ordered contrast such as a linear trend and groups the levels the same way it groups a nominal column. For an enum column, the order of the enum definition sets the row order in Group Statistics, the direction of the Tukey HSD differences, and the reference category of a two-way ANOVA. That order comes from the enum definition, not from the measurement scale.

A numeric column that encodes categories, such as a dose code or a batch number, can also be used as a factor. Right-click the column header in Data Table and change its scale to nominal or ordinal from Edit Scale of Measurement. Do not do this with a measured quantity. Nearly every value would form a group of its own, leaving no degrees of freedom for the residuals.

Response Variable (Numeric) takes the numeric variable to analyze. Numeric columns with an interval or ratio scale can be selected. String and enum columns cannot be used as the response variable because their values are stored as text, and their scale cannot be changed to interval or ratio. When numbers are stored as text, convert the column to a numeric type in the Convert Column Types tab first, then select it.

A boolean column has a nominal scale by default and therefore cannot be selected as it is. Changing its scale to ratio makes it selectable, and its values are read as 0 and 1. In a 0/1 response the variance within a group is determined by that group's mean, so groups with different proportions do not have equal variances. Intervals computed from the pooled MSE can fall outside 0 and 1. To work with proportions, use a GLM with the binomial family.

Date and datetime columns cannot be used as the response variable even though their scale is interval. To analyze an elapsed duration, build a numeric column of days from a baseline date in the SQL Editor and select that column.

The measurement scale belongs to the column itself, so changing it here also affects graph axis types and the options offered by the other analysis tabs.

Example

To analyze whether sepal length differs among the three species Iris-setosa, Iris-versicolor, and Iris-virginica in the Iris sample data:

  1. Dataset: Iris
  2. Analysis Type: One-Way
  3. Factor A: species
  4. Response Variable: sepal_length
  5. Click Run Analysis

One-way ANOVA setup with Iris dataset, species x sepal_length

Confidence Level

Set the confidence level for Group Statistics confidence intervals and Tukey HSD post-hoc comparisons. Choose from 90%, 95% (default), or 99%. This setting also appears in two-way ANOVA, where it applies to the Group Statistics confidence intervals. Changing the confidence level after a run removes the results from the view until you run the analysis again (see Run an Analysis).

Two-Way ANOVA

Analyzes the effects of two categorical factors and their interaction on the response variable.

Statistical Model

With interaction:

yijk=μ+αi+βj+(αβ)ij+εijky_{ijk} = \mu + \alpha_i + \beta_j + (\alpha\beta)_{ij} + \varepsilon_{ijk}

αi\alpha_i is the effect of factor A, βj\beta_j is the effect of factor B, and (αβ)ij(\alpha\beta)_{ij} is the interaction effect.

Additional Settings

Factor B (Categorical): Select a second categorical variable, different from Factor A.

Include interaction term (A x B): Whether to include the interaction term in the model. Enabled by default. Include the interaction when the effect of one factor may depend on the level of the other. If the interaction is known to be absent, excluding it increases the residual degrees of freedom, providing a more precise estimate of the error variance.

Sum of Squares Type: Choose the method for computing sums of squares.

Sum of Squares Types

Type I computes sums of squares sequentially based on the order factors enter the model. Each factor's contribution depends on which factors are already in the model. MIDAS enters Factor A first, then Factor B, then the interaction term. The SS for Factor A is the reduction in residual sum of squares when Factor A is added to the intercept-only model, and the SS for Factor B is the further reduction when Factor B is added. With unbalanced designs, swapping the Factor A and Factor B assignments can change the results.

Type III computes sums of squares for each factor as if it were the last one entered. Each factor's contribution is adjusted for all other factors.

For balanced designs (equal sample sizes in all cells), Type I and Type III produce identical results for every term of a model without the interaction term and for the interaction term of a model with it. Type III results do not depend on the order in which the factors enter the model, but in a model with the interaction term the Type III main effects depend on the reference categories instead, as described in the next section. The default is Type III. Type I is useful when the order of factor entry is meaningful—for example, when Factor A is a blocking factor whose contribution is removed before assessing Factor B.

Type III Interpretation with Interaction

MIDAS uses treatment coding. Treatment coding designates one level of each factor as the reference category (baseline level) and expresses the effects of all other levels as differences from it. The reference category is the first level in the order of the levels of the factor. For an enum column, the order of the enum definition sets the order of the levels. When the interaction term is included, the Type III main effect for each factor depends on the treatment coding reference category. For example, if Factor A has levels A, B, C in this order and Factor B has levels X, Y in this order, the reference categories are A and X. The Type III sum of squares for Factor A is the increase in the residual sum of squares when the coefficients of the Factor A main effect are constrained to 0 while the interaction terms stay in the model. Under treatment coding, these coefficients are the differences between the levels of Factor A when Factor B is at reference level X.

Reading the Results

Observations

The total number of observations used in the analysis appears at the top. If rows were excluded, the count of excluded rows is also shown.

Group Statistics

A summary table of descriptive statistics for each group.

ColumnDescription
GroupGroup name. In two-way ANOVA, displayed as "Factor A level × Factor B level"
NNumber of observations
ExcludedNumber of rows in this group excluded due to missing or invalid values. This column appears only when the analysis excluded at least one row
MeanGroup mean
SDStandard deviation (square root of unbiased variance, denominator n − 1)
95% CIConfidence interval for the group mean in [lower, upper] format. Computed as mean ± t × √(MSE / n) using the pooled MSE from the ANOVA table (t-distribution with residual degrees of freedom). This interval assumes equal variances across groups; when group variances differ, the actual coverage may deviate from the nominal level. The column heading and confidence level match the Confidence Level setting
MinMinimum value
MaxMaximum value

Some excluded rows do not appear in the Excluded column: rows with a missing factor value belong to no group, and rows of a level or cell removed entirely by exclusion have no row in the table. When such rows exist, their counts appear as notes below the table.

ANOVA Table

The main results table. It shows the sum of squares of the response attributed to each factor and to the residuals. This table evaluates the magnitude of group differences using effect sizes (η² and ω²). It does not display test statistics (F-values) or p-values. The magnitude and precision of each pairwise difference can be assessed from the simultaneous confidence intervals in Tukey HSD.

ColumnDescription
SourceSource of variation
SSSum of squares -- the amount of variation attributable to each source
dfDegrees of freedom
MSMean square (SS / df)
η² / partial η²Eta-squared (one-way) or partial eta-squared (two-way). Computed as SS_effect / (SS_effect + SS_residual). The ratio of the source's variation to the sum of the source and residual variation. Because the denominator excludes variation from other sources, the partial η² values across sources can sum to more than 1 in two-way designs
ω² / partial ω²Omega-squared (one-way) or partial omega-squared (two-way). One-way ω² is computed as (SS_effect − df_effect × MS_residual) / (SS_total + MS_residual), and two-way partial ω² as (SS_effect − df_effect × MS_residual) / (SS_effect + (N − df_effect) × MS_residual). In one-way ANOVA, ω² estimates the proportion of total population variance attributable to the factor (σ²_effect / σ²_total). In two-way ANOVA, partial ω² estimates σ²_effect / (σ²_effect + σ²_error), excluding the variance of other sources from the denominator. Both have less upward bias than η² as estimators of their population values. Displayed as 0 when the estimate is negative

ANOVA table showing the species effect on sepal_length in the Iris dataset

Tukey HSD Post-Hoc Comparisons

The ANOVA table decomposes overall variation among groups, but does not show how large the difference is for each pair. Tukey HSD post-hoc comparisons estimate the mean difference and its simultaneous confidence interval for every pair of groups, allowing you to assess the magnitude and precision of each pairwise difference.

For one-way ANOVA, Tukey HSD is computed automatically. The Tukey-Kramer method is used, which handles unequal group sizes. Tukey HSD is not available for two-way ANOVA.

Tukey HSD constructs simultaneous confidence intervals for all pairwise mean differences. Constructed individually, the pairwise intervals would jointly cover all the true differences with probability below the nominal level; Tukey HSD widens the intervals so that this simultaneous coverage probability stays at or above the nominal level.

ColumnDescription
ComparisonThe two groups being compared
DiffDifference in means (Group 1 mean − Group 2 mean)
Std. ErrorStandard error of the mean difference
CI Lower / CI UpperSimultaneous confidence interval for the mean difference. Adjusted so that all pairwise intervals simultaneously contain the true values with at least the specified confidence level

The interval center (the Diff value) is the point estimate of the difference, and the interval width reflects estimation uncertainty.

Tukey HSD uses the pooled MSE, so it assumes equal population variances. When group variances differ substantially, the actual coverage of these intervals may deviate from the nominal level. Compare the group standard deviations in Group Statistics to check this assumption.

The critical value qcriticalq_{\text{critical}}, MSE, residual degrees of freedom, and the interval formula are displayed below the table. The half-width of the simultaneous confidence interval is qcritical×Std. Error/2q_{\text{critical}} \times \text{Std. Error} / \sqrt{2}. The division by 2\sqrt{2} arises because the studentized range quantile qcriticalq_{\text{critical}} is defined on the scale of the range statistic, not the mean difference.

Tukey HSD post-hoc comparisons for all pairs of Iris species

Assumptions

ANOVA assumes the following. Verify that these are reasonable when interpreting results.

  • Independence: Observations are independent of each other
  • Normality: The response variable follows a normal distribution within each group
  • Homogeneity of variance: The variance is equal across all groups

Assumption Diagnostics

ANOVA assumes normality within each group. Two types of Q-Q plots help assess this assumption.

The pooled residual Q-Q plot compares all residuals against a theoretical normal distribution. The reference line passes through the first and third quartiles. Departures such as heavy tails or skewness are visible in the shape of the deviation from the line. Because this plot combines residuals from all groups, it can mask departures that affect only some groups.

The per-group Q-Q plots show the residual distribution within each group separately. These provide a visual check of the normality assumption, since ANOVA assumes normality within each group. When there are more than 12 groups, only the first 12 (in the same order as the Group Statistics table) are displayed.

When homogeneity of variance holds, the estimates of group mean differences and their confidence intervals become robust to departures from normality as sample sizes increase. If Q-Q plots show departures from normality, check homogeneity of variance first.

Homogeneity of variance can be assessed by comparing the SD values in the Group Statistics table. When group SDs are similar, minor departures from normality are tolerable. When SDs differ substantially across groups, this robustness does not hold. Consider using GLM, which can explicitly model the variance structure.

In two-way ANOVA, residuals are computed from the fitted values of the selected model. When the interaction term is included, the model fits a separate mean for each cell, so residuals equal deviations from cell means. When the interaction term is excluded, the main-effects-only model produces different fitted values, and the residuals reflect deviations from those predictions. The choice of model affects both the pooled and per-group Q-Q plots.

Add to Report

Each result section (Group Statistics, ANOVA Table, Assumption Diagnostics, and Pairwise Mean Differences (Tukey HSD)) has an Add to Report button in its header. Click it to add that section to a report. Sections are added independently, so you can send analysis results and diagnostic plots to separate reports.

Elements added to a report retain the original dataset and analysis settings. When the data changes, the results are recomputed.

Missing and Invalid Values

Rows containing missing values (null), empty or blank factor cells, or Infinity or NaN response values are automatically excluded. The number of excluded rows is displayed in the results panel. For two-way ANOVA, rows with any such value in either factor or the response variable are excluded. This is listwise deletion (complete-case analysis). See Missing Data Mechanisms for conditions under which it yields valid estimates.

The per-group breakdown of exclusions appears in the Excluded column of Group Statistics. One-way ANOVA counts exclusions per group; two-way ANOVA counts them per combination of factor levels (cell). When exclusions concentrate in a particular group, that group's number of valid observations shrinks, its mean's confidence interval widens, and the design becomes more unbalanced. Concentration is also a hint that missingness is related to the factor. Whether the estimates after exclusion are biased depends on the missingness mechanism and cannot be determined from the counts; see Missing Data Mechanisms for how to reason about it.

  • Linear Regression -- the ANOVA table in the regression tab tests the overall model fit, while this tab uses categorical factors