Correlation, regression and survival · Choose a method

Myelin g-ratio statistics: axons within animals, axon diameter and comparing myelination

Compare g-ratios with one value per animal, not hundreds of axons. Adjust for axon size from each animal's own fibre-versus-axon diameter line, because smaller axons alone can change the mean g-ratio. Python and R code.

By Licklider · Published · Last reviewed · How this page was made · Markdown

On this page
  1. Which analysis for your question
  2. Worked example: a knockout with no real effect
  3. Before you analyse
  4. Check what an AI assistant ran
  5. Report it
  6. References

Quick answer. The g-ratio (axon diameter ÷ fibre diameter, from electron micrographs) is measured on hundreds of axons per animal, but the animal is the unit, and axons within an animal are not independent. Give each animal one value and compare animals with a Welch t-test. A mean g-ratio per animal is safe only when axon sizes are similar between groups: if small axons have relatively thick myelin in your data (plot g-ratio against axon diameter to see; Gow argues that in healthy tracts the g-ratio is close to constant), a group with smaller axons can show a lower mean g-ratio even when myelin is normal. For that case, this guide fits a straight line predicting fibre diameter from axon diameter for each animal. First check that each animal’s points follow a straight line, with similar slopes in both groups. Then compute each animal’s g-ratio at one common axon diameter inside every animal’s range (here 1 µm ÷ the fibre diameter the line predicts for a 1-µm axon), and compare animals. In a simulation of 5 vs 5 mice with about 100 axons each and no real difference, a t-test on all axons gave false positives in 54.8% of simulated studies and a per-axon regression in 64.5%; when knockout axons were 20% smaller with normal myelin, the per-mouse mean g-ratio reported a myelin difference in 51.0% of studies and the per-mouse g-ratio at 1 µm in 4.0%.

Terms used below. g-ratio: inner (axon) diameter ÷ outer (fibre) diameter of a myelinated axon; lower means thicker myelin relative to the axon. Fibre diameter: axon plus myelin sheath. Myelin thickness: (fibre − axon diameter) ÷ 2. Oblique axons are cut at an angle and outfolded myelin loops away from the axon; both distort diameters. A standard deviation of 0.06 on the log scale means about ±6%. Mixed model: a regression with a random effect (an adjustment for each animal), so axons or regions of one animal are not treated as independent. Binning: grouping axons into ranges of diameter. Deming regression: a straight-line fit that allows measurement error in both variables. Intercept: the fibre diameter a line predicts at axon diameter 0; a positive intercept means small axons have relatively thick myelin. Hypomyelination: thinner myelin than normal, giving higher g-ratios. n: the number of independent units in a test, here mice rather than axons. Experimental unit: the thing randomised to a group, here the mouse. Pseudo-replicate: a measurement that repeats the same unit, such as another axon from the same mouse. Per-axon regression: a regression fitted to all axons pooled, treating each as independent. Welch t-test: a two-group t-test that does not assume equal spread. 95% confidence interval (CI): the range of values compatible with the data. Power: the chance of detecting an effect that is really there. False positive: a “significant” result when there is no real effect.

Which analysis for your question

Question Analysis Report
Is myelin thinner relative to axon size? Each animal’s straight line of fibre on axon diameter (check that the points follow a line and the slopes look similar between groups), g-ratio at a common axon diameter inside every animal’s range, Welch t-test across animals Difference with 95% CI, n animals (axons)
Do groups differ in axon size distribution as well? Median axon diameter per animal, compared across animals; report it next to the g-ratio Difference with 95% CI
Overall g-ratio, with axon sizes similar between groups Mean g-ratio per animal, Welch t-test Difference with 95% CI
Proportion of axons myelinated Myelinated ÷ all axons counted per animal, compared across animals Difference in proportion with 95% CI
Several regions or ages The same per region, with animal as the unit; choose the regions in advance or correct for the number of tests; when the same animals give several regions, a mixed model with animal as a random effect Results per region

Chomiak and Hu describe the g-ratio as “the ratio of the inner axonal diameter to the total outer diameter” and note that it is widely regarded as “a highly reliable ratio for assessing axonal myelination” (Chomiak and Hu 2009). Gow and colleagues write that measurements of many axons from one animal “are actually pseudo-replicate data (measurements from a single animal under identical experimental conditions)”, and recommend “a single estimate per mouse” for testing (Gow et al. 2025). Gow writes that the usual practice of fitting a line of g-ratio against fibre diameter (or taking an arithmetic mean), which suggests that small fibres have proportionately thicker sheaths, is “used almost universally to assess changes to myelin, lacks a consistent mathematical framework and may lead to incorrect conclusions for many studies” (Gow 2026). Analysis D below is this guide’s own approach, an adjustment for axon size within each animal (the idea behind ANCOVA); Gow and colleagues instead start from “axon versus fiber diameter plots – test for linearity”, then use “unbiased binning of fiber diameters / mouse” and a mixed-effects analysis of the median g-ratio in each bin (Gow et al. 2025). Kaiser and colleagues quantified micrographs “blinded of their genotypes” with the MyelTracer software (Kaiser et al. 2021).

Worked example: a knockout with no real effect

Constructed data: axon and fibre diameters for 80 to 120 myelinated axons in each of 5 wild-type and 5 knockout mice (1,032 axons). The model assumes that fibre diameter rises in a straight line with axon diameter and has a positive intercept, so small axons have relatively thick myelin and low g-ratios (an assumption: Gow argues that in healthy tracts the g-ratio is close to constant across fibre sizes); axon diameters vary with a standard deviation of 0.35 on the log scale; mice differ in myelin thickness (0.06) and each axon’s myelin thickness scatters around its mouse (0.12). By design, the knockout changes neither myelin nor axon size. The data’s random seed was the first one tried and was not chosen for its result. Stored code and data: axons.csv, model.py, make_data.py, analysis.py, analysis.R and the analysis output; analysis.py and analysis.R print the same output.

The mean g-ratio was 0.712 in wild-type and 0.713 in knockout mice, and the median axon diameter per mouse averaged 0.78 µm in wild-type and 0.79 µm in knockout mice.

Analysis of constructed data with no real effect, knockout vs wild-type Result
A. (Not valid: axons share mice) Axons as n (482 vs 550), Welch t-test on g-ratio difference 0.001, p = 0.58
B. (Not valid: axons share mice) Regression of g-ratio on genotype and axon diameter, all axons genotype difference −0.002, p = 0.25
C. Mice as n, mean g-ratio per mouse (5 vs 5), Welch t-test (valid when axon sizes are similar) difference 0.001 (95% CI −0.024 to 0.026), p = 0.91
D. Mice as n, each mouse’s g-ratio at 1 µm axon diameter, Welch t-test difference −0.003 (95% CI −0.028 to 0.022), p = 0.79

With this data set no analysis found a difference; with 5 mice per group a study like this excludes only large differences, and the confidence interval shows which remain possible. The simulation shows how often the per-axon analyses find differences that do not exist. Across 5,000 simulated studies of this design (simulation.py, the simulation output):

Scenario A. Axons as n (invalid) B. Regression, axons as n (invalid) C. Mean g-ratio per mouse D. g-ratio at 1 µm per mouse
No difference (false positives) 54.8% 64.5% 4.4% 4.6%
Knockout axons 20% smaller, myelin normal (“myelin difference” by mistake) 96.0% 64.4% 51.0% 4.0%
Myelin thickness reduced by 15% (power) 99.9% 100.0% 93.1% 94.0%

These percentages describe this simulated design (5 mice per group, about 100 axons each, the variation in model.py), not every myelin study. Treating hundreds of axons as independent found a “difference” in more than half of the null studies, because axons from one mouse share its fixation, processing and biology. The mean g-ratio per mouse was valid when axon sizes were the same, but when knockout axons were simply smaller it reported a myelin change in 51.0% of the studies, because in this model small axons have lower g-ratios. Reading each mouse’s g-ratio at a common axon diameter removed that and kept the power to detect real thinning. The model makes fibre diameter increase in a straight line with axon diameter, which suits analysis D; a first version of D that fitted a straight line of g-ratio on axon diameter gave 13.1% false positives in the smaller-axon scenario (column E of the linked simulation output), because the g-ratio is not a straight-line function of axon size.

Which to use: if the groups’ axon sizes differ, or g-ratio changes with axon diameter in your plots, use D; otherwise C is simpler and gives the same answer. Before using D, plot fibre against axon diameter for each animal: the points should follow a straight line, and the slopes should look similar in both groups. If the slopes clearly differ, report the g-ratio at two or three named axon diameters instead of one. Our simulation used 80–120 axons per animal; an animal with far fewer, or with a curved plot, gives an unreliable line. Measurement error in axon diameter also flattens each line; Gow and colleagues note that “experimental errors are present in both axon and fiber diameter measurements” and analyse these plots with Deming regression, so treat D as an approximate adjustment that works when both groups are measured the same way. Choose the common diameter between the smallest and largest axon of every animal; if 1 µm is outside that range for any animal, choose a diameter that every animal covers and say so.

The code expects one row per myelinated axon with columns genotype (labels exactly wild-type and knockout), mouse, axon (an ID for your records; the code does not use it), axon_um and fibre_um (diameters in µm, for example from area as 2 × √(area ÷ π)). Rename your columns and labels to match, save the table as axons.csv (or change the file name in the code), and run the code in that folder (python analysis.py or Rscript analysis.R). Python needs NumPy, pandas 2.2 or later and SciPy 1.11 or later (pip install numpy pandas scipy); the R code uses base R only. The printed difference is knockout − wild-type, and its confidence interval is for that difference.

import numpy as np, pandas as pd
from scipy import stats

d = pd.read_csv("axons.csv"); D0 = 1.0                                     # common axon diameter, um
def g_at(x):                                                              # each mouse's own line of fibre on axon diameter
    b = np.polyfit(x.axon_um, x.fibre_um, 1); return D0 / (b[0] * D0 + b[1])     # b = slope, intercept
m = d.groupby(["genotype", "mouse"]).apply(g_at, include_groups=False)
t = stats.ttest_ind(m["knockout"], m["wild-type"], equal_var=False); ci = t.confidence_interval()
print(f"g-ratio at {D0:g} um: difference {m['knockout'].mean() - m['wild-type'].mean():.3f} (95% CI {ci.low:.3f} to {ci.high:.3f}), p = {t.pvalue:.2g}")
# g-ratio at 1 um: difference -0.003 (95% CI -0.028 to 0.022), p = 0.79
d <- read.csv("axons.csv"); D0 <- 1.0
m <- do.call(rbind, lapply(split(d, paste(d$genotype, d$mouse)), function(x) { b <- coef(lm(fibre_um ~ axon_um, data = x))   # b = intercept, slope
  data.frame(genotype = x$genotype[1], g1 = D0 / (b[[1]] + b[[2]] * D0)) }))           # g-ratio at 1 um per mouse
t.test(g1 ~ genotype, data = m)       # Welch; knockout - wild-type -0.003, 95% CI -0.028 to 0.022, p = 0.79

Before you analyse

  1. Sample micrographs and axons by a rule fixed in advance, for example a fixed number of random non-overlapping fields per animal and every myelinated axon in them, and measure blind to genotype.
  2. Define the measurement: axon or inner-myelin diameter, diameters from areas or from minimum and maximum widths, and which axons are excluded (oblique, outfolded, unmyelinated), applying the same rules to every animal.
  3. Report axon size per animal alongside the g-ratio, and compare myelination at a common axon diameter when sizes differ.
  4. Use the animal as n; plan animals, not axons.
  5. Keep fixation and processing the same across groups, and process animals of both groups together, because tissue shrinkage during fixation and embedding changes diameters.
  6. Check cages and litters: mice in a group that share a cage or litter are not independent; use the cage or litter as the unit, or model it as a random effect (what counts as n).

Check what an AI assistant ran

  1. The assistant ran a t-test or regression on all axons. Ask for one value per animal.
  2. The assistant compared mean g-ratios when axon sizes differed between groups. Ask for the g-ratio at a common axon diameter.
  3. The assistant reported a g-ratio scatterplot slope from all axons as the result. Ask for one estimate per animal, such as its g-ratio at a common axon diameter.
  4. The assistant did not say how axons were chosen. Ask for the sampling and exclusion rules.

Report it

Axon and fibre diameters were measured blind to genotype on [80–120] myelinated axons from [10] random non-overlapping micrographs per mouse ([5] wild-type and [5] knockout). For each mouse, fibre diameter was regressed on axon diameter (the points followed a straight line in every mouse) and the g-ratio at [1] µm axon diameter was calculated; genotypes were compared with a Welch t-test on these per-mouse values (R [4.3.3]). Median axon diameter per mouse averaged [0.78] µm in wild-type and [0.79] µm in knockout mice.

In the constructed example, which has no effect built in, the g-ratio at 1 µm did not clearly differ between genotypes (knockout − wild-type [−0.003], 95% CI [−0.028] to [0.022]; p = [0.79]; n = [5] mice per genotype, [1,032] axons).

Replace the bracketed values with your own.

References

  • Chomiak T, Hu B (2009). What is the optimal value of the g-ratio for myelinated fibers in the rat CNS? A theoretical approach. PLoS ONE 4:e7754. doi:10.1371/journal.pone.0007754
  • Gow A, Dupree JL, Feinstein DL, Boullerne A (2025). A statistically-robust model of the axomyelin unit under normal physiologic conditions with application to disease states. ASN Neuro 17:2447336. doi:10.1080/17590914.2024.2447336
  • Gow A (2026). Myelin g ratios: the model is in the details. ASN Neuro 18:2612034. doi:10.1080/17590914.2025.2612034
  • Kaiser T, Allen HM, Kwon O, et al. (2021). MyelTracer: a semi-automated software for myelin g-ratio quantification. eNeuro 8:ENEURO.0558-20.2021. doi:10.1523/ENEURO.0558-20.2021

How this page was made

  • Written and published by Licklider. Recommendations cite peer-reviewed methods papers listed under References; cited passages were checked against the source text.
  • The worked example uses constructed data. Its numbers were produced by stored code (Python 3.13 with SciPy 1.18.1; R 4.3.3, base R), and the two languages print identical output; the simulation was run in Python.
  • Separate review passes checked the statistics, the citations and readability before publication.