VARCOMP (Variance-Components Analysis)
v1.0.1
Architecture, Planning & Design context — in a hierarchical design, it decomposes how much of the total variance originates from which level (site, group, subgroup, error). Equivalent to SAS PROC VARCOMP, in MerQur with a REML/ML cascade.
REML + ML fallbackICC + heritabilityσ²sehir ≈ 6.0
🎯 What is it for?
VARCOMP answers the question of which level contributes how much variance. Is the variability in the distribution of a single kullanici_memnuniyet_skoru measurement entirely random, or does it stem from systematic differences between sehir and mahalle? With VARCOMP, σ²sehir, σ²mahalle, σ²yapi and σ²residual are estimated separately; the percentage share of each is reported.
📌 When is it used?
- When there is a multilevel sampling design (nested) in the Architecture, Planning & Design field
- For sample-size calculation when designing a data-collection plan in which you will take the same measurement on different mahalle’s under different sehir’s
- To compute heritability / generalizability (σ² ratios)
- Before even building a fixed-effect model — where does the variance primarily lie?
⚙ Assumptions
- Continuous DV (kullanici_memnuniyet_skoru).
- Nested structure: mahalle within sehir, yapi within mahalle (no cross-level confounding).
- Random effects ~ Normal (homoskedastic, mean 0).
- Sufficient units at each level: ≥4-6 sehir, each with ≥2 mahalle, is recommended.
📊 How Is It Run in MerQur?
Panel assignments (form fields in the program):
- Columns:
{'dv': 'memnuniyet', 'factors': [('sehir', False), ('mahalle', True), ('park_id', True)]} - Parameters:
{'estimator': 'REML'}
📊 Sample Dataset — Architecture, Planning & Design
ℹ Note: The scenario, MerQur output and interpretation below were produced by actually running the real example dataset in MerQur. Numeric results on your own data will differ; the goal is to show how the analysis is set up and interpreted end-to-end.
🎬 Example File
This analysis is demonstrated on the following example dataset for Architecture, Planning & Design:
Peyzaj_Mimarligi/100_varcomp_city_neighborhood_park_satisfaction.xlsx
🎬 Scenario
We partition satisfaction variability by which spatial level (city/neighborhood/park)
it comes from with nested variance components (REML).
⚙️ Variable Selection
- Dependent: satisfaction | Factors: city (upper), neighborhood (nested in city)
Data Preview (First 5 Rows)
| city | neighborhood | park_id | satisfaction |
|---|---|---|---|
| Ankara | Ank_M01 | Ank_M01_P01 | 3.87 |
| Ankara | Ank_M01 | Ank_M01_P02 | 2.43 |
| Ankara | Ank_M01 | Ank_M01_P03 | 3.24 |
| Ankara | Ank_M01 | Ank_M01_P04 | 3.0 |
| Ankara | Ank_M01 | Ank_M01_P05 | 3.83 |
n = 120 · Columns: city, neighborhood, park_id, satisfaction
📈 MerQur Output
─────────────────────────────────────────────
city = 40.2% neighborhood (nested in city) = 13.4% residual = ~46.3%
Nested: city > neighborhood > park (REML)
💬 Interpretation
We partitioned the variability of park satisfaction by which spatial level — city, neighborhood or park — it comes
from with variance-components analysis: city and neighborhood are nested. The result: 40.2% of the variance comes
from between-city differences, 13.4% from (within-city) between-neighborhood differences, ~46% from park-level/
residual variation. So the largest structural source is the city level — cities differ markedly in satisfaction
(urban-policy/climate/culture differences). This is a critical inference in multi-level design: it shows where the
variability concentrates and at which level (city policy, local neighborhood or single park) an intervention should
be targeted.
⚠ Common Mistakes
- Forgetting the nested checkbox — the neighborhood column is clustered under city (e.g., MAHALLE_05_03 exists only within SEHIR_05). If the checkbox is left unchecked, a crossed structure is assumed → the variance is partitioned incorrectly.
- A single level at the second tier — if a city has only a single neighborhood beneath it, VARCOMP cannot estimate that level (σ²=neighborhood≈0 ‘singular fit’ warning).
- Continuous DV assumption — for Bernoulli/count data, a GLMM or a categorical-VARCOMP alternative is required instead of VARCOMP (outside MerQur’s scope).
📚 MerQur’a Atıf
Örücü, Ö. K. (2026). MerQur: Integrated Academic Data Analysis & Reporting Platform [Computer software] (Version 1.0.0). https://doi.org/10.53463/merqur.2026001
📝 Üretim Notu — Bu sayfadaki örnek veri sentetik olarak üretilmiştir (sabit SEED=42, generator: samples/Ileri_Duzey_v102/_generate_v102_datasets.py). Sayfa içeriği Anthropic Claude desteği ile hazırlanmış, akademik doğruluk yazar tarafından kontrol edilmiştir.