Notes

Clinical statistical programming

Self-contained notes on clinical trial statistics and their implementation in SAS, R and Python, written up as I work through them. Longer projects keep their own site; everything else lives here under /notes/.


Site notes

2Written directly in this repository
把一篇笔记能用到的部件全部摆在同一页上 —— 页头出自 frontmatter、导语、三种框、表格与判定标签、代码块、插图、页脚收口 —— 每个都标出它在页面的位置和归属的色相。写新笔记时对着这一页抄即可。
/notes/note-parts-specimen.html2026-09-20笔记规范 · 排版 · Astrosource

SAS patterns

2De-identified, reusable code shapes
Resolving a replacement chain of unknown depth in one pass of a DATA step: why an in-memory hash is the only structure that fits this shape of problem, what the step guarantees, and what it does when the extract is not clean. A self-contained Base SAS check ships with the note — one fixture, eleven assertions.
/notes/sas-kit-chain-replacement.html2026-09-20SAS · Hash · kit replacement · SDTM/ADaMsource
一次把整张表读进内存,再让主表的每一行各自去“钉”上去——这是临床 SAS 编程里最值钱的一条肌肉记忆。 本文给出 hash 对象的完整语法骨架(declare → definekey → definedata → definedone → find / output),四类真实项目形态的 可搬运代码(受试者筛选、横向合并、纵向检索、SDTM/ADaM 衍生),以及八条按官方文档与会议论文归集的易错点。
/notes/sas-hash-clinical-note.html2026-09-19SAS · Hash · 临床编程 · SDTM/ADaMsource

Languages and practice

1A multi-language path out of SAS
把前端拆成「结构 — 表现 — 行为 — 运行环境 — 数据通路 — 工程交付」六层,逐层给出核心概念、术语、 最小示例与验收标准,并配知识结构图与流程图。写作语境按读者现有的 R / Python / SAS 心智模型来搭桥, 终点是能独立做出一个可用的页面并放到网上。
/notes/frontend-primer-note.html2026-09-19前端 · JavaScript · HTML · 学习路径source

Learning log

1Built in the open
写给初学者的技术报告精读手册:先用一句话说清每个概念要解决什么问题,再拆开公式与结构,最后用一个可交互的小实验亲手拨动参数。纵向是 DeepSeek 的版本演化,横向是与 GPT / Claude / Gemini 的对比,纵深是 MLA、MoE、GRPO、FP8、DSA、CED 这些名词背后的原理。
/notes/deepseek-tech-report-guide.html2026-09-21DeepSeek · LLM · 技术报告 · 学习路径source

Life and travel

1Plans and references outside work

External projects

11Each keeps its own site
The production pattern behind a Phase III primary endpoint: PROC MIXED with no RANDOM statement, TYPE=UN and DDFM=KR, the baseline record leaving the response vector, what each covariance structure costs, and the prespecification in the SAP the model cannot supply for itself. Ships a runnable Base SAS check.
/sas-pattern-notes/SAS patternsMMRM · SAS · clinical programmingsource
How eighteen shipped system prompts are actually written, measured across the seven dimensions they all answer — and the argument the note turns on: every 'never' should be answerable with which layer actually stops the model when it disobeys. Written in Chinese, with twenty-three quoted excerpts, each checked verbatim against the archive it came from.
/sas-pattern-notes/Learning logAI agents · LLMsource