关于「轨交步行衰减梯度:荟萃分析之读法、拟合与混淆」,《分层公地与储备金精算》给出的定量结论是什么?

结论:第四章说明轨交荟萃分析之带内平均 0.042 不能当门口溢价,漏掉公路时车站效应虚高,估计差从 0.0533 升到 0.0827。

数据口径:大修支出块状、时点随机、偶有重尾意外;示意大楼即使管理费随通胀上调,按一成计提,三十年内见底机会仍有 0.5715,计提恰好等于平均支出,也有 0.3479。 书中楼盘、线索与参数全为合成或示意;全部计算由书中程序生成;本书是非个人化分析,不构成法律、税务或投资建议,法条与比例以上架前人工复核为准;线索只处理经同意者。

English version

对照数据表

下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.0533, 0.0827

formhwyRSSAICgap 200 m vs 1,500 mextra
lineno1.4716-1975.90.0827
lineyes1.2646-2028.50.0533
expno1.4194-1986.90.0989s=900
expyes1.2187-2039.80.0686s=650
rampno1.3805-1994.90.1021k=300,1,100
rampyes1.1748-2051.00.0624k=600,700
true gap 200 m vs 1,500 m: 0.0800
查看完整验算程序
# Chapter 4. p42: fitting a walking-distance decay to synthetic listings.
# 360 synthetic listings, seed 3356. True log-price premium: 0.08 up to
# 300 m walk, falling linearly to 0 at 1,100 m, nothing beyond. A
# highway-access dummy adds 0.05 and is likelier near the station
# (probability falls with distance), the confounder Debrezion et al.
# report: adding other accessibility variables lowers the rail effect.
# Noise sd 0.06. Three forms are fitted by least squares (grid search
# for the nonlinear knot or scale, normal equations for the rest):
#   semi-log line   a + b d (+ c hwy)
#   exponential     a + p0 exp(-d / s) (+ c hwy)
#   two-knot ramp   a + p0 ramp(d; k1, k2) (+ c hwy)
# AIC = n ln(RSS / n) + 2 k. All values illustrative.
import math
import random


def solve(xs, ys):
    m = len(xs[0])
    a = [[math.fsum(r[i] * r[j] for r in xs) for j in range(m)]
         for i in range(m)]
    b = [math.fsum(r[i] * y for r, y in zip(xs, ys)) for i in range(m)]
    for c in range(m):
        piv = max(range(c, m), key=lambda r: abs(a[r][c]))
        a[c], a[piv] = a[piv], a[c]
        b[c], b[piv] = b[piv], b[c]
        for r in range(m):
            if r != c:
                f = a[r][c] / a[c][c]
                a[r] = [u - f * v for u, v in zip(a[r], a[c])]
                b[r] = b[r] - f * b[c]
    coef = [b[i] / a[i][i] for i in range(m)]
    rss = math.fsum((y - math.fsum(q * w for q, w in zip(r, coef))) ** 2
                    for r, y in zip(xs, ys))
    return coef, rss


def ramp(d, k1, k2):
    return 1.0 if d <= k1 else (0.0 if d >= k2 else (k2 - d) / (k2 - k1))


def data():
    rng = random.Random(3356)
    rows = []
    for _ in range(360):
        d = rng.uniform(50.0, 2000.0)
        hwy = 1.0 if rng.random() < 1.0 - d / 2400.0 else 0.0
        y = 0.08 * ramp(d, 300.0, 1100.0) + 0.05 * hwy
        rows.append((d, hwy, y + rng.gauss(0.0, 0.06)))
    return rows


def fit(rows, form, control):
    best = None
    grid = {"line": [None],
            "exp": [float(s) for s in range(100, 2001, 50)],
            "ramp": [(float(k1), float(k2)) for k1 in range(0, 1001, 50)
                     for k2 in range(k1 + 100, 2001, 50)]}[form]
    for g in grid:
        xs = []
        for d, hwy, _ in rows:
            if form == "line":
                f = d / 1000.0
            elif form == "exp":
                f = math.exp(-d / g)
            else:
                f = ramp(d, g[0], g[1])
            xs.append([1.0, f, hwy] if control else [1.0, f])
        coef, rss = solve(xs, [r[2] for r in rows])
        if best is None or rss < best[0]:
            best = (rss, coef, g)
    return best


def effect(form, coef, g, d):
    if form == "line":
        return coef[1] * d / 1000.0
    if form == "exp":
        return coef[1] * math.exp(-d / g)
    return coef[1] * ramp(d, g[0], g[1])


if __name__ == "__main__":
    rows = data()
    n = len(rows)
    print("form   hwy   RSS      AIC       gap 200 m vs 1,500 m  extra")
    for form in ("line", "exp", "ramp"):
        for control in (False, True):
            rss, coef, g = fit(rows, form, control)
            k = len(coef) + (0 if form == "line" else
                             (1 if form == "exp" else 2))
            aic = n * math.log(rss / n) + 2 * k
            gap = effect(form, coef, g, 200.0) - effect(form, coef, g,
                                                          1500.0)
            extra = ("" if g is None else
                     ("s={:.0f}".format(g) if form == "exp" else
                      "k={:.0f},{:,.0f}".format(g[0], g[1])))
            print("{:<5}  {:<4}  {:.4f}  {:>8.1f}  {:>20.4f}  {}".format(
                form, "yes" if control else "no", rss, aic, gap, extra))
    print("true gap 200 m vs 1,500 m: {:.4f}".format(
        0.08 * (ramp(200.0, 300.0, 1100.0) - ramp(1500.0, 300.0, 1100.0))))

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《分层地契公地博弈、储备金破产精算与高意向置业线索派单母典》第 4 章「轨交步行衰减梯度:荟萃分析之读法、拟合与混淆」(版本 1.0.0). 5D Library. DOI 待发布

DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-335 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026335,
  author    = {Fan, Yafu},
  title     = {Strata-Title Commons Games, Sinking-Fund Ruin Actuarial Science and High-Intent Property Lead Routing},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

本书其他章节结论