SPSS command: SPSS VARCOMP
Variance components analysis in your browser
Variance components analysis splits the variability of a measurement into parts due to random factors — batches, raters, sites, operators — and residual error.
Free · No account · Files stay on your device · Updated 18 October 2026
What it tells you
Crosstabs runs SPSS VARCOMP on your device with six estimation methods, mixed models that include fixed factors, and the ANOVA and expected mean squares tables for the ANOVA method.
- How much of the total variance comes from each random factor and from residual error, as variance estimates in the units of the outcome squared.
- The intraclass correlation for a one-factor design: Var(factor) divided by the total variance.
- For ANOVA estimates, the expected mean squares that link each mean square to the components it contains.
- For ML and REML, the −2 log likelihood, so nested random structures can be compared.
When to use it
Use it when
- Gauge or measurement-system studies: how much variation is due to operators, parts and repeat measurements.
- Multi-site or multi-rater data where you want to know how much sites or raters differ, not which ones.
- Planning: deciding whether to sample more batches or more measurements per batch.
Use something else when
- You care about specific levels (these three stores, these two formats): treat them as fixed factors in GLM Univariate.
- You need fixed-effect tests, random slopes or covariates alongside the random effects: use linear mixed models.
- Only a handful of levels per random factor: the component will be estimated very imprecisely whatever the method.
How to run it in Crosstabs
- 01
Open your data
Open a file with one row per measurement and switch to Statistics mode.
- 02
Choose Variance Components
In the General linear model group, pick Variance Components (VARCOMP).
- 03
Assign the variables
Tick one Dependent variable, one to four Random factors and, if needed, up to three Fixed factors.
- 04
Pick the method and model
Under Method choose MINQUE(1) (default), MINQUE(0), ANOVA with Type I or Type III sums of squares, Maximum likelihood or Restricted maximum likelihood; under Model choose Full factorial or Main effects only.
- 05
Run analysis
Click Run analysis. Missing values are excluded listwise; a declared frequency weight counts each case that many times.
Worked example
Computed by the Crosstabs engine from the synthetic data below when this page was built — not typed in.
Data
29 synthetic purity assays (%) from 6 production batches treated as a random sample of batches; batch 4 has 4 assays instead of 5, so the design is slightly unbalanced. Batch shifts and assay noise are drawn from normal distributions with a fixed seed.
| Component | MINQUE(1) | ANOVA, Type III | Restricted maximum likelihood |
|---|---|---|---|
| Var(batch) | 0.8917 | 0.8857 | 0.8936 |
| Var(Error) | 0.3768 | 0.3765 | 0.3766 |
| −2 Restricted Log Likelihood | 68.080 |
Each column is a separate run with a different Method setting.
| Source | Sum of Squares | df | Mean Square |
|---|---|---|---|
| batch | 23.2618 | 5 | 4.6524 |
| Error | 8.6591 | 23 | 0.3765 |
| Source | Var(batch) | Var(Error) |
|---|---|---|
| batch | 4.828 | 1.000 |
| Error | 0.000 | 1.000 |
How to read it
By REML, Var(batch) = 0.8936 and Var(Error) = 0.3766, so batch-to-batch differences account for 70.4% of the total variance in purity (the intraclass correlation). The expected-mean-squares coefficient for batch is 4.828 rather than 5 because batch 4 is short one assay. On this nearly balanced design MINQUE(1) gives Var(batch) = 0.8917 and the ANOVA method 0.8857.
Output tables explained
- Variance Estimates
- One estimate per random term (including interactions under Full factorial) and Var(Error), plus −2 log likelihood or −2 restricted log likelihood for ML and REML. Footnotes name the method and the fixed effects.
- ANOVA
- With an ANOVA method: sum of squares, df and mean square for each term and the error, using the chosen Type I or Type III sums of squares.
- Expected Mean Squares
- The coefficient of each variance component in each random term's expected mean square. In balanced data the coefficient of a factor equals the cases per level; unbalanced data give non-integer values.
Assumptions and notes
- Random-factor levels are a random sample from a larger population, with effects normally distributed around zero.
- Random effects and residuals are independent, and residual variance is the same everywhere.
- ANOVA and MINQUE estimates can be negative; ML and REML are constrained to be non-negative. A negative estimate usually means the true component is near zero.
- The panel takes factors only; covariates are not part of this procedure here.
How the results are validated
MINQUE(0), MINQUE(1) and the ANOVA Type I and III methods match an independent dense NumPy implementation of the VARCOMP algorithms to a relative 1e-8 on a crossed operator × part design, and the ANOVA method equals the classical closed form on its balanced subset (1e-9). ML and REML match R 4.6 lme4 2.0.6 to a relative 2e-5 for every component and 1e-6 for the log likelihood, including a model with a fixed factor and a boundary estimate. Validation evidence
Questions
Which estimation method should I choose?
REML is the usual choice: it accounts for the fixed effects when estimating variances and never returns a negative value. ANOVA (Type III) is transparent and classical for balanced designs; MINQUE(1) is the SPSS default and needs no iteration.
What does a negative variance component mean?
ANOVA and MINQUE are unconstrained, so sampling noise can push a near-zero component below zero; the panel adds a note when this happens. Report it as approximately zero, or use REML, which stops at the boundary.
How do I get the intraclass correlation?
For one random factor, divide Var(factor) by the sum of Var(factor) and Var(Error). The panel's summary line also gives the largest component's share of the total estimated variance.
Should I use VARCOMP or linear mixed models?
Use VARCOMP when the goal is the variance split itself. Use MIXED when you also need tests of fixed effects, random slopes, covariates or a repeated-measures covariance structure.
Is my data uploaded?
No. Every method, including the iterative ML and REML fits, runs in your browser.
Related procedures
- Linear Mixed ModelsMIXED
- GLM UnivariateUNIANOVA
- Reliability AnalysisRELIABILITY
- Repeated Measures ANOVAGLM WSFACTOR
- One-Way ANOVAONEWAY
- Free SPSS alternative: full coverage list
Run Variance Components on your own data
Open a .sav, CSV or Excel file. Everything runs in your browser; the file never leaves your device.
SPSS is a trademark of IBM Corp. Crosstabs is not affiliated with or endorsed by IBM.