5D Library › Biomathematical Models of Sub-Perceptual Tryptamine Pharmacokinetics, 5-HT2A Receptor Desensitisation and Neuroplastic Window Dynamics · 中文
Chapter 8. Practice and a Pre-Registered Test
Note
This chapter is a study protocol and a way of reading the literature, not a guide to use. The checklist helps a reader put the questions clearly. The protocol is a draft design for reference by independent research institutions, and can only be carried out in a jurisdiction where the required regulatory authorisation has been obtained, by a qualified team, after ethics review and trial registration. The chapter gives no dose, source, route or course of use; the exposure level in the protocol is written throughout as “the level specified by an approved study protocol in that jurisdiction”, to be filled in by the conducting institution under its own authorisation. The book does not recommend that anyone use any substance it discusses.
Part one: a four-step checklist
The first seven chapters condense into a four-step checklist for reading any claim that a sub-perceptual exposure brings some benefit.
- The chain and its direction. How many links does the claim have? Does any link run opposite to the mathematics it appeals to (Chapter 2’s blunting of the peak, Chapter 4’s rising cumulative effect)? Does “sub-perceptual” mean a subjective threshold, a measurement detection limit, or an assumed effect threshold (Chapter 1)?
- The parameters. Have the parameters the claim depends on been measured in humans, or only in high-exposure animal work (Chapters 2 and 4)? Does the model’s conclusion hold for one value of the parameter, or across its whole plausible range?
- The measurement. Is the index used the same thing as the conclusion claimed? How does the index’s sensitivity to noise compare with its sensitivity to the effect sought (Chapter 5: a 1-bit rise in entropy needs only 4.6 % added noise variance)? Are window length and data quality matched between conditions?
- Blinding and expectancy. Is there a placebo control? Was blind integrity measured? If not, how large an observed difference could pure expectancy explain at a plausible correct-guess rate (Chapter 3: a 40 % correct-guess rate with a 0.5 SD expectancy effect explains a 0.20 SD difference)?
Applied to the prevailing account of sub-perceptual microdosing, the checklist gives the table below.
| Step | The prevailing account | What it can support |
|---|---|---|
| Chain and direction | Six links; the second and fourth run opposite; three senses of “sub-perceptual” conflated | Fails as a statement of mechanism; survives as a reason to run one decent trial |
| Parameters | The key parameters ( for the acetylated prodrug, the human 5-HT2A recovery half-life , and ) are all unmeasured in humans | Models can give only conditional conclusions; specific dosing schedules cannot be derived from the pharmacology |
| Measurement | Connectivity entropy is indistinguishable from noise; short-window bias is the same size as the effect | Entropy measures can be exploratory outcomes only, with matched windows and motion regression |
| Blinding and expectancy | Placebo-controlled studies broadly null; open-label surveys report substantial benefit | The existing positive evidence is compatible with a pure-expectancy explanation; a trial that measures its blind is needed |
Part two: a pre-registered double-blind randomised controlled trial
Design choices
Six, each following from an earlier chapter.
First, a single primary comparison: the active condition against matched placebo, double blind. The exposure level is filled in by the conducting institution under its regulatory authorisation; this book does not specify it.
Second, a single primary outcome: a pre-specified week-6 scale score, by analysis of covariance with the baseline score and site as covariates (Vickers and Altman 2001; Senn 2006). Connectivity-entropy measures are exploratory only, for the reasons in Chapter 5. No pharmacokinetic claim is made: this protocol measures no concentrations and therefore reports no kinetic parameters (Chapters 2 and 3).
Third, blind integrity must be measured and powered: the Bang blinding index (Bang, Ni, and Davis 2004) and the credibility/expectancy questionnaire (Devilly and Borkovec 2000). There is systematic-review evidence that lack of participant blinding biases results (Hróbjartsson et al. 2014); this protocol measures it.
Fourth, a pre-specified belief-stratified contrast: among participants who believed they received the active condition, compare those who actually did with those who did not. Chapter 3 and program p11 show that this is the analysis that separates pharmacology from expectancy.
Fifth, no promise to power that stratified contrast. This is an honest design concession: program p14 shows that once the blind breaks, the analysis needs more than twice the sample. Listing it as a pre-specified key secondary and reporting its interval is more reliable than pretending it is powered.
Sixth, run by an independent institution in a lawful jurisdiction: the protocol, analysis code and decision rule are publicly registered before the first participant is enrolled; the author takes no part in recruitment, intervention, assessment or analysis.
Protocol
| Element | Specification |
|---|---|
| Legal precondition | Conducted only in a jurisdiction where the substance may lawfully be used in research of this kind, with all required regulatory approvals and controlled-substance licences. Absence of that authorisation is a gate failure in the decision rule below, and the result is reported as “not interpretable” |
| Conduct and registration | Run by a research team unconnected with the author; ethics approval; public registration; written and reported to SPIRIT/CONSORT (Chan et al. 2013; Schulz, Altman, and Moher 2010); no recruitment from the author’s community, students or customers |
| Exposure | At the level and in the preparation specified by the conducting institution’s regulatory authorisation. This book specifies, recommends and converts no value |
| Participants | Adult healthy volunteers; excluding personal and first-degree family history of psychotic or bipolar disorder, current major psychiatric disorder, cardiovascular disease, pregnancy or breastfeeding, and interacting concomitant medication; judged by site psychiatric and medical staff |
| Randomisation and blinding | Central randomisation, 1:1; placebo matched in appearance, smell and packaging; participants, administering staff, outcome assessors and statisticians all blinded |
| Primary outcome | Pre-specified week-6 scale score (the mean of two independent assessments in weeks 6 and 7); analysis of covariance with baseline score and site as covariates |
| Blind integrity | Allocation guesses and confidence at weeks 1 and 6, with the Bang index computed; credibility/expectancy questionnaire |
| Key secondary analysis | The belief-stratified contrast (pre-specified, not powered, interval reported) |
| Exploratory outcomes | Cognitive tasks; sleep; connectivity-entropy measures, which must (i) use matched window lengths, (ii) report and regress motion and physiological noise (Power et al. 2012; Ciric et al. 2017), and (iii) use a pre-specified estimator |
| Safety | Active collection of adverse events, specifically including anxiety, panic, blood-pressure and heart-rate changes, sleep disturbance and persisting perceptual changes; an independent data and safety monitoring committee |
| Equivalence reading | If the primary effect falls within ±SESOI, it is reported within an equivalence framework as “no difference worth acting on” (Lakens, Scheel, and Isager 2018) |
How large an apparent effect a self-blinding design can produce
Before the sample size, it is worth quantifying an alternative explanation for the field’s existing positive evidence.
Calculation
# Chapter 8. The self-blinding design, and how much of an apparent effect it
# can create without any pharmacological effect at all. The design (Szigeti et
# al. 2021) has participants prepare their own capsules and draw them blind,
# then rate themselves. The generator here has NO drug effect: the only thing
# that moves a rating is what the participant BELIEVES they took. Belief is
# correct more often than chance whenever any fraction of people notice
# something (programme p05).
# rating = person effect + belief * expectancy + noise
# The program reports the apparent between-arm difference, and then inverts:
# given an observed difference, what combination of correct-guess rate and
# expectancy explains it? Synthetic data; fixed seed; standard library only.
import math
import random
from statistics import NormalDist
Z = NormalDist().inv_cdf
def trial(n, p_correct, expectancy, true_effect=0.0, rng=None):
"""Half allocated to active, half to placebo; no carry-over."""
rng = rng or random.Random(0)
act, pla = [], []
for i in range(n):
for arm, bucket in ((1, act), (0, pla)):
# belief: correct with probability p_correct, else the opposite
belief = arm if rng.random() < p_correct else 1 - arm
y = (true_effect * arm + expectancy * belief
+ rng.gauss(0.0, 1.0))
bucket.append(y)
ma = math.fsum(act) / len(act)
mp = math.fsum(pla) / len(pla)
return ma - mp
if __name__ == "__main__":
rng = random.Random(5211)
N, REPS = 90, 400
print(
"Self-blinding design, {} per arm, NO pharmacological effect"
" anywhere.".format(N)
)
print("Ratings in SD units. Only belief moves a rating.\n")
print(
" P(correct guess) expectancy 0.3 expectancy 0.6 "
" expectancy 1.0"
)
for pc in (0.50, 0.60, 0.70, 0.80, 0.90):
row = []
for ex in (0.3, 0.6, 1.0):
d = (
math.fsum(trial(N, pc, ex, 0.0, rng) for _ in range(REPS))
/ REPS
)
row.append(d)
print(" {:16.2f} {:16.3f} {:16.3f} {:16.3f}".format(pc, *row))
print(
"\nThe expected apparent difference is (2 p - 1) x expectancy: at"
" chance"
)
print(
"guessing it is zero, and at 70 % correct guessing with an"
" expectancy of"
)
print(
"0.6 SD it is about {:.2f} SD - the size of effect that microdosing"
" surveys".format(0.4 * 0.6)
)
print("routinely report. No drug effect is needed to produce it.")
print(
"\nInversion: an observed difference of 0.25 SD. Which (p,"
" expectancy)"
)
print("pairs explain it with no drug effect?")
print(" P(correct guess) required expectancy (SD)")
for pc in (0.55, 0.60, 0.70, 0.80, 0.90, 1.00):
req = 0.25 / (2 * pc - 1)
print(" {:16.2f} {:26.2f}{}".format(pc, req,
" (implausibly large)" if req > 1.5 else ""))
print(
"\nWhat this means for a design. The quantity that has to be"
" measured is"
)
print(
"P(correct guess), and the trial has to be powered to DETECT a"
" departure"
)
print(
"from chance, not merely to report one. Sample size for the blind"
" check:"
)
print(" true P(correct) n per arm for 90 % power to reject P = 0.5")
for pc in (0.60, 0.65, 0.70, 0.80):
# one-sample proportion test against 0.5, two-sided 0.05
n = ((Z(0.975) * 0.5 + Z(0.90) * math.sqrt(pc * (1 - pc))) /
(pc - 0.5)) ** 2
print(" {:15.2f} {:38d}".format(pc, math.ceil(n)))
print(
"\nAnd the comparison that actually isolates a pharmacological"
" effect:"
)
print(
"stratify the analysis BY BELIEF. Within the group who believed they"
" took"
)
print(
"the active capsule, compare those who actually did against those"
" who did"
)
print("not. With no drug effect that contrast is zero by construction:")
print(
" expectancy P(correct) belief-stratified contrast (true"
" effect 0)"
)
for ex in (0.3, 0.6, 1.0):
for pc in (0.7,):
vals = []
for _ in range(REPS):
act_b, pla_b = [], []
for i in range(N):
for arm, bucket_pair in (
(1, (act_b, pla_b)),
(0, (act_b, pla_b)),
):
belief = arm if rng.random() < pc else 1 - arm
y = ex * belief + rng.gauss(0.0, 1.0)
if belief == 1:
(act_b if arm == 1 else pla_b).append(y)
if act_b and pla_b:
vals.append(math.fsum(act_b) / len(act_b)
- math.fsum(pla_b) / len(pla_b))
print(" {:10.1f} {:12.2f} {:38.3f}"
.format(ex, pc, math.fsum(vals) / len(vals)))
print(
"\n The belief-stratified contrast is near zero at every"
" expectancy, which"
)
print(
" is what makes it the informative analysis: it is immune to the"
" expectancy"
)
print(
" term by construction. Its cost is power, because it uses only"
" part of the"
)
print(" sample, and Chapter 8 budgets for that.")
# Self-blinding design, 90 per arm, NO pharmacological effect anywhere.
# Ratings in SD units. Only belief moves a rating.
#
# P(correct guess) expectancy 0.3 expectancy 0.6 expectancy 1.0
# 0.50 -0.002 -0.008 0.012
# 0.60 0.059 0.120 0.196
# 0.70 0.111 0.245 0.404
# 0.80 0.190 0.363 0.595
# 0.90 0.225 0.485 0.793
#
# The expected apparent difference is (2 p - 1) x expectancy: at chance
# guessing it is zero, and at 70 % correct guessing with an expectancy of
# 0.6 SD it is about 0.24 SD - the size of effect that microdosing surveys
# routinely report. No drug effect is needed to produce it.
#
# Inversion: an observed difference of 0.25 SD. Which (p, expectancy)
# pairs explain it with no drug effect?
# P(correct guess) required expectancy (SD)
# 0.55 2.50 (implausibly large)
# 0.60 1.25
# 0.70 0.63
# 0.80 0.42
# 0.90 0.31
# 1.00 0.25
#
# What this means for a design. The quantity that has to be measured is
# P(correct guess), and the trial has to be powered to DETECT a departure
# from chance, not merely to report one. Sample size for the blind check:
# true P(correct) n per arm for 90 % power to reject P = 0.5
# 0.60 259
# 0.65 113
# 0.70 62
# 0.80 25
#
# And the comparison that actually isolates a pharmacological effect:
# stratify the analysis BY BELIEF. Within the group who believed they took
# the active capsule, compare those who actually did against those who did
# not. With no drug effect that contrast is zero by construction:
# expectancy P(correct) belief-stratified contrast (true effect 0)
# 0.3 0.70 0.003
# 0.6 0.70 0.013
# 1.0 0.70 0.008
#
# The belief-stratified contrast is near zero at every expectancy, which
# is what makes it the informative analysis: it is immune to the expectancy
# term by construction. Its cost is power, because it uses only part of the
# sample, and Chapter 8 budgets for that.The expected apparent difference is about the expectancy effect. At a 70 % correct-guess rate and a 0.6 SD expectancy effect, the apparent difference is about 0.24 SD — exactly the magnitude microdosing surveys routinely report, with no pharmacological effect needed. The inverse calculation gives: to explain an observed 0.25 SD difference by expectancy alone needs only a 0.63 SD expectancy effect at a 70 % correct-guess rate.
The program’s last section supplies the remedy: the belief-stratified contrast is near zero at every expectancy level (0.003, 0.013, 0.008), because by construction it is immune to the expectancy term. That is the reason for listing it as a key secondary analysis.
Note
This is not a criticism of Szigeti and colleagues’ study. Quite the reverse: the reason their self-blinding design can be analysed this way is that it recorded participants’ guesses, which is the study’s strength. Szigeti and colleagues themselves reported that participants scored higher when they believed they had taken the active capsule (Szigeti et al. 2021). This section formalises that observation and shows how a follow-up trial should be designed in the light of it.
The power budget and the sample size
Calculation
# Chapter 8. The power budget for a trial that has to answer three questions
# at once: (1) the headline between-arm comparison, (2) whether the blind
# held, and (3) the belief-stratified contrast of p11, which is the analysis
# that isolates pharmacology from expectancy. The third is the expensive one,
# because it uses only the participants who believed they were on the active
# arm. The program lays out what each question costs so the trial is sized for
# the question it is meant to answer. Exact formulas plus one simulation;
# standard library only.
import math
import random
from statistics import NormalDist
Z = NormalDist().inv_cdf
def n_ancova(d, rho=0.55, power=0.90, alpha=0.05):
za, zb = Z(1 - alpha / 2), Z(power)
return 2 * (za + zb) ** 2 * (1 - rho ** 2) / d ** 2 + za ** 2 / 4
def n_blind_check(p_true, power=0.90, alpha=0.05):
"""One-sample proportion against 0.5, per arm."""
return (
(Z(1 - alpha / 2) * 0.5 + Z(power) * math.sqrt(p_true * (1 - p_true)))
/ (p_true - 0.5)
) ** 2
if __name__ == "__main__":
SESOI = 0.30
print(
"Smallest effect of interest {:.2f} SD; baseline-outcome correlation"
" 0.55;".format(SESOI)
)
print("two-sided 0.05; 90 % power unless stated.\n")
print("Question 1 - headline between-arm comparison (ANCOVA):")
n1 = n_ancova(SESOI)
print(" n per arm = {:.1f} -> {}".format(n1, math.ceil(n1)))
print(" at SESOI 0.20 SD: {}; at 0.40 SD: {}"
.format(math.ceil(n_ancova(0.20)), math.ceil(n_ancova(0.40))))
print(
"\nQuestion 2 - did the blind hold? Power to detect a departure from"
" chance"
)
print("guessing (per arm):")
print(" true P(correct guess) n per arm")
for p in (0.60, 0.65, 0.70, 0.75, 0.80):
print(" {:21.2f} {:11d}".format(p, math.ceil(n_blind_check(p))))
print(
" With the {} per arm that question 1 requires, the smallest"
" departure".format(math.ceil(n1))
)
lo, hi = 0.5001, 0.95
for _ in range(60):
mid = 0.5 * (lo + hi)
if n_blind_check(mid) > n1:
lo = mid
else:
hi = mid
print(" detectable at 90 % power is P(correct) = {:.3f}.".format(hi))
print(
"\nQuestion 3 - the belief-stratified contrast. Only participants who"
)
print(
"believed they were on the active arm enter it, and they split"
" unevenly"
)
print("between the arms according to how well the blind held.")
print(
"\n P(correct) cells (active / placebo) smaller cell "
" detectable"
)
print(
" as % of arm effect"
" (SD)"
)
N_PER_ARM = math.ceil(n1)
for p in (0.50, 0.60, 0.70, 0.80):
# of the active arm, a fraction p believe active; of the placebo arm,
# (1-p) do
n_act = N_PER_ARM * p
n_pla = N_PER_ARM * (1 - p)
# detectable difference at 90 % power with unequal cells
se_mult = math.sqrt(1.0 / n_act + 1.0 / n_pla)
d_det = (Z(0.975) + Z(0.90)) * se_mult * math.sqrt(1 - 0.55 ** 2)
print(" {:10.2f} {:14.1f} / {:<8.1f} {:15.0%} {:14.3f}"
.format(p, n_act, n_pla, min(n_act, n_pla) / N_PER_ARM, d_det))
print(
" (both cells come out of a total of {} per arm; the stratified"
" contrast".format(N_PER_ARM)
)
print(
" uses all of them, but its precision is set by the SMALLER cell)"
)
print(
"\n The cost is severe and asymmetric. A blind that holds perfectly"
)
print(
" (P = 0.50) gives the largest usable cells and the best"
" precision; a"
)
print(
" blind that fails badly (P = 0.80) leaves only {:.0f} participants"
" in the".format(N_PER_ARM * 0.2)
)
print(
" placebo-but-believed-active cell and inflates the detectable"
" effect to"
)
print(
" {:.2f} SD. So a broken blind damages the very analysis meant to"
" repair".format(
(Z(0.975) + Z(0.90))
* math.sqrt(1 / (N_PER_ARM * 0.8) + 1 / (N_PER_ARM * 0.2))
* math.sqrt(1 - 0.55**2)
)
)
print(
" it. This is the central design tension of the chapter, and it is"
" why the"
)
print(
" protocol inflates the sample rather than relying on the"
" stratified"
)
print(" analysis to rescue a failed blind.")
print(
"\nInflation needed so that the belief-stratified contrast can"
" detect the"
)
print(
"SESOI of {:.2f} SD, as a function of how well the blind holds:"
.format(SESOI)
)
print(" P(correct) n per arm required inflation over question 1")
for p in (0.55, 0.60, 0.65, 0.70):
# solve (z+z) sqrt(1/(Np)+1/(N(1-p))) sqrt(1-rho^2) = SESOI
k = ((Z(0.975) + Z(0.90)) * math.sqrt(1 - 0.55 ** 2) / SESOI) ** 2
need = k * (1.0 / p + 1.0 / (1.0 - p))
print(" {:10.2f} {:19d} {:24.2f} x"
.format(p, math.ceil(need), need / n1))
print(
"\n Even a mild departure from chance guessing multiplies the"
" required"
)
print(
" sample several-fold. The protocol therefore treats the"
" belief-stratified"
)
print(
" contrast as a pre-specified KEY SECONDARY analysis, reported"
" with its"
)
print(" interval, and does not promise to power it.")
# Smallest effect of interest 0.30 SD; baseline-outcome correlation 0.55;
# two-sided 0.05; 90 % power unless stated.
#
# Question 1 - headline between-arm comparison (ANCOVA):
# n per arm = 163.8 -> 164
# at SESOI 0.20 SD: 368; at 0.40 SD: 93
#
# Question 2 - did the blind hold? Power to detect a departure from chance
# guessing (per arm):
# true P(correct guess) n per arm
# 0.60 259
# 0.65 113
# 0.70 62
# 0.75 38
# 0.80 25
# With the 164 per arm that question 1 requires, the smallest departure
# detectable at 90 % power is P(correct) = 0.625.
#
# Question 3 - the belief-stratified contrast. Only participants who
# believed they were on the active arm enter it, and they split unevenly
# between the arms according to how well the blind held.
#
# P(correct) cells (active / placebo) smaller cell detectable
# as % of arm effect (SD)
# 0.50 82.0 / 82.0 50% 0.423
# 0.60 98.4 / 65.6 40% 0.432
# 0.70 114.8 / 49.2 30% 0.461
# 0.80 131.2 / 32.8 20% 0.528
# (both cells come out of a total of 164 per arm; the stratified contrast
# uses all of them, but its precision is set by the SMALLER cell)
#
# The cost is severe and asymmetric. A blind that holds perfectly
# (P = 0.50) gives the largest usable cells and the best precision; a
# blind that fails badly (P = 0.80) leaves only 33 participants in the
# placebo-but-believed-active cell and inflates the detectable effect to
# 0.53 SD. So a broken blind damages the very analysis meant to repair
# it. This is the central design tension of the chapter, and it is why the
# protocol inflates the sample rather than relying on the stratified
# analysis to rescue a failed blind.
#
# Inflation needed so that the belief-stratified contrast can detect the
# SESOI of 0.30 SD, as a function of how well the blind holds:
# P(correct) n per arm required inflation over question 1
# 0.55 330 2.01 x
# 0.60 340 2.07 x
# 0.65 358 2.18 x
# 0.70 388 2.37 x
#
# Even a mild departure from chance guessing multiplies the required
# sample several-fold. The protocol therefore treats the belief-stratified
# contrast as a pre-specified KEY SECONDARY analysis, reported with its
# interval, and does not promise to power it.The three questions cost different amounts. The primary comparison needs 164 per arm at a smallest effect of interest of 0.30 SD; at that sample the blind check can only detect a correct-guess rate above 0.625; and the belief-stratified contrast’s precision, once the blind breaks, is set by the smaller cell — at an 80 % correct-guess rate the placebo-but-believed-active cell holds only 33 people and the detectable effect inflates to 0.53 SD. Making the stratified contrast able to detect 0.30 SD needs about 2.01 times the sample even at a correct-guess rate of only 0.55.
Calculation
# Chapter 8. Sample size for the pre-registered trial. Single primary
# comparison: the active condition against a matched placebo, double blind.
# Single primary outcome: the pre-specified wellbeing/affect score at week 6
# by ANCOVA (baseline, site). Planning
# assumptions: SESOI 0.30 SD, baseline-outcome correlation 0.55,
# single-occasion reliability 0.80, outcome = mean of 2 occasions, two-sided
# 0.05, 90 % power. Normal theory first, then a simulation with integer
# scoring, a ceiling, and the drop-out pattern that long daily-dosing
# protocols actually produce.
import math
import random
from statistics import NormalDist
Z = NormalDist().inv_cdf
D, RHO, REL1, K_OCC = 0.30, 0.55, 0.80, 2
ITEMS, ITEM_MAX = 14, 5 # 14 items scored 0-5: range 0-70
CEILING = ITEMS * ITEM_MAX
TRUE_MEAN, TRUE_SD = 42.0, 9.5
def reliability(k):
return k * REL1 / (1 + (k - 1) * REL1)
def n_formula(d=D, rho_xx=1.0, rho=RHO, power=0.90, alpha=0.05):
d_obs = d * math.sqrt(rho_xx)
za, zb = Z(1 - alpha / 2), Z(power)
return 2 * (za + zb) ** 2 * (1 - rho ** 2) / d_obs ** 2 + za ** 2 / 4
def invert3(S):
a, b, c = S[0]
d, e, f = S[1]
g, h, i = S[2]
det = a * (e * i - f * h) - b * (d * i - f * g) + c * (d * h - e * g)
return [
[(e * i - f * h) / det, (c * h - b * i) / det, (b * f - c * e) / det],
[(f * g - d * i) / det, (a * i - c * g) / det, (c * d - a * f) / det],
[(d * h - e * g) / det, (b * g - a * h) / det, (a * e - b * d) / det],
]
def one_trial(rng, n, delta_sd):
rows = []
delta = delta_sd * TRUE_SD
err_sd = TRUE_SD * math.sqrt(1 - RHO ** 2)
meas_sd = TRUE_SD * math.sqrt((1 - REL1) / REL1 / K_OCC)
for arm in (1, 0):
for _ in range(n):
lat_b = rng.gauss(TRUE_MEAN, TRUE_SD)
b = min(CEILING, max(0, round(lat_b + rng.gauss(0, meas_sd))))
lat_y = (TRUE_MEAN + RHO * (lat_b - TRUE_MEAN) + delta * arm
+ rng.gauss(0, err_sd))
y = min(CEILING, max(0, round(lat_y + rng.gauss(0, meas_sd))))
rows.append((arm, b, y))
n2 = len(rows)
mb = math.fsum(r[1] for r in rows) / n2
X = [(1.0, float(r[0]), r[1] - mb) for r in rows]
Y = [float(r[2]) for r in rows]
S = [
[math.fsum(x[i] * x[j] for x in X) for j in range(3)]
for i in range(3)
]
v = [math.fsum(x[i] * y for x, y in zip(X, Y)) for i in range(3)]
inv = invert3(S)
beta = [math.fsum(inv[i][j] * v[j] for j in range(3)) for i in range(3)]
res = [
y - math.fsum(bb * xx for bb, xx in zip(beta, x))
for x, y in zip(X, Y)
]
s2 = math.fsum(r * r for r in res) / (n2 - 3)
df = n2 - 3
z = Z(0.975)
tcrit = z + (z ** 3 + z) / (4 * df)
at_ceiling = sum(1 for r in rows if r[0] == 1 and r[2] == CEILING) / n
return beta[1] / math.sqrt(s2 * inv[1][1]) > tcrit, at_ceiling
if __name__ == "__main__":
rel = reliability(K_OCC)
print(
"outcome = mean of {} occasions; single-occasion reliability {:.2f}"
" -> {:.3f}".format(K_OCC, REL1, rel)
)
n0 = n_formula(rho_xx=rel)
print("normal theory: n = {:.3f} -> {} per arm (attenuated d = {:.3f})"
.format(n0, math.ceil(n0), D * math.sqrt(rel)))
rng = random.Random(5215)
print(
"\nsimulation with integer scores and a ceiling at {}:".format(
CEILING
)
)
chosen = None
for n in sorted({math.ceil(n0), 195, 210, 225}):
res = [one_trial(rng, n, D) for _ in range(1500)]
pw = sum(r[0] for r in res) / len(res)
se = math.sqrt(pw * (1 - pw) / len(res))
ce = math.fsum(r[1] for r in res) / len(res)
print(
" n = {:3d}/arm: power {:.3f} (s.e. {:.3f}); active arm at"
" ceiling {:.1%}".format(n, pw, se, ce)
)
if chosen is None and pw - 2 * se >= 0.90:
chosen = n
if chosen is None:
chosen = 210
t1 = sum(one_trial(rng, chosen, 0.0)[0] for _ in range(1500)) / 1500
print(" smallest n with power - 2 s.e. >= 0.90: {}".format(chosen))
print(
" one-sided error rate with no effect: {:.3f} (nominal 0.025)"
.format(t1)
)
print(
"\nDrop-out in a six-week daily-dosing protocol is higher than in a"
)
print("questionnaire-only study; the plan allows 20 %:")
plan = math.ceil(chosen / 0.80)
print(
" {} analysable per arm; 20 % loss -> {} randomised per arm, {}"
" in all".format(chosen, plan, 2 * plan)
)
print(
"\nsensitivity, analysable per arm (normal theory, reliability"
" {:.2f}):".format(rel)
)
print(" SESOI \\ rho 0.35 0.55 0.75")
for d in (0.20, 0.30, 0.40):
print(" {:4.2f} SD ".format(d) + "".join(
"{:8d}".format(math.ceil(n_formula(d=d, rho_xx=rel, rho=r)))
for r in (0.35, 0.55, 0.75)))
print(
"\nThe trial is powered for the PRIMARY comparison only."
" Programme p14"
)
print(
"showed that the belief-stratified contrast, which is the analysis"
" that"
)
print(
"separates pharmacology from expectancy, would need several times"
" this"
)
print(
"sample if the blind does not hold; it is therefore a"
" pre-specified key"
)
print(
"secondary reported with its interval and is not powered. The blind-"
)
print(
"integrity check at {} per arm can detect a correct-guess rate of"
" about".format(chosen)
)
lo, hi = 0.5001, 0.95
for _ in range(60):
mid = 0.5 * (lo + hi)
k = (
(Z(0.975) * 0.5 + Z(0.90) * math.sqrt(mid * (1 - mid)))
/ (mid - 0.5)
) ** 2
if k > chosen:
lo = mid
else:
hi = mid
print(" {:.3f}, which is the resolution the trial has on its own blind."
.format(hi))
# outcome = mean of 2 occasions; single-occasion reliability 0.80 -> 0.889
# normal theory: n = 184.184 -> 185 per arm (attenuated d = 0.283)
#
# simulation with integer scores and a ceiling at 70:
# n = 185/arm: power 0.881 (s.e. 0.008); active arm at ceiling 0.7%
# n = 195/arm: power 0.892 (s.e. 0.008); active arm at ceiling 0.7%
# n = 210/arm: power 0.913 (s.e. 0.007); active arm at ceiling 0.7%
# n = 225/arm: power 0.928 (s.e. 0.007); active arm at ceiling 0.7%
# smallest n with power - 2 s.e. >= 0.90: 225
# one-sided error rate with no effect: 0.025 (nominal 0.025)
#
# Drop-out in a six-week daily-dosing protocol is higher than in a
# questionnaire-only study; the plan allows 20 %:
# 225 analysable per arm; 20 % loss -> 282 randomised per arm, 564 in all
#
# sensitivity, analysable per arm (normal theory, reliability 0.89):
# SESOI \ rho 0.35 0.55 0.75
# 0.20 SD 520 414 260
# 0.30 SD 232 185 116
# 0.40 SD 131 105 66
#
# The trial is powered for the PRIMARY comparison only. Programme p14
# showed that the belief-stratified contrast, which is the analysis that
# separates pharmacology from expectancy, would need several times this
# sample if the blind does not hold; it is therefore a pre-specified key
# secondary reported with its interval and is not powered. The blind-
# integrity check at 225 per arm can detect a correct-guess rate of about
# 0.607, which is the resolution the trial has on its own blind.Normal theory gives 185 per arm; the simulation, adding integer scoring and a ceiling, takes 225 analysable per arm by the rule “power minus two standard errors not below 0.90”. Drop-out in a six-week daily-dosing protocol is higher than in a questionnaire-only study, and allowing 20 %, 282 are randomised per arm, 564 in all.
Following the result in Volume 33, Chapter 6, “90 % power” means that when the true effect is exactly 0.30 SD, the probability of reaching a conclusion of the form “the active condition is better” is about 90 %; the strongest conclusion, “better by at least 0.30 SD”, has only about a 2.5 % chance of appearing.
Decision rule
Calculation
# Chapter 8. Decision rule, fixed before unblinding. Primary comparison:
# active against matched placebo, double blind. D = adjusted difference in the
# week-6 primary score in SD units (ANCOVA: baseline, site), with its 95 % CI.
# POSITIVE D favours the active condition. SESOI 0.30 SD.
# Gates, checked first: more than 20 % of randomised participants without a
# primary outcome; allocation revealed to outcome assessors before database
# lock; the trial not conducted under the required regulatory authorisation.
# Pre-specified qualifiers: the blind-integrity check (a correct-guess rate
# above the pre-set bound means expectancy is a live explanation, and
# programme p11 quantifies how much of D it could account for) and the
# belief-stratified contrast of p11, which is reported whenever the blind did
# not hold. Any adverse-event excess is reported first.
SESOI = 0.30
def expectancy_share(d, p_correct, expectancy_sd=0.6):
"""Share of D that a correct-guess rate p could account for, per programme
p11:
an expectancy effect contributes about (2p - 1) * expectancy_sd."""
if d == 0:
return 0.0
return max(0.0, (2.0 * p_correct - 1.0) * expectancy_sd) / abs(d)
def verdict(d, lo, hi, missing=0.10, p_correct=0.52, belief_contrast=None,
revealed=False, unauthorised=False, ae_excess=False):
pre = "ADVERSE-EVENT SIGNAL REPORTED FIRST;\n" if ae_excess else ""
for bad, why in (
(unauthorised, "conducted without the required authorisation"),
(
missing > 0.20,
"{:.0%} without primary outcome (limit 20 %)".format(missing),
),
(revealed, "allocation revealed to assessors before lock"),
):
if bad:
return "{}D = {:+.2f}: NOT INTERPRETABLE - {}".format(pre, d, why)
if lo >= SESOI:
v = "benefit of at least the SESOI"
elif lo > 0:
v = "benefit, but not shown to reach the SESOI"
elif hi < 0:
v = "placebo did better"
elif lo >= -SESOI and hi <= SESOI:
v = "no difference worth acting on"
else:
v = "unclear: the interval is too wide to decide"
notes = []
if p_correct > 0.60:
share = expectancy_share(d, p_correct)
notes.append(
"blind did not hold (correct guesses {:.2f});"
"\n expectancy alone could account for about {:.0%} of D"
.format(p_correct, min(share, 1.0))
)
if belief_contrast is None:
notes.append("belief-stratified contrast NOT reported, so the"
"\n pharmacological effect is not isolated")
else:
notes.append("belief-stratified contrast {:+.2f} SD"
.format(belief_contrast))
out = "{}D = {:+.2f} ({:+.2f} to {:+.2f}): {}".format(pre, d, lo, hi, v)
for n in notes:
out += "\n qualifier: " + n
return out
CASES = [
# clear benefit past SESOI
(0.44, 0.31, 0.57),
# benefit below SESOI
(0.18, 0.04, 0.32),
# nothing worth acting on
(0.03, -0.11, 0.17),
(-0.24, -0.38, -0.10), # placebo better
(0.15, -0.25, 0.55), # too wide
# blind broke, no stratum
(0.40, 0.26, 0.54, 0.10, 0.74),
# blind broke, stratum ~0
(0.40, 0.26, 0.54, 0.10, 0.74, 0.05),
# blind broke, stratum holds
(0.40, 0.26, 0.54, 0.10, 0.74, 0.33),
(0.50, 0.36, 0.64, 0.28), # too much missing
(0.30, 0.16, 0.44, 0.10, 0.52, None, False, True), # unauthorised
(0.05, -0.09, 0.19, 0.10, 0.52, None, False, False, True), # AE signal
]
if __name__ == "__main__":
for c in CASES:
print(verdict(*c))
print(
"\nNote the three 'blind broke' cases. They share an identical"
" primary"
)
print(
"result and reach different conclusions, because what distinguishes"
" them is"
)
print(
"the belief-stratified contrast: near zero means expectancy"
" explains the"
)
print(
"primary difference, while a contrast close to D means it does not."
" This is"
)
print(
"the analysis programme p11 was built to justify and programme p14"
" priced."
)
print(
"\nSecondary outcomes (the connectivity-entropy measures of Chapter 5"
" with"
)
print(
"their motion regressors and matched windows, cognitive tasks,"
" sleep) are"
)
print(
"reported with intervals and never change the verdict. No"
" pharmacokinetic"
)
print("claim is made at all: per Chapters 2 and 3 the trial measures no")
print("concentrations and therefore reports no kinetics.")
print(
"\nThe example numbers above are invented, to show what each branch"
" prints."
)
# D = +0.44 (+0.31 to +0.57): benefit of at least the SESOI
# D = +0.18 (+0.04 to +0.32): benefit, but not shown to reach the SESOI
# D = +0.03 (-0.11 to +0.17): no difference worth acting on
# D = -0.24 (-0.38 to -0.10): placebo did better
# D = +0.15 (-0.25 to +0.55): unclear: the interval is too wide to decide
# D = +0.40 (+0.26 to +0.54): benefit, but not shown to reach the SESOI
# qualifier: blind did not hold (correct guesses 0.74);
# expectancy alone could account for about 72% of D
# qualifier: belief-stratified contrast NOT reported, so the
# pharmacological effect is not isolated
# D = +0.40 (+0.26 to +0.54): benefit, but not shown to reach the SESOI
# qualifier: blind did not hold (correct guesses 0.74);
# expectancy alone could account for about 72% of D
# qualifier: belief-stratified contrast +0.05 SD
# D = +0.40 (+0.26 to +0.54): benefit, but not shown to reach the SESOI
# qualifier: blind did not hold (correct guesses 0.74);
# expectancy alone could account for about 72% of D
# qualifier: belief-stratified contrast +0.33 SD
# D = +0.50: NOT INTERPRETABLE - 28% without primary outcome (limit 20 %)
# D = +0.30: NOT INTERPRETABLE - conducted without the required authorisation
# ADVERSE-EVENT SIGNAL REPORTED FIRST;
# D = +0.05 (-0.09 to +0.19): no difference worth acting on
#
# Note the three 'blind broke' cases. They share an identical primary
# result and reach different conclusions, because what distinguishes them is
# the belief-stratified contrast: near zero means expectancy explains the
# primary difference, while a contrast close to D means it does not. This is
# the analysis programme p11 was built to justify and programme p14 priced.
#
# Secondary outcomes (the connectivity-entropy measures of Chapter 5 with
# their motion regressors and matched windows, cognitive tasks, sleep) are
# reported with intervals and never change the verdict. No pharmacokinetic
# claim is made at all: per Chapters 2 and 3 the trial measures no
# concentrations and therefore reports no kinetics.
#
# The example numbers above are invented, to show what each branch prints.There are three gates: absence of the required regulatory authorisation, more than 20 % of randomised participants without a primary outcome, and allocation revealed to assessors before database lock. If any fails, the report reads “not interpretable” whatever the primary outcome. Note the three “blind broke” examples: their primary results are identical and their conclusions differ, the difference being the belief-stratified contrast — near zero means expectancy explains the primary difference, close to means it does not. That is the analysis program p11 argued for and program p14 priced.
What this trial cannot show
First, it tests one exposure level, one schedule and a six-week arrangement. Second, it measures no concentrations, and so answers nothing about the pharmacokinetic questions of Chapters 2 and 3; those require a separate, authorised pharmacokinetic study. Third, it does not test the “window needs input” hypothesis of Chapter 6, which requires the 2×2 factorial design described at the end of that chapter. Fourth, a substantial proportion of participants will guess their allocation (Chapter 3), so the contribution of expectancy can only be partly identified. Fifth, the conclusions do not extend to the excluded groups, and the reason for excluding them is safety. Sixth, if the result is “no difference worth acting on”, that is the trial’s conclusion, and exploratory outcomes or subgroups cannot be substituted for it.
Ethics and conflict of interest
The risks of research of this kind include anxiety and panic reactions, changes in blood pressure and heart rate, and the precipitation of psychotic symptoms in susceptible people; the exclusion criteria and the safety monitoring are therefore not formalities. Whatever the result, the protocol, statistical analysis plan, analysis code and summary results will be published; the author takes no part in recruitment, intervention, assessment or analysis.
Disclosure
The author uses the works of 5D Library, including this book, as the methodological basis of his community courses, the 5D Ascension Cards (Dimensional Shift Card Decks) and the Yafu AI knowledge base, and therefore has a commercial interest in the subject of this book. The group also operates ketohackers.com and nadplusnadplus.com, two health-education sites adjacent to this book’s metabolic and plasticity themes; this book links to neither and mentions no product. The book promotes no course, card deck, substance or service, gives no dose, source, route or course of use, and explicitly does not recommend that anyone use any substance it discusses; the Chapter 8 trial is designed to be run and analysed by researchers independent of the author’s business, in a jurisdiction where the required regulatory authorisation has been obtained, and does not recruit from the author’s community, students or customers; all the code and the study protocol are published openly for anyone to check. The author provides no medical services and sells no substance, device, supplement or test.
Summary
The four-step checklist reads claims about sub-perceptual exposure along four dimensions: the chain and its direction, the parameters, the measurement, and blinding and expectancy. Applied to the prevailing account, it shows that the second and fourth links run opposite, that three key parameters are unmeasured in humans, that entropy measures are indistinguishable from noise, and that the existing positive evidence is compatible with a pure-expectancy explanation. The pre-registered double-blind trial makes the active condition against matched placebo its single primary comparison and a pre-specified week-6 scale score by analysis of covariance its single primary outcome, with a smallest effect of interest of 0.30 SD — a conservative value below the half-standard-deviation threshold commonly cited as a minimal important difference (Norman, Sloan, and Wyrwich 2003) — 225 analysable and 282 randomised per arm, 564 in all; the exposure level is filled in by the conducting institution under its authorisation and is not specified here. Blind integrity is measured and written into the decision rule, while the belief-stratified contrast that separates pharmacology from expectancy is a pre-specified key secondary that is explicitly not powered, because a broken blind would need more than twice the sample. The trial measures no concentrations and so answers no pharmacokinetic question, and the book says so.
References
Fan, Y. (2026). Biomathematical Models of Sub-Perceptual Tryptamine Pharmacokinetics, 5-HT2A Receptor Desensitisation and Neuroplastic Window Dynamics: From Michaelis–Menten Kinetics of Prodrug Deacetylation and Whole-Brain Connectivity Entropy to the Microdose Tolerance Ratchet, with a Textual Examination of the Dose Boundary in the Classical Materia Medica [亚知觉色胺药代动力学、5-HT2A 受体脱敏与神经可塑性窗口的生物数学模型] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24019347 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).