5D Library › Finger–Brain Cortical Magnification, Distal Microneedle Afference and Computational Neurology of Post-Stroke Cognitive Network Reconstruction · 中文
Chapter 6. Drift Diffusion, Ceiling Effects and a Check of the Thesis Data
The design of the trial
Evidence
Design of Study 2 (Chapter 2 of the thesis). Patients were recruited openly in the acupuncture and brain-disease department of Tianjin Binhai New Area Hospital of Traditional Chinese Medicine; 105 were screened and 37 excluded (12 for not cooperating); 68 were randomised 1:1, with the sequence generated in SPSS 25.0 by an independent biostatistician (section 2.2.1.1), and 34 in each group completed treatment (section 2.3.1). Treatment group: “Xingnao Kaiqiao” acupuncture + basic treatment + press needles at the twelve well points of both hands; control group: “Xingnao Kaiqiao” acupuncture + basic treatment. Treatment lasted 4 weeks, with follow-up 4 weeks after the end of treatment. The main efficacy measure was the MoCA; secondary measures were the MMSE and, from “cognitive function assessment system” version 0.6.1, a colour-word test (Stroop paradigm), a figure–number test, a figure–calculation test, an attention test (Schulte grid) and a digit-span test (section 2.2.5). Inclusion: age 30–75, MoCA 18–25, CDR 0–0.5, 2 weeks to 6 months after stroke (section 2.1.3) (Lu 2024).
Several basic properties of the trial follow. It was open-label: the control group had no sham needle, and patients and practitioners knew the allocation; the text does not say whether outcome assessors were blinded. It was an add-on design: both groups received the same acupuncture and basic treatment, and the comparison is of “press needles plus daily rubbing” as a whole. It was single-centre, with 34 per group. In addition, going by the defence version used for this book, the text reports no ethics approval number, no trial registration number and no adverse-event results; the recruitment period is given as “May 2023 to April 2024” in section 2.1.1 and “June 2023 to May 2024” in section 2.3.1.
The main result: within-group comparisons cannot replace a between-group comparison
Evidence
Between-group results for the main measure (sections 2.3.2.3 and 2.3.3, Tables 2-5 and 2-8, abstract of the thesis). The thesis gives two between-group results for the MoCA. First, a 2 × 2 chi-square test of “response rates”, p = 0.287, from which it writes that press-needle stimulation “can be considered comparable in efficacy to acupuncture”. Second, a between-group comparison of post-treatment MoCA scores, P = 0.005 (section 2.3.3; one star for the treatment group in Table 2-8), and P = 0.002 at follow-up 4 weeks after treatment. Among secondary measures, post-treatment MMSE differs between groups with P < 0.001, delayed recall with P = 0.012, and the colour-word, figure–number, figure–calculation and attention tests also differ (sections 2.3.3–2.3.4). The abstract also writes “efficacy better than the control group” on the basis of each group’s within-group before–after test. Conclusion 2 of the thesis sets two sentences side by side: “efficacy comparable to the control group; the treatment group is better than the control group in improving the cognitive assessment system” (Lu 2024).
“Both groups improved significantly” does not imply “the groups differ”. Bland and Altman (2011) pointed out that testing change from baseline within each randomised group and inferring a difference between groups from it is common and highly misleading; the groups should be compared directly, usually by analysis of covariance with baseline as covariate (Bland and Altman 2011). Gelman and Stern (2006) discussed a related but different situation, in which one result is significant and the other is not and their difference need not be significant (Gelman and Stern 2006). The post-treatment score comparison of the thesis (P = 0.005) is a genuine between-group comparison and weighs more than within-group tests, but it still does not support a conclusion: it is not adjusted for baseline; the control-group cell 21.76 (24.00, 26.25) is itself inconsistent (item 2 below); the response-rate comparison of the same measure gives p = 0.287; and the trial was open-label and single-centre without a sham, with both groups in the period of spontaneous recovery after stroke.
The between-group differences in secondary measures need three provisos: with open labels, treatment-group patients expected “extra treatment”, which affects effortful timed tests; timed tests have large practice effects, and equal numbers of sessions do not remove differences in motivation; and with five computerised tests, two scales and many subscores, the thesis does not say how multiple comparisons were handled.
Timed tests and the drift-diffusion model
The author’s framework reads the faster Schulte grid times as “cognitive network reconstruction, a rising drift rate”. The numbers in Table 2-26 of the thesis are: treatment group from 80.06 s to 57.91 s, control group from 80.84 s to 74.30 s (labelled as medians and quartiles in the thesis).
The drift-diffusion model describes a two-choice decision as a random walk of evidence accumulating between two boundaries: the mean speed of accumulation is the drift rate , the boundary separation reflects caution, and the non-decision time covers perceptual encoding and motor execution (Ratcliff 1978; Ratcliff and McKoon 2008). The EZ-diffusion model of Wagenmakers and colleagues (2007) gives closed forms for accuracy and mean response time (Wagenmakers et al. 2007):
Neither Stroop colour-word interference (Stroop 1935) nor the Schulte grid is a simple two-choice task; the program below uses an illustrative two-choice task only to show a general point: a speed-up of a given size can come from three entirely different parameters.
Calculation
# Chapter 6. Faster is not the same as "better cognition": the drift-diffusion model.
# Closed forms of the EZ-diffusion model (Wagenmakers et al. 2007), scale s = 0.1,
# unbiased start: accuracy Pc = 1/(1 + exp(-a v / s^2)) and mean decision time
# (a / 2v) (1 - exp(-a v / s^2)) / (1 + exp(-a v / s^2)); mean RT = Ter + that.
# A two-choice task with baseline v = 0.20, a = 0.12, Ter = 0.45 s is made 27.7 %
# faster, the ratio of the treatment-arm Schulte times in Lu (2024) Table 2-26
# (57.91 / 80.06), by changing ONE parameter at a time. An Euler simulation checks the
# formulas. The task and parameters are illustrative, not fitted to the thesis.
import math, random
S2 = 0.01
def ez(v, a, ter):
e = math.exp(-a * v / S2)
return 1 / (1 + e), ter + a / (2 * v) * (1 - e) / (1 + e)
def solve(f, lo, hi, target):
for _ in range(80):
mid = (lo + hi) / 2
if (f(mid) - target) * (f(lo) - target) <= 0:
hi = mid
else:
lo = mid
return (lo + hi) / 2
def simulate(v, a, ter, n, rng, dt=0.001):
rts, ok = [], 0
for _ in range(n):
x, t = a / 2, 0.0
while 0 < x < a:
x += v * dt + 0.1 * math.sqrt(dt) * rng.gauss(0, 1); t += dt
ok += x >= a; rts.append(t + ter)
return ok / n, math.fsum(rts) / n
if __name__ == "__main__":
v0, a0, t0 = 0.20, 0.12, 0.45
pc0, rt0 = ez(v0, a0, t0)
target = rt0 * 57.91 / 80.06
print(f"baseline: v {v0}, a {a0}, Ter {t0} s -> accuracy {pc0:.3f},"
f" mean RT {rt0:.3f} s")
print(f"target mean RT {target:.3f} s (ratio {57.91 / 80.06:.3f})")
v1 = solve(lambda v: ez(v, a0, t0)[1], v0, 5.0, target)
a1 = solve(lambda a: ez(v0, a, t0)[1], 0.001, a0, target)
t1 = target - (rt0 - t0)
for lab, (v, a, t) in (("drift v up", (v1, a0, t0)),
("boundary a down", (v0, a1, t0)),
("non-decision Ter down", (v0, a0, t1))):
pc, rt = ez(v, a, t)
print(f" {lab:22s} v {v:.3f} a {a:.3f} Ter {t:.3f} -> accuracy {pc:.3f},"
f" RT {rt:.3f}")
print(f"control-arm ratio {74.30 / 80.84:.3f} (Table 2-26):"
" the control arm got faster too")
pcs, rts = simulate(v0, a0, t0, 3000, random.Random(1978))
print(f"Euler check (3,000 trials, dt 1 ms): accuracy {pcs:.3f}, mean RT {rts:.3f} s")
# baseline: v 0.2, a 0.12, Ter 0.45 s -> accuracy 0.917, mean RT 0.700 s
# target mean RT 0.506 s (ratio 0.723)
# drift v up v 1.064 a 0.120 Ter 0.450 -> accuracy 1.000, RT 0.506
# boundary a down v 0.200 a 0.049 Ter 0.450 -> accuracy 0.729, RT 0.506
# non-decision Ter down v 0.200 a 0.120 Ter 0.256 -> accuracy 0.917, RT 0.506
# control-arm ratio 0.919 (Table 2-26): the control arm got faster too
# Euler check (3,000 trials, dt 1 ms): accuracy 0.923, mean RT 0.710 sAt baseline the mean response time is 0.700 s and accuracy 0.917. To shorten the response time to 0.723 of its value (the ratio of the treatment group’s Schulte times), one can raise the drift rate from 0.20 to 1.064 (accuracy rises to 1.000), lower the boundary from 0.12 to 0.049 (accuracy falls to 0.729), or only shorten the non-decision time from 0.450 s to 0.256 s (accuracy unchanged). All three give exactly the same mean time. Only recording accuracy and the response-time distribution together can separate “faster information processing”, “less caution” and “more practised movement”; the Schulte grid records only total time and has none of this information. The control group also became 8 % faster (74.30/80.84 = 0.919). An Euler simulation (3,000 trials) gives a mean response time about 1.4 % longer than the closed form, the overshoot bias of a discrete time step.
The MoCA ceiling and the correct analysis
The MoCA has a maximum of 30, its authors suggested 26 as the normal cut-off, and it is more sensitive than the MMSE to mild cognitive impairment (Nasreddine et al. 2005). The thesis enrolled patients with MoCA 18–25; the treatment group’s MoCA after treatment is labelled as a median of 27.67 (25.00, 28.00) (Table 2-13), already close to the maximum. Wu and colleagues (2019) studied the responsiveness and minimal clinically important difference of the MoCA in 65 stroke patients in rehabilitation: after 4–5 weeks of therapy the standardised response mean was 0.67, and 50.77 % and 30.77 % of patients exceeded the minimal clinically important difference by anchor-based and distribution-based methods (Wu et al. 2019) (this round of checking did not obtain the point values given in that paper, so Chapter 8 does not quote them).
A scale with a ceiling causes two problems. First, patients near the ceiling have no room to improve, which compresses group differences. Second, cutting a continuous score into “responder/non-responder” discards much information. The correct approach is analysis of covariance with the baseline score as covariate (Vickers and Altman 2001); when a sizeable share reach the ceiling, a Tobit model can treat 30 as a censored value (Tobin 1958). The program below is the author’s model: it simulates a trial with the same inclusion range as the thesis and compares the power of five analyses.
Calculation
# Chapter 6. MoCA ceiling and the choice of analysis (the author's model). Baseline latent
# ~ N(21.5, 2.5^2), observed = round(latent + N(0,1)) kept if 18-25; after 4 weeks the
# latent rises 4.0 +- 2.0 (+ delta if treated); observed = min(30, round(...)).
# Tests (two-sided 0.05): responder rule (post - pre)/pre >= 25 % by chi-square; Mann-
# Whitney on post; t on change; ANCOVA; ANCOVA on the uncensored latent score.
# B: large sample, ANCOVA estimate vs a Tobit model (EM algorithm, censoring at 29.5).
import math, random, statistics
ND = statistics.NormalDist()
def patient(rng, delta):
while True:
lat = rng.gauss(21.5, 2.5); pre = round(lat + rng.gauss(0, 1))
if 18 <= pre <= 25:
break
post_lat = lat + rng.gauss(4.0, 2.0) + delta + rng.gauss(0, 1)
return pre, min(30, round(post_lat)), post_lat
def solve3(A, b):
m = [A[i][:] + [b[i]] for i in range(3)]
for c in range(3):
p = max(range(c, 3), key=lambda r: abs(m[r][c])); m[c], m[p] = m[p], m[c]
for r in range(3):
if r != c:
f = m[r][c] / m[c][c]
m[r] = [x - f * y for x, y in zip(m[r], m[c])]
return [m[i][3] / m[i][i] for i in range(3)]
def ancova(y, arm, base):
X = [(1.0, a, b) for a, b in zip(arm, base)]
XtX = [[math.fsum(x[i] * x[j] for x in X) for j in range(3)] for i in range(3)]
Xty = [math.fsum(x[i] * v for x, v in zip(X, y)) for i in range(3)]
beta = solve3(XtX, Xty)
res = [v - math.fsum(bb * xx for bb, xx in zip(beta, x)) for x, v in zip(X, y)]
s2 = math.fsum(r * r for r in res) / (len(y) - 3)
inv1 = solve3(XtX, [0.0, 1.0, 0.0])[1]
return beta[1], beta[1] / math.sqrt(s2 * inv1)
def mwu_z(a, b):
allv = sorted([(v, 0) for v in a] + [(v, 1) for v in b]); ranks = {}; i = 0; tie = 0
while i < len(allv):
j = i
while j + 1 < len(allv) and allv[j + 1][0] == allv[i][0]:
j += 1
ranks[allv[i][0]] = (i + j) / 2 + 1; t = j - i + 1; tie += t ** 3 - t; i = j + 1
n1, n2 = len(a), len(b); n = n1 + n2
U = math.fsum(ranks[v] for v in a) - n1 * (n1 + 1) / 2
var = n1 * n2 / 12 * ((n + 1) - tie / (n * (n - 1)))
return (U - n1 * n2 / 2) / math.sqrt(var)
def trial(rng, n, delta):
rows = [(1, *patient(rng, delta)) for _ in range(n)] + \
[(0, *patient(rng, 0.0)) for _ in range(n)]
arm = [r[0] for r in rows]; pre = [r[1] for r in rows]; post = [r[2] for r in rows]
resp = [[sum(1 for r in rows if r[0] == g and (r[2] - r[1]) / r[1] >= 0.25),
sum(1 for r in rows if r[0] == g and (r[2] - r[1]) / r[1] < 0.25)]
for g in (1, 0)]
R = [n, n]; C = [resp[0][0] + resp[1][0], resp[0][1] + resp[1][1]]
chi = math.fsum((resp[i][j] - R[i] * C[j] / (2 * n)) ** 2 / (R[i] * C[j] / (2 * n))
for i in range(2) for j in range(2) if C[j] > 0)
z = mwu_z([r[2] for r in rows if r[0]], [r[2] for r in rows if not r[0]])
ch = [r[2] - r[1] for r in rows]
c1 = [c for c, a in zip(ch, arm) if a]; c0 = [c for c, a in zip(ch, arm) if not a]
m1, m0 = math.fsum(c1) / n, math.fsum(c0) / n
sp = (math.fsum((c - m1) ** 2 for c in c1) + math.fsum((c - m0) ** 2 for c in c0))
tchg = (m1 - m0) / math.sqrt(sp / (2 * n - 2) * 2 / n)
t_anc = ancova(post, arm, pre)[1]; t_lat = ancova([r[3] for r in rows], arm, pre)[1]
crit = 1.9966 if n == 34 else 1.9790 # t quantiles, df 66 / 126
return (chi > 3.8415, abs(z) > 1.96, abs(tchg) > crit, abs(t_anc) > crit,
abs(t_lat) > crit, sum(1 for r in rows if r[0] and r[2] == 30) / n)
def tobit_em(y, arm, base, c=29.5, it=200):
beta, s = [10.0, 0.0, 0.8], 2.0
for _ in range(it):
ys, e2 = [], []
for v, a, b in zip(y, arm, base):
mu = beta[0] + beta[1] * a + beta[2] * b
if v >= 30:
al = (c - mu) / s; lam = ND.pdf(al) / max(1e-300, 1 - ND.cdf(al))
m1 = mu + s * lam; v2 = s * s * (1 + al * lam - lam * lam)
ys.append(m1); e2.append(v2)
else:
ys.append(v); e2.append(0.0)
X = [(1.0, a, b) for a, b in zip(arm, base)]
XtX = [[math.fsum(x[i] * x[j] for x in X) for j in range(3)] for i in range(3)]
beta = solve3(XtX, [math.fsum(x[i] * v for x, v in zip(X, ys)) for i in range(3)])
s = math.sqrt(math.fsum((v - beta[0] - beta[1] * a - beta[2] * b) ** 2 + w
for v, a, b, w in zip(ys, arm, base, e2)) / len(y))
return beta[1]
if __name__ == "__main__":
rng = random.Random(30)
labs = ("responder chi2", "Mann-Whitney post", "t on change", "ANCOVA",
"ANCOVA, no ceiling")
for n, delta in ((34, 1.5), (34, 0.0), (64, 1.5)):
res = [trial(rng, n, delta) for _ in range(800)]
pw = [sum(r[k] for r in res) / len(res) for k in range(5)]
top = math.fsum(r[5] for r in res) / len(res)
print(f"n = {n}/arm, delta = {delta}: share of treated at 30 = {top:.2f}")
print(" power: " + "; ".join(f"{l} {p:.2f}" for l, p in zip(labs[:3], pw)))
print(" " + "; ".join(f"{l} {p:.2f}" for l, p in zip(labs[3:], pw[3:])))
rows = [(1, *patient(rng, 1.5)) for _ in range(1500)] + \
[(0, *patient(rng, 0.0)) for _ in range(1500)]
arm = [r[0] for r in rows]; pre = [r[1] for r in rows]; post = [r[2] for r in rows]
lat = ancova([r[3] for r in rows], arm, pre)[0]
print("B. 1,500/arm, true latent effect 1.5: ANCOVA on observed scores"
f" {ancova(post, arm, pre)[0]:.2f};")
print(f" Tobit (EM) {tobit_em(post, arm, pre):.2f}; ANCOVA on the latent scores"
f" {lat:.2f}")
# n = 34/arm, delta = 1.5: share of treated at 30 = 0.21
# power: responder chi2 0.43; Mann-Whitney post 0.52; t on change 0.68
# ANCOVA 0.69; ANCOVA, no ceiling 0.72
# n = 34/arm, delta = 0.0: share of treated at 30 = 0.09
# power: responder chi2 0.04; Mann-Whitney post 0.05; t on change 0.05
# ANCOVA 0.05; ANCOVA, no ceiling 0.05
# n = 64/arm, delta = 1.5: share of treated at 30 = 0.20
# power: responder chi2 0.69; Mann-Whitney post 0.78; t on change 0.91
# ANCOVA 0.92; ANCOVA, no ceiling 0.94
# B. 1,500/arm, true latent effect 1.5: ANCOVA on observed scores 1.43;
# Tobit (EM) 1.60; ANCOVA on the latent scores 1.60In simulations with 34 per group and a true effect of 1.5 points, about 21 % of the treatment group reach 30 after treatment. A chi-square test of the thesis’s response rule (sign corrected) has power of only 0.43; a Mann–Whitney test of post-treatment scores 0.52; a t test of change scores 0.68; analysis of covariance 0.69; and analysis of covariance without the ceiling would reach 0.72. Without an effect, all five methods have type I error rates of 0.04–0.05. With 64 per group, analysis of covariance has power 0.92, while the response-rate chi-square still has only 0.69. Part B shows another consequence of the ceiling in a large sample: with a true latent effect of 1.5 points, analysis of covariance of observed scores estimates 1.43, pulled down by the ceiling; a Tobit model fitted by the EM algorithm estimates 1.60, matching the 1.60 of analysis of covariance of the latent scores (both slightly above 1.5, within the sampling error for 1,500 per group).
A table-by-table check
The thesis prints a great many tables in full, which makes it possible to check whether the numbers are consistent without access to raw data. The GRIM test of Brown and Heathers (2017) uses exactly this kind of constraint: the mean of integer data can take only certain values (Brown and Heathers 2017). Medians have a similar constraint: the median of 34 integers is the average of the 17th and 18th values and can only be a whole number or end in .5. Methods for estimating a mean from a median and quartiles are discussed elsewhere (Wan et al. 2014). The program below uses only numbers printed in the thesis.
Calculation
# Chapter 6. Checks on summaries printed in Lu (2024) as "M (P25, P75)". DATA: all 60
# integer-scale cells of Tables 2-4, 2-8 to 2-12, 2-14, 2-22 (integer scoring of computer
# tests assumed): table, item, treatment M P25 P75, control M P25 P75. C1 granularity,
# C2 IQR and item maximum, C3 duplicates, C4 Table 2-5, C5 baseline tests, C6 response
# rule, C7 sample size, C8 Table 1-3, C9 p columns.
import math, statistics
DATA = """2-4 MoCA 20.24 19 21 19.94 18 21.25|2-4 MMSE 21.24 19 23 20.91 19.8 22|
2-4 CDR 0.247 0 0.5 0.247 0 0.5|2-4 SDS 32.03 28 35 33.50 30 36.25|
2-8 MoCA 27.67 25 28 21.76 24 26.25|2-8 MMSE 23.35 20 26 20.91 13 16|
2-9 visuospatial 3.32 3 3.25 3.32 3 4|2-9 naming 2.47 2 3 2.41 2 3|
2-9 attention 4.26 3 5 4.26 3.75 5|2-9 language 1.83 1 2.25 1.91 1 2.25|
2-9 abstraction 1.88 2 2 1.79 2 2|2-9 recall 1.64 1 2 1.61 1 2|
2-9 orientation 4.82 4 6 4.79 4 5|2-10 visuospatial 4.06 3 5 3.82 3 4|
2-10 naming 2.97 3 3 3.06 3 3|2-10 attention 5.23 5 6 5.09 5 6|
2-10 language 2.85 3 3 2.94 3 3|2-10 abstraction 2.00 2 2 2.09 2 2|
2-10 recall 3.55 3 4 3.05 3 4|2-10 orientation 5.03 4 6 5.09 5 5.25|
2-11 colour-word 17.61 13 23 16.85 14 19.25|
2-11 figure-number 11.74 8 15 10.09 7 14|
2-11 figure-calc 7.09 5 8.25 6.76 5 8.25|2-11 digit-span 3.50 3 4 3.44 3 4|
2-12 colour-word 23.35 20 26 20.91 13 16|
2-12 figure-number 17.08 16 19 14.67 13 16|
2-12 figure-calc 9.41 8 11 7.91 6 9|2-12 digit-span 5.35 5 6 5.24 4 6|
2-14 MoCA 25.50 23 27 24.24 22.5 25|2-22 MMSE 27.44 27 28 23.73 22 24.25"""
MAXI = {"visuospatial": 5, "naming": 3, "attention": 6, "language": 3, "abstraction": 2,
"recall": 5, "orientation": 6}
N = 34
CELLS = []
for rec in DATA.replace("\n", "").split("|"):
t, item, *v = rec.split()
for arm, k in (("treat", 0), ("ctrl", 3)):
CELLS.append((t, item, arm, *map(float, v[k:k + 3])))
def chi2_p(x, df):
if df == 1:
return math.erfc(math.sqrt(x / 2))
if df == 3:
return math.erfc(math.sqrt(x / 2)) + math.sqrt(2 * x / math.pi) * math.exp(-x / 2)
raise ValueError
def pearson(rows):
R = [sum(r) for r in rows]; C = [sum(c) for c in zip(*rows)]; T = sum(R)
return math.fsum((rows[i][j] - R[i] * C[j] / T) ** 2 / (R[i] * C[j] / T)
for i in range(len(R)) for j in range(len(C)))
def t_p(t, df): # two-sided p of Student t, exact series for even df
th = math.atan(abs(t) / math.sqrt(df)); c2 = math.cos(th) ** 2; term = acc = 1.0
for k in range(1, df // 2):
term *= c2 * (2 * k - 1) / (2 * k); acc += term
return 1 - math.sin(th) * acc
step = lambda item: 0.5 if item == "CDR" else 1.0
half = lambda c: c[3] / (step(c[1]) / 2)
med = [c for c in CELLS if abs(half(c) - round(half(c))) < 1e-9]
print(f"C1 {len(CELLS)} cells: {len(CELLS) - len(med)} cannot be the median of 34 scores;"
f" the {len(med)} that can:\n " + ", ".join(f"{c[3]:.2f}" for c in med))
def mean_ok(v, st):
return any(abs(math.floor(100 * k * st / N) / 100 - v) < 1e-9 or
abs(round(k * st / N, 2) - v) < 1e-9 for k in range(int(40 * N / st)))
odd = [c for c in CELLS if not mean_ok(c[3], step(c[1]))]
print(" as a mean of 34 scores (2 decimals, cut or rounded), incompatible:\n " +
", ".join(f"{c[3]:g} ({c[0]})" for c in odd))
print("C2 M outside its own IQR (Q1, Q3), or above the item maximum:")
for t, item, arm, m, q1, q3 in CELLS:
over = item in MAXI and t in ("2-9", "2-10") and m > MAXI[item]
if m < q1 - 1e-9 or m > q3 + 1e-9 or over:
flag = f" ABOVE MAXIMUM {MAXI[item]}" if over else ""
print(f" Table {t:5s} {item + ', ' + arm:20s} {m:6.2f} ({q1:g}, {q3:g}){flag}")
lo, mid, hi = 8, 18, 8 # observations below P25 / inside / above P75
need_low = (N * 21.76 - mid * 24 - hi * 26.25) / lo
need_high = (N * 20.91 - lo * 13 - mid * 16) / hi
print(f" if 21.76 (24, 26.25) were a mean, the {lo} lowest would average"
f" <= {need_low:.1f}"
"\n (all were 18-25 at entry);")
print(f" if 20.91 (13, 16) were a mean, the {hi} highest colour-word scores would"
" average"
f"\n >= {need_high:.1f} (treatment-arm P75 after treatment: 26)")
row = lambda t, it: [c[3:] for c in CELLS if c[0] == t and c[1] == it]
print("C3 Table 2-8 'MMSE' = Table 2-12 'colour-word', both arms:",
row("2-8", "MMSE") == row("2-12", "colour-word"))
cw = row("2-12", "colour-word")[1]
print(" its control 20.91 = control baseline MMSE, Table 2-4:",
cw[0] == row("2-4", "MMSE")[1][0])
print(" its control (13, 16) = control figure-number IQR, Table 2-12:",
cw[1:] == row("2-12", "figure-number")[1][1:])
tx = (0, 2, 26, 8); ct = (0, 0, 22, 12)
print(f"C4 Table 2-5, treatment counts {tx}: sum {sum(tx)} (n = 34);"
f"\n (2 + 26)/34 = {28 / 34:.1%} vs 'total effective 76.4 %'")
for lab, a in (("26 vs 22 effective", 26), ("28 vs 22 effective", 28)):
x = pearson([[a, 34 - a], [22, 12]])
print(f" {lab}: Pearson chi2 = {x:.3f}, p = {chi2_p(x, 1):.3f}")
rows = [[26, 8], [22, 12]]; R = [34, 34]; C = [48, 20]
yates = math.fsum((abs(rows[i][j] - R[i] * C[j] / 68) - 0.5) ** 2 / (R[i] * C[j] / 68)
for i in range(2) for j in range(2))
print(f" 26 vs 22 with Yates correction: chi2 = {yates:.3f},"
f" p = {chi2_p(yates, 1):.3f}")
print(" -> p = 0.287 fits 26/34 effective (uncorrected); counts summing to 34 with 26"
"\n effective: (0, 2, 24, 8) or (0, 0, 26, 8)")
print("C5 baseline tests re-computed from the printed summaries")
for lab, m1, s1, m2, s2, rep in (
("age (Table 2-3)", 61.70, 9.98, 65.52, 7.94, "-1.747, 0.085"),
("days since stroke", 52.67, 51.04, 37.88, 36.60, "1.373, 0.174")):
t = (m1 - m2) / math.sqrt((s1 ** 2 + s2 ** 2) / N)
print(f" {lab:17s} t = {t:+.3f}, p = {t_p(t, 2 * N - 2):.3f} (reported {rep})")
x = pearson([[24, 10], [23, 11]]); x2 = pearson([[7, 20, 5, 2], [10, 13, 7, 4]])
print(f" sex: chi2 = {x:.3f}, p = {chi2_p(x, 1):.3f} (Table 2-6: 0.069, 0.793;"
" text calls 0.069 the p)")
print(f" education: chi2 = {x2:.3f}, p = {chi2_p(x2, 3):.3f} (Table 2-7: 3.014, 0.389)")
print("C6 response rule: the printed (pre - post)/pre is negative for any improvement.")
print(" Sign reversed, (post - pre)/pre, the largest rate reachable with MoCA <= 30:")
print(" baseline: " + " ".join(f"{b}:{(30 - b) / b:.0%}" for b in range(18, 26)))
print(" 'cured' (>= 75 %) is unreachable for every eligible patient; 'effective'"
" (>= 25 %)\n needs a perfect 30 at baseline 24 and is impossible at 25")
z = statistics.NormalDist().inv_cdf
d = (25.88 - 22.96) / math.sqrt((4.83 ** 2 + 2.88 ** 2) / 2)
for lab, za in (("two-sided 0.05", z(0.975)), ("one-sided 0.05", z(0.95))):
nn = 2 * (za + z(0.80)) ** 2 / d ** 2 + za ** 2 / 4
print(f"C7 sample size, d = {d:.3f}, 80 % power, {lab}: {math.ceil(nn)} per arm"
if lab.startswith("two") else f" {lab}: {math.ceil(nn)} per arm"
" (thesis: 25)")
print(f" 20 % dropout: 25 / 0.8 = {25 / 0.8:.2f} -> 32 per arm (thesis: 25 x 1.2 = 30)")
T13 = (("Baihui", 127, 73.83), ("Sishencong", 68, 39.53), ("Shenting", 63, 36.72),
("Zusanli", 51, 29.65), ("Fengchi", 47, 27.33), ("Neiguan", 43, 40.03),
("Sanyinjiao", 40, 23.26), ("Shenmen", 38, 22.09), ("Yintang", 23, 13.37))
off = [(p, f, r, 100 * f / 172) for p, f, r in T13 if abs(100 * f / 172 - r) > 0.06]
print(f"C8 Table 1-3, f/172 against the printed %:"
f" {len(T13) - len(off)} of {len(T13)} agree;")
for p, f, r, c in off:
print(f" {p}: {f}/172 = {c:.2f} %, printed {r} %")
print("C9 p columns of Tables 2-8, 2-10, 2-12 are unlabelled; they match the treatment")
print(" arm's within-group p (2-10 orientation 0.407 = Table 2-21; 2-12 all < 0.001 =")
print(" Tables 2-23 to 2-27). Conflicting baseline p: MMSE 0.511 (Table 2-4) vs 0.661")
print(" (2.3.4(1)); digit span 0.648 (Table 2-11) vs 0.759 (2.3.4(6))")
# C1 60 cells: 56 cannot be the median of 34 scores; the 4 that can:
# 33.50, 2.00, 3.50, 25.50
# as a mean of 34 scores (2 decimals, cut or rounded), incompatible:
# 0.247 (2-4), 0.247 (2-4), 1.83 (2-9)
# C2 M outside its own IQR (Q1, Q3), or above the item maximum:
# Table 2-8 MoCA, ctrl 21.76 (24, 26.25)
# Table 2-8 MMSE, ctrl 20.91 (13, 16)
# Table 2-9 visuospatial, treat 3.32 (3, 3.25)
# Table 2-9 abstraction, treat 1.88 (2, 2)
# Table 2-9 abstraction, ctrl 1.79 (2, 2)
# Table 2-10 naming, treat 2.97 (3, 3)
# Table 2-10 naming, ctrl 3.06 (3, 3) ABOVE MAXIMUM 3
# Table 2-10 language, treat 2.85 (3, 3)
# Table 2-10 language, ctrl 2.94 (3, 3)
# Table 2-10 abstraction, ctrl 2.09 (2, 2) ABOVE MAXIMUM 2
# Table 2-12 colour-word, ctrl 20.91 (13, 16)
# if 21.76 (24, 26.25) were a mean, the 8 lowest would average <= 12.2
# (all were 18-25 at entry);
# if 20.91 (13, 16) were a mean, the 8 highest colour-word scores would average
# >= 39.9 (treatment-arm P75 after treatment: 26)
# C3 Table 2-8 'MMSE' = Table 2-12 'colour-word', both arms: True
# its control 20.91 = control baseline MMSE, Table 2-4: True
# its control (13, 16) = control figure-number IQR, Table 2-12: True
# C4 Table 2-5, treatment counts (0, 2, 26, 8): sum 36 (n = 34);
# (2 + 26)/34 = 82.4% vs 'total effective 76.4 %'
# 26 vs 22 effective: Pearson chi2 = 1.133, p = 0.287
# 28 vs 22 effective: Pearson chi2 = 2.720, p = 0.099
# 26 vs 22 with Yates correction: chi2 = 0.637, p = 0.425
# -> p = 0.287 fits 26/34 effective (uncorrected); counts summing to 34 with 26
# effective: (0, 2, 24, 8) or (0, 0, 26, 8)
# C5 baseline tests re-computed from the printed summaries
# age (Table 2-3) t = -1.747, p = 0.085 (reported -1.747, 0.085)
# days since stroke t = +1.373, p = 0.174 (reported 1.373, 0.174)
# sex: chi2 = 0.069, p = 0.793 (Table 2-6: 0.069, 0.793; text calls 0.069 the p)
# education: chi2 = 3.014, p = 0.389 (Table 2-7: 3.014, 0.389)
# C6 response rule: the printed (pre - post)/pre is negative for any improvement.
# Sign reversed, (post - pre)/pre, the largest rate reachable with MoCA <= 30:
# baseline: 18:67% 19:58% 20:50% 21:43% 22:36% 23:30% 24:25% 25:20%
# 'cured' (>= 75 %) is unreachable for every eligible patient; 'effective' (>= 25 %)
# needs a perfect 30 at baseline 24 and is impossible at 25
# C7 sample size, d = 0.734, 80 % power, two-sided 0.05: 31 per arm
# one-sided 0.05: 24 per arm (thesis: 25)
# 20 % dropout: 25 / 0.8 = 31.25 -> 32 per arm (thesis: 25 x 1.2 = 30)
# C8 Table 1-3, f/172 against the printed %: 7 of 9 agree;
# Shenting: 63/172 = 36.63 %, printed 36.72 %
# Neiguan: 43/172 = 25.00 %, printed 40.03 %
# C9 p columns of Tables 2-8, 2-10, 2-12 are unlabelled; they match the treatment
# arm's within-group p (2-10 orientation 0.407 = Table 2-21; 2-12 all < 0.001 =
# Tables 2-23 to 2-27). Conflicting baseline p: MMSE 0.511 (Table 2-4) vs 0.661
# (2.3.4(1)); digit span 0.648 (Table 2-11) vs 0.759 (2.3.4(6))The items below follow the order “table, original text, problem, possible correction”. We have no access to the raw data, so these are questions for the thesis author to check, not judgements about the authenticity of the data; most of them are probably slips in typesetting, copying or tidying statistical output.
- The values of the “medians” (C1). The thesis reports scale and test results as “M (P25, P75)”. The program checks all 60 integer-scale cells of Tables 2-4, 2-8 to 2-12, 2-14 and 2-22 (Schulte times excluded; integer scoring of the computer tests is this book’s assumption); 56 cannot be the median of 34 integers, for example MoCA 20.24 and 27.67 and CDR 0.247; only 33.50, 2.00, 3.50 and 25.50 can. A median interpolated from grouped data in SPSS can also end in other decimals, but that is incompatible with the integer quartiles and with M lying outside its interquartile range. “M” is probably a mean: the abstract speaks of the “mean” scores rising, Figure 2-6 is a bar chart with error bars, and all 60 cells except CDR 0.247 and 1.83 (printed 1.82 for the same cell in Table 2-19) are compatible with a mean of 34 integers to two decimals. Suggestion: state whether these are means or medians, and report standard deviations.
- Values outside the interquartile range or above the maximum (C2). Eleven cells lie outside their own interquartile range. Most are MoCA subscores on 0–6 points (such as abstraction 1.88 (2.00, 2.00)), which can happen for means of skewed data. Four, however, are impossible or hard to accept. In Table 2-10 the control group’s post-treatment naming 3.06 (3.00, 3.00) and abstraction 2.09 (2.00, 2.00) exceed the item maxima (3 and 2 points in the Beijing version), so no summary of any kind can take these values. In Tables 2-8 and 2-13 the control group’s post-treatment MoCA 21.76 (24.00, 26.25), if a mean, would need the lowest 8 to average no more than about 12.2, although all were 18–25 at entry and the control group’s within-group improvement is marked P < 0.001; the bar in Figure 2-6 is about 25 by eye. In Tables 2-12 and 2-23 the control group’s post-treatment colour-word score 20.91 (13.00, 16.00), if a mean, would need the highest 8 to average at least about 39.9, whereas the treatment group’s P75 after treatment is only 26. Suggestion: check the original output for these four cells.
- A duplicated and spliced row (C3). The MMSE row of Table 2-8 (treatment 23.35 (20.00, 26.00), control 20.91 (13.00, 16.00)) is identical to the colour-word row of Table 2-12; and in that cell the control value 20.91 equals the control group’s baseline MMSE in Table 2-4, while (13.00, 16.00) equals the control group’s figure–number quartiles in Table 2-12, so it was probably carried over from other rows. Table 2-22 gives post-treatment MMSE values of 27.44 (27.00, 28.00) and 23.73 (22.00, 24.25), consistent with Figure 2-6. Suggestion: replace the MMSE row of Table 2-8 with the numbers of Table 2-22 and check the control colour-word cell.
- The response table (C4, Table 2-5). The treatment group’s “cured 0, marked 2, effective 26, ineffective 8” add up to 36, while each group had 34; (2 + 26)/34 = 82.4 %, not the “total response 76.4 %”; there are also typesetting slips such as “64.7.7 %”, “35.3.3 %” and “n=0.0”. The program shows that the reported p = 0.287 is exactly the uncorrected Pearson chi-square test for “26/34 against 22/34 responders” (χ² = 1.133), whereas “28/34 against 22/34” gives p = 0.099, and with Yates’s correction p = 0.425. One possible correction: the treatment group’s “effective” count should be 24 (70.6 %), with 26 responders in total, 76.5 % (printed 76.4 %, consistent with truncation); another possibility is that “marked” should be 0. Either makes the counts add up to 34 with 26 responders.
- The efficacy formula (C6). The “reduction rate = (MoCA before − MoCA after) / score before × 100 %” of section 2.2.5.3 is the form used for scales on which lower is better; applied to the MoCA, any improvement gives a negative value; the same section’s “while the MoCA score falls below 12.68 ± 8.75” also runs against the direction of the MoCA. Even if the formula is changed to (after − before) / before, the 30-point ceiling means that a patient with baseline 18 can reach at most 67 %, so no patient can reach “cured” (≥ 75 %); a patient with baseline 24 must reach the maximum to count as “effective”, and a patient with baseline 25 cannot be “effective” at all. Suggestion: use analysis of covariance with the baseline score as covariate for the main analysis; if response rates are reported, define them by a pre-specified threshold that does not depend on baseline (for example, a rise of a given number of points).
- Sample size (C7). Section 2.2.1.2 obtained 25 per group in PASS from the means and standard deviations of an earlier study (22.96 ± 4.83 against 25.88 ± 2.88). From these numbers the standardised effect is 0.734, and two-sided α = 0.05 with 80 % power needs about 31 per group, or about 24 one-sided; the formula in the thesis is printed as an image, so its sidedness and power could not be checked. Moreover, the correct allowance for 20 % dropout is 25/0.8 = 31.25, that is 32 per group, not 25 × 1.2 = 30; and the sample size was computed for a t test of means while the main analysis used a chi-square test of response rates and rank-sum tests, which do not match. Note also that in the earlier study cited, the post-treatment mean of the “treatment group” (22.96) was lower than that of the “control group” (25.88).
- Frequencies in the network part (C8, Table 1-3). Of 9 checkable percentages, 7 agree with “count/172”; Shenting 63/172 should be 36.63 % (printed 36.72 %) and Neiguan 43/172 should be 25.00 % (printed 40.03 %). Shenmen appears twice in the table. Section 1.1.7.7 also gives Shenting “a frequency of 68” and Fengchi “49 times”, inconsistent with 63 and 47 in Table 1-3.
- What the p columns mean, and two baseline conflicts (C9). In the tables of the thesis a star marks a between-group comparison and a hash a comparison with baseline, but the p columns of Tables 2-8, 2-10 and 2-12 are not labelled. Their values agree closely with the treatment group’s within-group p: orientation 0.407 in Table 2-10 is the treatment group’s within-group p in Table 2-21, the five values < 0.001 in Table 2-12 agree with Tables 2-23 to 2-27, and the < 0.001 of Table 2-8 with Tables 2-13 and 2-22 (abstraction in Table 2-10 is the only exception). Read this way, the MoCA “< 0.001” of Table 2-8 does not contradict P = 0.005 in the text and the single star, and digit span and figure–calculation are not contradictory either. Only two real conflicts remain, both baseline p values: MMSE 0.511 in Table 2-4 against 0.661 in section 2.3.4(1), and digit span 0.648 in Table 2-11 against 0.759 in section 2.3.4(6). Suggestion: label the p columns in the table notes and reconcile the two baseline p values.
- Other contradictions in the text. Section 2.3.2.1 calls the chi-square value 0.069 of the sex comparison a p value (Table 2-6: χ² = 0.069, p = 0.793); section 2.3.1 gives the treatment group’s age 61.70 ± 9.98 years and 52.67 ± 51.04 days since stroke as figures for all 68 patients; “not significantly lower (P = 0.002 < 0.05)” in section 2.3.3 and “no significant increase (P < 0.001)” in section 2.3.4(2) contradict themselves; “P = 0.012 > 0.05” in section 2.3.3(3) has the inequality reversed; and the control group’s baseline abstraction is 1.61 (1.00, 2.00) in Table 2-17 but 1.79 (2.00, 2.00) in Table 2-9.
Chapter summary
Study 2 was an open-label, add-on, single-centre trial with 34 per group. The thesis gives two between-group results for the MoCA: response rates p = 0.287 (“comparable efficacy”) and post-treatment scores P = 0.005; the latter is unadjusted for baseline, its control cell is inconsistent and there was no sham, so it still does not support a conclusion; “better than the control group” in the abstract partly rests on within-group before–after tests, and comparisons with baseline within groups cannot replace a comparison between groups. Faster timed tests can come from drift rate, boundary or non-decision time. The MoCA has a ceiling of 30; a response-rate chi-square test wastes most of the information, analysis of covariance has clearly higher power, and a Tobit model can correct the underestimate caused by the ceiling. The table-by-table check found that 56 of 60 integer-scale cells cannot be medians; four cells are impossible or hard to accept even as means (two above the item maximum); an MMSE row duplicates the colour-word data; the response table’s counts disagree, while p = 0.287 matches 26/34 against 22/34 responders; the efficacy formula runs in the wrong direction; the sample-size calculation does not match the analysis; and the p columns are unlabelled, with two conflicting baseline p values. These problems need checking by the thesis author against the raw data.
References
Fan, Y. (2026). Finger–Brain Cortical Magnification, Distal Microneedle Afference and Computational Neurology of Post-Stroke Cognitive Network Reconstruction: From Complex-Network Pinning Control and Thalamocortical 10 Hz Alpha Restoration to Drift-Diffusion Models, Read Beside the Twelve Jing-Well Points of the Lingshu [指—脑皮层放大、远端微针传入与卒中后认知网络重建的计算神经学] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.23839915 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).