关于「眼轴的线性混合模型:剂量如何进入生长斜率」,《照度剂量与屈光发育》给出的定量结论是什么?
结论:第三章写出眼轴生长的线性混合模型,模拟中纵向估计每次都能检出照度效应,横断面估计只有 0.110 的机会。
数据口径:书中儿童、日程与灯具参数为示意;全部计算由书中程序生成;本书不是医疗建议,不对任何个人作效果承诺,自我试验须先咨询执业医师。 第三章写出眼轴生长的线性混合模型,模拟中纵向估计每次都能检出照度效应,横断面估计只有 0.110 的机会。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.110
| true B | -0.12 mm/y per log10 lux; 101 children, 4 visits |
| rep two-stage B SE cross B cross SE sd(slopes) | |
| 0 | -0.0783 0.0249 -0.0952 0.1598 0.0820 |
| 1 | -0.1234 0.0263 -0.2563 0.1754 0.0913 |
| 2 | -0.1184 0.0232 -0.4547 0.1729 0.0891 |
| over 200 replicates: mean B -0.1234, sd 0.0220, mean SE 0.0242 | |
| two-stage 95% intervals covering the truth | 0.990 |
| cross-sectional: mean B -0.1284, mean SE 0.1652 | |
| share of replicates with |z| > 1.96: two-stage 1.000, cross 0.110 |
核心公式
\[L_{it} = (\beta_0 + u_{0i}) + (\beta_1 + \beta_2 x_i + u_{1i})\,t + \varepsilon_{it}.\]
查看完整验算程序
# Chapter 3. p32: A linear mixed model of axial growth, simulated and
# then recovered. Child i has length a_i + s_i * t at visits t = 0, 0.5,
# 1, 1.5 years (as in Read et al. 2015), with s_i = 0.20 + B * (x_i - 3)
# + u_i, where x_i is log10 of mean daily lux. B = -0.12 mm/y per log
# unit is the published slope; spreads and noise are illustrative. We
# compare a two-stage estimator (per-child slopes, then slopes on dose)
# with a cross-sectional fit: final length on dose, divided by 1.5 y,
# which ignores that children start at different lengths. Published
# context (Read 2015): ages 10 to 15, 41 myopes and 60 non-myopes,
# baseline 24.46 and 23.24 mm, growth over the study 0.19 and 0.05 mm,
# low-light group near 459 lux, light effect P = 0.047.
import math
import random
import statistics
B = -0.12
N = 101
VISITS = (0.0, 0.5, 1.0, 1.5)
SD_A, SD_U, SD_E = 0.85, 0.08, 0.03
rng = random.Random(20261112)
def ols(xs, ys):
mx, my = statistics.fmean(xs), statistics.fmean(ys)
sxx = math.fsum((x - mx) ** 2 for x in xs)
sxy = math.fsum((x - mx) * (y - my) for x, y in zip(xs, ys))
b = sxy / sxx
res = [y - my - b * (x - mx) for x, y in zip(xs, ys)]
s2 = math.fsum(r * r for r in res) / (len(xs) - 2)
return b, math.sqrt(s2 / sxx), my - b * mx
def run(rep):
doses, slopes = [], []
finals = []
for _ in range(N):
x = rng.gauss(3.0, 0.35)
a = rng.gauss(23.7, SD_A)
s = 0.20 + B * (x - 3.0) + rng.gauss(0, SD_U)
ys = [a + s * t + rng.gauss(0, SD_E) for t in VISITS]
b_i, _, _ = ols(list(VISITS), ys)
doses.append(x)
slopes.append(b_i)
finals.append(ys[-1])
b2, se2, _ = ols(doses, slopes)
bc, sec, _ = ols(doses, finals)
span = VISITS[-1]
return b2, se2, bc / span, sec / span, statistics.pstdev(slopes)
print("true B = {:.2f} mm/y per log10 lux; {} children, {} visits"
.format(B, N, len(VISITS)))
print(" rep two-stage B SE cross B cross SE sd(slopes)")
covered, nrep, reps = 0, 200, []
for rep in range(nrep):
b2, se2, bp, sep, sds = run(rep)
covered += 1 if abs(b2 - B) <= 1.959964 * se2 else 0
reps.append((b2, se2, bp, sep, sds))
for rep in range(3):
b2, se2, bp, sep, sds = reps[rep]
print(" {:3d} {:11.4f} {:6.4f} {:7.4f} {:8.4f} {:10.4f}".format(
rep, b2, se2, bp, sep, sds))
mean_b = statistics.fmean(r[0] for r in reps)
sd_b = statistics.pstdev([r[0] for r in reps])
mean_se = statistics.fmean(r[1] for r in reps)
print("over {} replicates: mean B {:.4f}, sd {:.4f}, mean SE {:.4f}"
.format(nrep, mean_b, sd_b, mean_se))
print("two-stage 95% intervals covering the truth: {:.3f}".format(
covered / nrep))
pw2 = len([r for r in reps if abs(r[0] / r[1]) > 1.959964]) / nrep
pwc = len([r for r in reps if abs(r[2] / r[3]) > 1.959964]) / nrep
print("cross-sectional: mean B {:.4f}, mean SE {:.4f}".format(
statistics.fmean(r[2] for r in reps),
statistics.fmean(r[3] for r in reps)))
print("share of replicates with |z| > 1.96: two-stage {:.3f},"
" cross {:.3f}".format(pw2, pwc))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《户外照度剂量近视抑制、调节滞后与周边离焦光学的屈光发育母典》第 3 章「眼轴的线性混合模型:剂量如何进入生长斜率」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-189 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026189,
author = {Fan, Yafu},
title = {Outdoor Illuminance Dose, Accommodative Lag and Peripheral-Defocus Optics in Refractive Development},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}