[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EJ3HKBWSXTJ2HRGCG5B8Y6":3,"skill-same:01M7EJ3HKBWSXTJ2HRGCG5B8Y6":63},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":31,"commitSha":32,"skillDirectory":33,"forksCount":14,"repositoryHtmlUrl":34,"repositoryHomepageUrl":34,"ownerHtmlUrl":35,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":36,"install":37,"resources":50},"01M7EJ3HKBWSXTJ2HRGCG5B8Y6","distributed-lag-models",null,">- Fit finite-impulse-response (distributed-lag) models that relate a sampled process response (daily lab) to high-frequency inputs (DCS minute data) with smoothness-regularised lag coefficients. Use when the effect of an upstream change propagates with mixed-residence-time dynamics to a downstream","Mr-Nobody-Anonymous\u002FAll-skills","Mr-Nobody-Anonymous","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F184253119?v=4","01M7AEXFJHKTYQW5R0ZCQQTWFV","anonymous","01M7C00M3GQR4QKP9GZA42GFAK",0,"MIT","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fchemical-engineering\u002Fdistributed-lag-models\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: distributed-lag-models\ndescription: \">- Fit finite-impulse-response (distributed-lag) models that relate a sampled process response (daily lab) to high-frequency inputs (DCS minute data) with smoothness-regularised lag coefficients. Use when the effect of an upstream change propagates with mixed-residence-time dynamics to a downstream\"\ncategory: chemical-engineering\nversion: 1.0.0\ndisable-model-invocation: false\nrisk: low\nsource: \"https:\u002F\u002Fgithub.com\u002Fjskherman\u002Fengg-skills\"\nsource_repository: \"jskherman\u002Fengg-skills\"\nsource_path: \"skills\u002Fdistributed-lag-models\u002FSKILL.md\"\nlicense: \"MIT\"\nimported_at: \"2026-09-20\"\n---\n# Distributed-Lag (FIR) Models for Process Data\n\n## Overview\n\nMany process datasets have a low-frequency response (daily lab) tied to\nhigh-frequency inputs (DCS data at per-minute resolution). The effect is\ntypically distributed across several lags reflecting holdup, residence\ntime, and recycle. The naive single-lag regression understates the\ndynamics; a distributed-lag (FIR) model estimates one coefficient for\neach lag and reports both the cumulative effect magnitude and the lag\nshape when the coefficients can be normalised into a kernel.\n\nThis skill provides:\n\n- Penalised FIR regression with second-difference smoothness penalty\n  (`ridge` on Δ² coefficients).\n- Unrestricted lag coefficients by default, preserving effect magnitude\n  and allowing sign changes.\n- Optional non-negative coefficients via `--nonnegative` when process\n  physics requires a same-sign response.\n- Normalised lag weights only when the fitted coefficients are same-sign\n  and have non-zero cumulative effect.\n- Lag-placebo diagnostic: regression with future inputs should be weaker\n  than past inputs.\n\nThe implementation uses NumPy\u002FSciPy and pandas.\n\n## Prerequisites\n\n1. `uv` available.\n2. On first use, the script writes `LICENSE_NOTIFICATION.txt`.\n\n## When to Use\n\n- A daily lab response should be related to minute-level or hourly DCS\n  time series.\n- The physical path between a controlled input and the lab measurement\n  has multiple tanks, exchangers, contactors, rundown lines, or recycle\n  paths with different residence times.\n- The LPG sulfur problem-style task: lagged heavy-end balance vs product\n  sulfur, with a horizon of 0-72 h.\n\n## Don't use for\n\n- Forecasting (use ARIMA \u002F state-space \u002F RNN).\n- Non-linear systems where the response saturates.\n- Cases where the lab samples are too few for the lag horizon (a rough\n  rule: at least 5 lab observations per lag bin).\n- Treating the fitted lag coefficients as a physical residence-time\n  distribution unless their signs and shape support that interpretation.\n\n## Utility Scripts\n\n- `uv run scripts\u002Fdlag.py fit --data data.csv --response S_total --predictor z_heavy --max-lag 72 --penalty 1.0 --output \u002Ftmp\u002Fdlag.json`\n- `uv run scripts\u002Fdlag.py fit --data data.csv --response S_total --predictor z_heavy --max-lag 72 --penalty 1.0 --nonnegative --output \u002Ftmp\u002Fdlag_nonnegative.json`\n- `uv run scripts\u002Fdlag.py placebo --data data.csv --response S_total --predictor z_heavy --max-lag 72 --output \u002Ftmp\u002Fplacebo.json`\n\nInput CSV layout: hourly or other regular time grid; response is NaN on\nnon-sample rows. Predictor column carries the high-frequency series.\nThe first `max_lag` rows cannot be fitted because the full lag history is\nnot yet available.\n\n## Procedure\n\n1. Decide the maximum lag horizon from process physics\n   (sum of segment residence times).\n2. Resample the high-frequency series to the lag resolution (e.g. hourly).\n3. Align lab samples to the time grid; carry timestamp uncertainty by\n   fitting shifted grids or by widening the lag kernel.\n4. Fit the unrestricted FIR model first. Inspect cumulative effect and\n   coefficient signs.\n5. If the mechanism requires a same-sign response, refit with\n   `--nonnegative` and compare RSS \u002F plausibility.\n6. Inspect lag-shape summaries: peak effect lag, centroid lag, and time\n   to 50% response if normalised weights are available.\n7. Run the placebo test: replace past inputs with future inputs and refit.\n   The future-input fit should be substantially weaker. If not, a common\n   trend or measurement artefact may be driving the apparent effect.\n8. Block-bootstrap the coefficients (use `time-series-process-data-analysis`)\n   for CIs that account for residual autocorrelation.\n\n## Pitfalls\n\n- Picking a max-lag that is too short; the late lags carry meaningful\n  effect and truncating them inflates the early ones.\n- Picking a max-lag that is too long; the model becomes ill-posed and\n  coefficients are noisy.\n- Failing to penalise smoothness; without it, the FIR coefficients\n  oscillate from lag to lag.\n- Treating the FIR coefficients as independent significance tests; they\n  are highly correlated.\n- Forgetting that the sample timestamp has uncertainty; a ±1 h window\n  shifts the apparent peak.\n- Using a single FIR coefficient set across regimes where the residence\n  times change (e.g. unit turndown).\n- Reporting normalised weights without reporting the cumulative effect\n  magnitude; the former is lag shape, the latter is the process effect.\n- Forcing `--nonnegative` when the response can legitimately reverse sign\n  after control action or composition compensation.\n\n## Fallback Strategies\n\n- If the lab data is too sparse, drop to a single representative lag at\n  the engineering residence time and report it as a screening estimate.\n- If coefficients have mixed signs, report the lag coefficients and\n  cumulative effect directly rather than a residence-time-style kernel.\n\n## Verification\n\n- Run the listed script with representative inputs and an `--output` file when a deterministic calculation is available.\n- Confirm the JSON result contains `ok: true`, expected units, and no unhandled warnings.\n- Check result magnitudes against the stated assumptions, references, and a hand calculation or known operating range before reporting them.\n\n## References\n\n- `references\u002Ffir_setup.md` — exact penalised regression form.\n- Almon, S., \"The distributed lag between capital appropriations and\n  expenditures,\" Econometrica, 1965.\n- Politis, *Subsampling*.\n\n## Anti-Patterns\n\n- Reporting the peak lag as the system time constant without checking the\n  centroid.\n- Skipping the placebo test.\n- Treating FIR weights as physical residence-time distributions when the\n  process model says otherwise.\n","# Distributed-Lag (FIR) Models for Process Data\n\n## Overview\n\nMany process datasets have a low-frequency response (daily lab) tied to\nhigh-frequency inputs (DCS data at per-minute resolution). The effect is\ntypically distributed across several lags reflecting holdup, residence\ntime, and recycle. The naive single-lag regression understates the\ndynamics; a distributed-lag (FIR) model estimates one coefficient for\neach lag and reports both the cumulative effect magnitude and the lag\nshape when the coefficients can be normalised into a kernel.\n\nThis skill provides:\n\n- Penalised FIR regression with second-difference smoothness penalty\n  (`ridge` on Δ² coefficients).\n- Unrestricted lag coefficients by default, preserving effect magnitude\n  and allowing sign changes.\n- Optional non-negative coefficients via `--nonnegative` when process\n  physics requires a same-sign response.\n- Normalised lag weights only when the fitted coefficients are same-sign\n  and have non-zero cumulative effect.\n- Lag-placebo diagnostic: regression with future inputs should be weaker\n  than past inputs.\n\nThe implementation uses NumPy\u002FSciPy and pandas.\n\n## Prerequisites\n\n1. `uv` available.\n2. On first use, the script writes `LICENSE_NOTIFICATION.txt`.\n\n## When to Use\n\n- A daily lab response should be related to minute-level or hourly DCS\n  time series.\n- The physical path between a controlled input and the lab measurement\n  has multiple tanks, exchangers, contactors, rundown lines, or recycle\n  paths with different residence times.\n- The LPG sulfur problem-style task: lagged heavy-end balance vs product\n  sulfur, with a horizon of 0-72 h.\n\n## Don't use for\n\n- Forecasting (use ARIMA \u002F state-space \u002F RNN).\n- Non-linear systems where the response saturates.\n- Cases where the lab samples are too few for the lag horizon (a rough\n  rule: at least 5 lab observations per lag bin).\n- Treating the fitted lag coefficients as a physical residence-time\n  distribution unless their signs and shape support that interpretation.\n\n## Utility Scripts\n\n- `uv run scripts\u002Fdlag.py fit --data data.csv --response S_total --predictor z_heavy --max-lag 72 --penalty 1.0 --output \u002Ftmp\u002Fdlag.json`\n- `uv run scripts\u002Fdlag.py fit --data data.csv --response S_total --predictor z_heavy --max-lag 72 --penalty 1.0 --nonnegative --output \u002Ftmp\u002Fdlag_nonnegative.json`\n- `uv run scripts\u002Fdlag.py placebo --data data.csv --response S_total --predictor z_heavy --max-lag 72 --output \u002Ftmp\u002Fplacebo.json`\n\nInput CSV layout: hourly or other regular time grid; response is NaN on\nnon-sample rows. Predictor column carries the high-frequency series.\nThe first `max_lag` rows cannot be fitted because the full lag history is\nnot yet available.\n\n## Procedure\n\n1. Decide the maximum lag horizon from process physics\n   (sum of segment residence times).\n2. Resample the high-frequency series to the lag resolution (e.g. hourly).\n3. Align lab samples to the time grid; carry timestamp uncertainty by\n   fitting shifted grids or by widening the lag kernel.\n4. Fit the unrestricted FIR model first. Inspect cumulative effect and\n   coefficient signs.\n5. If the mechanism requires a same-sign response, refit with\n   `--nonnegative` and compare RSS \u002F plausibility.\n6. Inspect lag-shape summaries: peak effect lag, centroid lag, and time\n   to 50% response if normalised weights are available.\n7. Run the placebo test: replace past inputs with future inputs and refit.\n   The future-input fit should be substantially weaker. If not, a common\n   trend or measurement artefact may be driving the apparent effect.\n8. Block-bootstrap the coefficients (use `time-series-process-data-analysis`)\n   for CIs that account for residual autocorrelation.\n\n## Pitfalls\n\n- Picking a max-lag that is too short; the late lags carry meaningful\n  effect and truncating them inflates the early ones.\n- Picking a max-lag that is too long; the model becomes ill-posed and\n  coefficients are noisy.\n- Failing to penalise smoothness; without it, the FIR coefficients\n  oscillate from lag to lag.\n- Treating the FIR coefficients as independent significance tests; they\n  are highly correlated.\n- Forgetting that the sample timestamp has uncertainty; a ±1 h window\n  shifts the apparent peak.\n- Using a single FIR coefficient set across regimes where the residence\n  times change (e.g. unit turndown).\n- Reporting normalised weights without reporting the cumulative effect\n  magnitude; the former is lag shape, the latter is the process effect.\n- Forcing `--nonnegative` when the response can legitimately reverse sign\n  after control action or composition compensation.\n\n## Fallback Strategies\n\n- If the lab data is too sparse, drop to a single representative lag at\n  the engineering residence time and report it as a screening estimate.\n- If coefficients have mixed signs, report the lag coefficients and\n  cumulative effect directly rather than a residence-time-style kernel.\n\n## Verification\n\n- Run the listed script with representative inputs and an `--output` file when a deterministic calculation is available.\n- Confirm the JSON result contains `ok: true`, expected units, and no unhandled warnings.\n- Check result magnitudes against the stated assumptions, references, and a hand calculation or known operating range before reporting them.\n\n## References\n\n- `references\u002Ffir_setup.md` — exact penalised regression form.\n- Almon, S., \"The distributed lag between capital appropriations and\n  expenditures,\" Econometrica, 1965.\n- Politis, *Subsampling*.\n\n## Anti-Patterns\n\n- Reporting the peak lag as the system time constant without checking the\n  centroid.\n- Skipping the placebo test.\n- Treating FIR weights as physical residence-time distributions when the\n  process model says otherwise.\n",{"name":5,"risk":24,"source":25,"license":15,"version":26,"category":27,"description":7,"imported_at":28,"source_path":29,"source_repository":30,"disable-model-invocation":20},"low","https:\u002F\u002Fgithub.com\u002Fjskherman\u002Fengg-skills","1.0.0","chemical-engineering","2026-09-20","skills\u002Fdistributed-lag-models\u002FSKILL.md","jskherman\u002Fengg-skills","main","2d1750717747097b602acf30bd09a7cbd4b4c6ea","awesome_skills\u002Fchemical-engineering\u002Fdistributed-lag-models","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous","2026-11-09 11:45:36",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill distributed-lag-models",{"tool":43,"command":44},"bunx","bunx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill distributed-lag-models",{"tool":46,"command":47},"pnpm","pnpm dlx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill distributed-lag-models","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fchemical-engineering\u002Fdistributed-lag-models\u002FSKILL.md",true,[51,57],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"references\u002Ffir_setup.md","REFERENCE","参考文档",2066,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fchemical-engineering\u002Fdistributed-lag-models\u002Freferences\u002Ffir_setup.md",{"path":58,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":61,"sourceHtmlUrl":62},"scripts\u002Fdlag.py","SCRIPT","脚本",7531,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fchemical-engineering\u002Fdistributed-lag-models\u002Fscripts\u002Fdlag.py",[64,72,79,86,93,100],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":71},"01M7FFFZPC2025JQQHPHDX154J","dei-assessment","Assess diversity, equity, and inclusion with metrics. TRIGGERS - Use when user needs help with dei-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-assessment\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":71},"01M7FFFWN8H4WA7A6Y398QKB6J","dei-action-plan","Create DEI action plans with goals and initiatives. TRIGGERS - Use when user needs help with dei-action-plan related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-action-plan\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":71},"01M7FFFSHTM0QZRVZ2NRJTJ0PY","culture-fit-assessment","Design culture add assessment processes. TRIGGERS - Use when user needs help with culture-fit-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fculture-fit-assessment\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":71},"01M7FFFMA12RKEQA38KHJSXXPS","cowork-to-code-bridge","Use an already-installed, independently verified cowork-to-code bridge to run narrowly approved actions on the user's own macOS, Linux, or WSL2 machine through a local file queue.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcowork-to-code-bridge\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":71},"01M7FFFH1F6M8YRGW5V487GH1K","counter-offer-response","Draft counter-offer responses for retention. TRIGGERS - Use when user needs help with counter-offer-response related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcounter-offer-response\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":71},"01M7FFFDGEHV8Y7J9N40HZXW52","continuous-feedback-system","Design continuous feedback systems. TRIGGERS - Use when user needs help with continuous-feedback-system related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcontinuous-feedback-system\u002FSKILL.md",[],[]]