Логотип Synthetic Control Diagnostics

Synthetic Control Diagnostics

Спільнота
isitcredible
synthetic-control-diagnostics

Diagnostics for synthetic control and synthetic difference-in-differences: pre-period adequacy, placebo-unit rank, weight diagnostics including lagged-outcome degeneracy, terminal-period sensitivity, and in-time placebos. Invoke from `code-and-data` whenever a target result uses a synthetic comparison unit.

Огляд

Видавецьisitcredible
Репозиторійresearch_skills
Назва навичкиsynthetic-control-diagnostics
Зірки
40
Форки
6
Файли в пакеті
Лише інструкції
ЛіцензіяMIT
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Усе необхідне — в інструкціях

    Усе потрібне моделі міститься в інструкціях — жодних додаткових файлів для синхронізації.

  • Відкритий вихідний код

    Видавець на GitHub: isitcredible. Перед установленням перегляньте вихідні файли навички.

Встановлення

Установіть навичку ШІ Synthetic Control Diagnostics у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки на GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до розділу «Плагіни» → «Навички».
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/isitcredible/research_skills/tree/main/review/modules/synthetic-control-diagnostics
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Додати навичку → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/isitcredible/research_skills.git /tmp/research_skills
mkdir -p .claude/skills
cp -r /tmp/research_skills/review/modules/synthetic-control-diagnostics .claude/skills/synthetic-control-diagnostics
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Synthetic Control Diagnostics в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Synthetic Control Diagnostics, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для певного постачальника, тому навичка Synthetic Control Diagnostics не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож поки навичка не потрібна, токени на її інструкції не витрачаються.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

Synthetic-control diagnostics

Ask how the fit was achieved, how the treated unit ranks against placebos, and whether the gap survives the choice of endpoint. A synthetic control is only as good as its donor weights, and the weights can be manufactured: match on enough lagged outcomes and the fit becomes mechanical while the covariates become decoration — so a tight pre-period fit is where the questions start, not where they end.

Trigger: a synthetic control or synthetic difference-in-differences comparison behind any target result. NOT_APPLICABLE otherwise.

Method crib (source-audited): ../../references/methods/synthetic_control_guide.md — Abadie-Diamond-Hainmueller fit/placebo machinery, Ferman spec-search accounting, Kaul all-lags pathology, BMF augmentation, CWZ conformal, scpi prediction intervals, SDID. ../../references/methods/cattaneo_feng_titiunik_2021_sc_intervals.md — JASA: conditional prediction intervals on the counterfactual itself. The permutation rank test answers "is this gap unusual among placebos?", not "what is the CI on the effect?". The CFT interval is around the synthetic counterfactual: the test is whether it contains the treated unit's observed outcome. A tight rank p with a treated outcome inside the interval means the effect is not distinguishable from prediction error under CFT's assumptions — a test under rule 8 (report its power), not a correction; a wide interval that still excludes the treated outcome is not. Report the interval alongside the rank.

Core checks

  • Pre-period adequacy — and route the answer. Is the pre-treatment window long enough to discipline the fit and support the chosen inference procedure? A short pre-period plus many donors is a recipe for overfitting the fit and underpowering the test. When T0 is short relative to the donor count or the post-period, a tight pre-fit is manufactured evidence: require a penalized/augmented estimator and report the placebo grid's resolution limit; when T0 is adequate, unlock the in-time placebo and the pre-period holdout below. State the rule you applied.
  • Placebo-unit distribution and rank. Run the full procedure on every donor as if it were treated; report where the treated unit's effect ranks in that distribution. Specify the statistic: the canonical ranking is the post/pre RMSPE ratio (Abadie–Diamond–Hainmueller), not the raw gap — donors with poor pre-fit produce large mechanical gaps and contaminate the null. Screen the pool: state the treated unit's own pre-RMSPE and exclude placebos whose pre-RMSPE exceeds a stated multiple of it. Then report J and the smallest attainable p — the grid is 1/(J+1), and when that exceeds α the test cannot reject and the record is "resolution-limited, uninformative," not a null; symmetrically, a grid-minimum rank is not a clean p-value. The rank is the design-based test — a treated effect inside the screened placebo distribution is no evidence of an effect however dramatic the gap plot looks; read it beside the conformal and scpi intervals below.
  • Weight diagnostics. Report the donor weights: sparse, extreme, or degenerate weights mean the "synthetic" unit is really one or two donors, and the design inherits their idiosyncrasies. Then check those donors for their own shocks in the treatment period, run a donor leave-one-out refit (drop each positive-weight donor, report the gap range), and screen the placebo pool for donors that received similar interventions — a contaminated placebo pool shrinks the apparent rank.
  • Terminal-period sensitivity. Recompute the effect dropping the final periods; divergence that lives at the end of the sample is fragile to it.
  • Alternative-estimator refit. Re-fit the headline gap under augmented SC (Ben-Michael–Feller–Rothstein — the standard repair for imperfect pre-fit), SDID, and/or generalized SC; report whether the gap survives the estimator, not just the donor set.
  • Conformal inference. Chernozhukov–Wüthrich–Zhu conformal intervals are the second design-based inference route beside the placebo rank and scpi; where the placebo grid is coarse, conformal is often the higher-resolution test.
  • Model-based prediction intervals (scpi). The placebo rank is one inference route; scpi (Cattaneo–Feng–Palomba–Titiunik) is a second, independent one — it puts a prediction interval around the synthetic counterfactual that carries the estimator's own in-sample and out-of-sample uncertainty. Report it beside the placebo rank: a gap that ranks extreme among placebos while the treated outcome sits inside the counterfactual's scpi interval is not the clean effect the gap plot implies; a treated outcome outside a wide interval is still outside it. Re-run under alternative weight constraints (simplex, lasso, ridge, ols) and report whether the gap survives the constraint. (scpi implements this — data prep, scest, scpi, scplot; see the battery's software examples.)

Conditional checks

  • Lagged-outcome degeneracy — when lagged outcomes enter the matching variables: check whether they collapse the weights onto the outcome path, making the fit mechanical and the covariate matching irrelevant. Report the fit with and without the saturated lag set. This is a proved pathology, not a suspicion: Kaul, Klößner, Pfeifer & Schieler (2022, JBES) prove that when every pre-period outcome enters as a separate predictor, every other covariate is rendered irrelevant to the weights, however much it matters for the post-period — so a paper that "matches on covariates X, Y, Z and lagged outcomes" is usually doing lagged-outcome matching with the covariates as decoration. Read the V-weights table: structural covariates at 0.000–0.01 with a few lag years at 0.4+ is the signature. Ferman, Pinto & Possebom (2020) are routinely mis-cited: their position is a fork — use fewer lags if covariates should do work, all lags if they needn't — plus multiple specifications and combined test statistics (Imbens–Rubin), not "one alternative spec." Fixes: match on structural covariates only, set V exogenously, cross-validate V (Abadie et al.'s own recommendation), or use a method without the pathology (SDID, penalised SC, matrix completion).
  • SDID needs a large pre-period for its inference. Synthetic DiD is not SC — the ridge penalty, time weights, and jackknife inference rest on T0 → ∞ (pre-periods). With single-digit T0 the weights are underdetermined, the "flat pre-trends" are partly an overfitting artifact, and the large-N_co, large-T0 conditions behind all three variance estimators are not in force — the bootstrap (re-estimates the weights), the jackknife (fixes them; conservative only under those conditions, undefined at one treated unit) and the placebo estimator (the one-treated-unit route, which needs homoskedasticity across units). Count the pre-periods before accepting an SDID's inference; a placebo treatment date inside the pre-window converts the caveat into demonstrated instability on their numbers. But do not lead a critique with it when a coincident-shock or identification argument is available — overfitting is orthogonal to a shock with no pre-period footprint, and leading with it implicitly concedes a better-powered SDID would identify the effect.
  • In-time (backdated) placebo — when the pre-period allows it: assign a fake treatment date inside the pre-period and confirm the procedure finds nothing.
  • Pre-period holdout — the direct test of mechanical fit: reserve part of the pre-period, re-estimate the weights on the training portion only, and check whether the fitted unit tracks the held-out pre-periods. Weights that fail to extrapolate within the pre-period were fit, not found.
  • Staggered adoption or multiple treated units — use scdataMulti (scpi); pooled and unit-level results are different objects.
  • SDID time-weight concentration — for SDID targets, report the concentration of the time weights λ across pre-periods beside the donor weights, and re-estimate the SDID claim under plain DiD and SC as sensitivities.

Report back

Lead with what each check found and what it costs the claim, not a row for every check. Still account for coverage: say what you ran, what was NOT_APPLICABLE and why, and what was blocked (exact file, command, error). Record donor-composition findings in the module report's ## Leads for later stages (folded into the code-and-data report) for claims: when the synthetic unit is really one donor economy, the counterfactual claim is a comparison with that economy, and the story must survive being said that way.

Поширені запитання

Що робить навичка ШІ Synthetic Control Diagnostics?

Diagnostics for synthetic control and synthetic difference-in-differences: pre-period adequacy, placebo-unit rank, weight diagnostics including lagged-outcome degeneracy, terminal-period sensitivity, and in-time placebos. Invoke from `code-and-data` whenever a target result uses a synthetic comparison unit.

Навіщо використовувати Synthetic Control Diagnostics у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Synthetic Control Diagnostics — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Synthetic Control Diagnostics у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/isitcredible/research_skills/tree/main/review/modules/synthetic-control-diagnostics. TypingMind прочитає файл SKILL.md і встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Synthetic Control Diagnostics?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Synthetic Control Diagnostics?

Зі скількома забажаєте. У TypingMind ви можете використовувати Synthetic Control Diagnostics із будь-якою моделлю, яка підтримує навички, зокрема з GPT, Claude, Gemini, Grok, DeepSeek, Mistral чи Llama. Для цього ви використовуєте власні ключі API.

Чи безкоштовна навичка ШІ Synthetic Control Diagnostics?

Так. На GitHub цю навичку публікує isitcredible за ліцензією MIT. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це набір інструкцій для повторного використання, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти, які вона може викликати, — код, який десь виконується й повертає результат. Натомість навичка ШІ дає моделі знання й пояснює порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний робочий простір зі ШІ вже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇