[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74Y9MSJWY8BEMJAGZ1JN4C0":3,"skill-same:01M74Y9MSJWY8BEMJAGZ1JN4C0":126},{"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":32,"commitSha":33,"skillDirectory":34,"forksCount":35,"repositoryHtmlUrl":36,"repositoryHomepageUrl":37,"ownerHtmlUrl":38,"ownerBlogUrl":39,"ownerDescription":40,"updatedAt":41,"install":42,"resources":55},"01M74Y9MSJWY8BEMJAGZ1JN4C0","analytical-method-validation",null,"Plans and evaluates analytical method validation, verification, and transfer using Python scripts (plan_validation, check_response, check_accuracy_precision, check_detection_limits, check_bioanalytical_run, compare_methods) under ICH Q2(R2)\u002FQ14, ICH M10, USP 1220\u002F1225\u002F1226, CLSI EP, or ISO\u002FIEC 17025. Covers protocols, linearity, accuracy and precision, DL\u002FQL, M10 run checks, TOST equivalence, Deming and Passing-Bablok. Use when designing a validation protocol with pre-stated acceptance criteria. Use when evaluating linearity, precision, or detection limit data. Use when checking an ICH M10 bioanalytical run or ISR. Use when comparing or transferring a method between labs. Does not decide a method is validated; USP, CLSI, ISO text is not supplied.","KalarisLabs\u002Fresearch-agent-skills","KalarisLabs","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F300878568?v=4","01M74Y7MT23GXXC56VM6TVSXZY","Kalarislabs","01M74Y7MTQM9REXZX4SNXWX95C",132,"MIT","https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fanalytical-method-validation\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: analytical-method-validation\ndescription: Plans and evaluates analytical method validation, verification, and transfer using Python scripts (plan_validation, check_response, check_accuracy_precision, check_detection_limits, check_bioanalytical_run, compare_methods) under ICH Q2(R2)\u002FQ14, ICH M10, USP 1220\u002F1225\u002F1226, CLSI EP, or ISO\u002FIEC 17025. Covers protocols, linearity, accuracy and precision, DL\u002FQL, M10 run checks, TOST equivalence, Deming and Passing-Bablok. Use when designing a validation protocol with pre-stated acceptance criteria. Use when evaluating linearity, precision, or detection limit data. Use when checking an ICH M10 bioanalytical run or ISR. Use when comparing or transferring a method between labs. Does not decide a method is validated; USP, CLSI, ISO text is not supplied.\nlicense: MIT\ncompatibility: Requires Python 3.11+. Scripts use only the standard library - no numpy, scipy, or network access. Statistical distributions are computed from first principles so results are reproducible in any conforming interpreter.\nallowed-tools: Read Write Edit Bash\nmetadata:\n  version: '1.1'\n  category: ideation-and-design\n  maintainer: Kalaris Labs\n  last-reviewed: '2026-07-27'\n  tags: method validation, ICH Q2, bioanalysis, analytical chemistry, quality control\n---\n\n# Analytical Method Validation\n\n## When to use\n\nAny time the question is whether an analytical procedure is fit for its intended purpose:\ndesigning a validation study, evaluating validation data, verifying a compendial procedure,\ntransferring a procedure to another laboratory or instrument, or defending any of these in a\nreport.\n\n## The two rules\n\n**1. Establish which framework governs before designing anything.** The same assay validates\ndifferently under ICH Q2(R2), USP \u003C1225>, ICH M10, CLSI EP, and ISO\u002FIEC 17025. They differ in\nwhich characteristics are required, how the studies are laid out, and whether numeric acceptance\ncriteria are supplied at all. Blending them produces a protocol that satisfies none of them.\n\n**2. State acceptance criteria before collecting data.** Criteria chosen after seeing results are\nnot acceptance criteria, and deciding them post hoc is a standing audit finding. ICH Q2(R2)\ndeliberately supplies almost no numeric criteria — they have to come from the specification, the\nanalytical target profile (ICH Q14 section 3), or development data. ICH M10 is the exception: it\nsupplies explicit numbers, and they differ between chromatographic assays and ligand binding\nassays.\n\n## Scope\n\nThis skill plans studies, computes the statistics correctly, and structures the documentation. It\ndoes **not** decide that a procedure is validated, release a batch, accept or reject a run, close\nan investigation, or substitute for the analyst, the technical reviewer, the quality unit, or the\nregulator. Every script reports; none of them concludes.\n\n## Copyright boundary\n\nICH guidelines are published openly and licensed for reuse with acknowledgement, so their\nrequirements are encoded directly in this skill. **USP general chapters, CLSI EP documents, and\nISO standards are copyrighted and paywalled.** For those, this skill supplies the designation,\nscope, and where to obtain an authorised copy — never the text, never invented thresholds. Do not\nask an agent to retrieve, transcribe, or reconstruct their content. If a number matters and it\nlives in a paywalled document, read it from the authorised copy.\n\n## Frameworks\n\n```bash\ncd skills\u002Fanalytical-method-validation\u002Fscripts\npython3 plan_validation.py --list-frameworks\n```\n\n| Key | Governs | Numeric criteria supplied |\n| --- | --- | --- |\n| `ich-q2r2` | Release and stability testing of drug substances and products | Almost none — you derive them |\n| `ich-m10` | Bioanalytical concentration measurement (PK, TK, BE) | Yes, and they differ by modality |\n| `usp-1220` | Compendial procedure lifecycle, three stages | Paywalled |\n| `usp-1225` \u002F `usp-1226` | Validation \u002F verification of compendial procedures | Paywalled |\n| `clsi` | Clinical laboratory measurement procedures (EP series) | Paywalled |\n| `iso-17025` | Lab-developed and modified methods under accreditation | No — \"to the extent necessary\" |\n\n**Q2(R2) replaced Q2(R1) in November 2023 and restructured the characteristics.** Range is now\nthe parent characteristic (section 3.2), containing *response* (linearity) and *validation of\nlower range limits* (DL\u002FQL). Accuracy and precision are section 3.3 and may be evaluated in\ncombination against a single criterion. Robustness is treated as a development activity and\ncross-refers to ICH Q14. Multivariate procedures are addressed explicitly (2.5 and 3.2.2.3), and\nAnnex 2 adds worked examples for techniques Q2(R1) never covered — quantitative ¹H-NMR, NIR,\nquantitative LC\u002FMS, qPCR, biological assays, and particle size. A Q2(R1)-shaped protocol — a flat\nlist of linearity, range, accuracy, precision, specificity, LOD, LOQ, robustness — is out of date.\nNote also the error correction dated 30 November 2023 to Table 5 and Tables 6–11.\n\n## Scripts\n\n```bash\ncd skills\u002Fanalytical-method-validation\u002Fscripts\n```\n\n| Script | Question answered |\n| --- | --- |\n| `plan_validation.py` | Which framework, which characteristics, what study layout, what protocol? |\n| `check_response.py` | Does the calibration model actually hold across the range? |\n| `check_accuracy_precision.py` | What is the recovery, and how much of the variability is between days? |\n| `check_detection_limits.py` | What are DL and QL by each allowed approach, and do they serve the reporting threshold? |\n| `check_bioanalytical_run.py` | Does this run meet ICH M10 for its modality? |\n| `compare_methods.py` | Are two procedures equivalent, at a pre-stated margin? |\n\nAll take `--format table|tsv|json`. Provenance, guideline citations, and caveats go to stderr;\ndata goes to stdout, so `> out.tsv` keeps them separate. Exit code is `0` for no findings, `1`\nwhen findings were raised, `2` for bad input — so any of them can gate a workflow.\n\n## Workflow\n\n### 1. Fix the framework and the required characteristics\n\n```bash\npython3 plan_validation.py --framework ich-q2r2 --attribute assay --technique hplc --range-use assay\n```\n\nQ2(R2) Table 1 decides what is required from the *measured attribute*, not from the technique. For\nan assay: specificity, response, accuracy, repeatability, intermediate precision. For a limit\ntest: specificity and DL only. For an identity test: specificity alone. Attributes accepted include\n`assay`, `impurity` (quantitative), `impurity-limit`, and `identity`.\n\nReportable range comes from the specification. Q2(R2) Table 2 gives worked examples — 80–120% of\ndeclared content for an assay, 70–130% for content uniformity, reporting threshold to 120% of the\nspecification for an impurity.\n\n### 2. Generate the protocol and fill in the criteria\n\n```bash\npython3 plan_validation.py --framework ich-q2r2 --attribute impurity --protocol > protocol.md\n```\n\nEvery bracketed field is a decision to make and record *before* data collection. The protocol\nskeleton deliberately refuses to pre-fill acceptance criteria for Q2(R2) work, because there is no\ndefensible default.\n\n### 3. Evaluate the response\n\n```bash\npython3 check_response.py -i calibration.csv --max-back-calc-error 2\n```\n\nInput is `level,response`, one row per injection; repeated rows at the same level are replicates,\nand supplying them is what makes the linearity test possible.\n\nReal output from a curve that a coefficient of determination would wave through:\n\n```\nstatistic                           value\ndistinct levels                     5\nslope                               166.6000\nintercept                           2495.0000\nintercept CI includes 0             no\ncoefficient of determination (r2)   0.9830\nlack-of-fit F                       469.5294\nlack-of-fit p                       1.5139e-06\nruns test p                         0.0492\n\nlevel     n  mean_response  mean_back_calculated  relative_error_pct\n50.0000   2  10075.0000     45.4982               -9.0036\n75.0000   2  15150.0000     75.9604               1.2805\n100.0000  2  20050.0000     105.3721              5.3721\n125.0000  2  24050.0000     129.3818              3.5054\n150.0000  2  26450.0000     143.7875              -4.1417\n```\n\nr² = 0.983 and the model is unusable: −9.0% back-calculated error at the bottom of the range,\nlack-of-fit p = 1.5 × 10⁻⁶, non-random residual signs. **r² is not evidence of linearity** — it\nrises with range and is nearly insensitive to curvature. The lack-of-fit F test against pure error\nand the residual pattern are the evidence, which is why Q2(R2) 3.2.2.1 asks for an analysis of the\ndeviation of points from the line rather than a correlation coefficient alone.\n\nAdd `--weight 1\u002Fx2` for a wide-range curve. The script flags heteroscedasticity when the residual\nvariance in the top third of the range exceeds the bottom third by more than 10×, because an\nunweighted fit then biases exactly the low end where a reporting threshold lives.\n\n### 4. Evaluate accuracy and precision\n\n```bash\npython3 check_accuracy_precision.py -i ap.csv --accuracy-limit 2 --rsd-limit 1.0 --design-check assay\n```\n\nInput is `level,measured,group`, where `group` is the intermediate-precision factor — day, analyst,\nor instrument.\n\n```\nlevel  component                       sd      rsd_pct  df      ci90_low_sd  ci90_high_sd\n100    repeatability (within group)    0.0707  0.0707   3       0.0438       0.2065\n100    between-group                   1.6515  1.6515   2       n\u002Fa          n\u002Fa\n100    intermediate precision (total)  1.6530  1.6530   2.0037  0.9554       7.2821\n```\n\nRepeatability of 0.07% RSD looks superb; intermediate precision is 1.65%, twenty-three times\nlarger, because the variability lives entirely between days. Reporting the within-day figure as\nthe procedure's precision would understate routine performance by more than an order of magnitude.\nThis is why the script fits a one-way random-effects model rather than pooling.\n\nTwo traps the script handles for you:\n\n- **Precision is estimated within each level, never pooled across levels.** Pooling 80\u002F100\u002F120%\n  results into one standard deviation turns the range itself into apparent imprecision. The script\n  reports per level, plus a level-independent view as percent of nominal.\n- **`--require-ci-within-limit`** enforces that the whole confidence interval sits inside the\n  limit, not just the mean. Q2(R2) 3.3.1.4 asks for the interval to be *compatible with* the\n  criterion; a mean that scrapes inside on six replicates has not demonstrated much.\n\n### 5. Establish DL and QL, and confirm them\n\n```bash\npython3 check_detection_limits.py --calibration lowcal.csv --blanks blanks.csv \\\n    --confirm-ql 0.05 --confirm-data ql_check.csv --reporting-threshold 0.05\n```\n\n```\napproach                                          sigma   slope      DL      QL\nsd-and-slope (sigma = residual SD of regression)  7.2816  5033.3490  0.0048  0.0145\nsd-and-slope (sigma = SD of y-intercept)          4.3303  5033.3490  0.0028  0.0086\nsd-and-slope (sigma = SD of 8 blanks)             3.7702  5033.3490  0.0025  0.0075\n```\n\nThe same data give QL estimates spanning 1.9×, purely from the choice of σ. Q2(R2) 3.2.3.5\ntherefore requires the limit **and the approach used to determine it** to be reported, and an\nestimated limit to be confirmed with samples at or near it. For an impurity procedure the QL must\nbe at or below the reporting threshold. Reaching for `3.3σ\u002Fslope` reflexively, reporting one number\nwith no named approach, and never confirming it are three separate findings.\n\n### 6. Bioanalytical runs under ICH M10\n\n```bash\npython3 check_bioanalytical_run.py --modality chromatographic --run run1.csv\npython3 check_bioanalytical_run.py --modality lba --isr isr.csv\npython3 check_bioanalytical_run.py --modality lba --criteria\n```\n\n`--modality` is mandatory and has no default, because the criteria genuinely differ:\n\n| | Chromatographic | Ligand binding assay |\n| --- | --- | --- |\n| Calibration tolerance | ±15%, ±20% at LLOQ | ±20%, ±25% at LLOQ and ULOQ |\n| Accuracy \u002F precision | ±15% \u002F ≤15% CV (±20% \u002F ≤20% at LLOQ) | ±20% \u002F ≤20% CV (±25% \u002F ≤25% at LLOQ and ULOQ) |\n| A&P design | 4 QC levels, 5 replicates\u002Frun, ≥3 runs over ≥2 days | 5 QC levels, 3 replicates\u002Frun, ≥6 runs over ≥2 days |\n| Total error | no such criterion | ≤30%, ≤40% at LLOQ and ULOQ |\n| ISR agreement | ±20% for ≥2\u002F3 of repeats | ±30% for ≥2\u002F3 of repeats |\n\nApplying the ±15% chromatographic numbers to a ligand binding assay, or importing the LBA total-error\ncriterion into a chromatographic method, are both common and both wrong.\n\nThe run check enforces the per-level rule that gets missed: at least 2\u002F3 of *all* QCs **and** at\nleast 50% at *each* level. A run can pass the overall fraction while a single level fails\ncompletely.\n\n```\nfinding: QC level high: 0\u002F2 within tolerance (0%); M10 requires at least 50% at each level\n```\n\n### 7. Transfer and method comparison\n\n```bash\npython3 compare_methods.py -i paired.csv --margin 2 --relative --slope-tolerance 0.05\n```\n\n```\nmean difference (%)                       1.4646\nTOST margin                               2.0000\nTOST p-value                              1.0528e-13\n90% CI (TOST)                             1.44127 to 1.48797\nequivalent at stated margin               yes\n--- for contrast only ---\npaired t-test p (NOT equivalence)         0.0000\nOLS slope (biased here)                   1.0396\nDeming slope                              1.0398\nPassing-Bablok slope                      1.0351\n```\n\nTwo errors this replaces:\n\n- **\"p > 0.05, no significant difference, therefore the methods are equivalent.\"** Failing to\n  detect a difference is not evidence of equivalence, and on a small transfer dataset that outcome\n  is close to guaranteed. TOST tests the hypothesis that matters — that the true difference lies\n  inside a pre-stated margin. Here the t test says the difference is highly significant *and* TOST\n  says the methods are equivalent at ±2%; both are true, and only one answers the question.\n- **Ordinary least squares for method comparison.** OLS assumes the reference values carry no\n  error, which is false when comparing two procedures, and biases the slope toward zero. Deming\n  (with a stated error-variance ratio) and Passing–Bablok (non-parametric, outlier-resistant) are\n  the appropriate regressions and are reported side by side with OLS for contrast.\n\nThe script also flags proportional bias — when the difference trends with concentration, a single\nmean bias and its limits of agreement are misleading regardless of how tight they look.\n\n## What this skill exists to prevent\n\n1. Validating against ICH Q2(R1)'s structure three years after Q2(R2) replaced it.\n2. Acceptance criteria written after the data were seen.\n3. r² presented as evidence of linearity.\n4. Repeatability reported as the procedure's precision, with the between-day component invisible.\n5. One DL\u002FQL number with no named approach and no confirmation.\n6. Chromatographic M10 criteria applied to a ligand binding assay, or the reverse.\n7. A t test's non-significance presented as equivalence at a method transfer.\n\n## References\n\n- `references\u002Fframework-selection.md` — which framework governs, and the questions that decide it\n- `references\u002Fich-q2r2.md` — structure, Table 1 and Table 2, per-characteristic recommended data\n- `references\u002Fich-m10-bioanalytical.md` — the full chromatographic and LBA criteria side by side\n- `references\u002Fcompendial-and-clsi.md` — USP, CLSI and ISO designations, scope, and how to cite them\n- `references\u002Fstatistics.md` — the statistical methods, why each one, and the common errors\n- `references\u002Fsource-ledger.md` — provenance and research dates for every claim in this skill\n\n## Assets\n\n- `assets\u002Fvalidation-protocol-template.md` — protocol structure with criteria stated up front\n- `assets\u002Fvalidation-report-template.md` — report structure with raw-data traceability\n\n## Related skills\n\n- `iso-standards-readiness`: Prepares and structurally reviews readiness evidence for ISO management-system and laboratory-competence standards - ISO 13485 medical devi…\n","# Analytical Method Validation\n\n## When to use\n\nAny time the question is whether an analytical procedure is fit for its intended purpose:\ndesigning a validation study, evaluating validation data, verifying a compendial procedure,\ntransferring a procedure to another laboratory or instrument, or defending any of these in a\nreport.\n\n## The two rules\n\n**1. Establish which framework governs before designing anything.** The same assay validates\ndifferently under ICH Q2(R2), USP \u003C1225>, ICH M10, CLSI EP, and ISO\u002FIEC 17025. They differ in\nwhich characteristics are required, how the studies are laid out, and whether numeric acceptance\ncriteria are supplied at all. Blending them produces a protocol that satisfies none of them.\n\n**2. State acceptance criteria before collecting data.** Criteria chosen after seeing results are\nnot acceptance criteria, and deciding them post hoc is a standing audit finding. ICH Q2(R2)\ndeliberately supplies almost no numeric criteria — they have to come from the specification, the\nanalytical target profile (ICH Q14 section 3), or development data. ICH M10 is the exception: it\nsupplies explicit numbers, and they differ between chromatographic assays and ligand binding\nassays.\n\n## Scope\n\nThis skill plans studies, computes the statistics correctly, and structures the documentation. It\ndoes **not** decide that a procedure is validated, release a batch, accept or reject a run, close\nan investigation, or substitute for the analyst, the technical reviewer, the quality unit, or the\nregulator. Every script reports; none of them concludes.\n\n## Copyright boundary\n\nICH guidelines are published openly and licensed for reuse with acknowledgement, so their\nrequirements are encoded directly in this skill. **USP general chapters, CLSI EP documents, and\nISO standards are copyrighted and paywalled.** For those, this skill supplies the designation,\nscope, and where to obtain an authorised copy — never the text, never invented thresholds. Do not\nask an agent to retrieve, transcribe, or reconstruct their content. If a number matters and it\nlives in a paywalled document, read it from the authorised copy.\n\n## Frameworks\n\n```bash\ncd skills\u002Fanalytical-method-validation\u002Fscripts\npython3 plan_validation.py --list-frameworks\n```\n\n| Key | Governs | Numeric criteria supplied |\n| --- | --- | --- |\n| `ich-q2r2` | Release and stability testing of drug substances and products | Almost none — you derive them |\n| `ich-m10` | Bioanalytical concentration measurement (PK, TK, BE) | Yes, and they differ by modality |\n| `usp-1220` | Compendial procedure lifecycle, three stages | Paywalled |\n| `usp-1225` \u002F `usp-1226` | Validation \u002F verification of compendial procedures | Paywalled |\n| `clsi` | Clinical laboratory measurement procedures (EP series) | Paywalled |\n| `iso-17025` | Lab-developed and modified methods under accreditation | No — \"to the extent necessary\" |\n\n**Q2(R2) replaced Q2(R1) in November 2023 and restructured the characteristics.** Range is now\nthe parent characteristic (section 3.2), containing *response* (linearity) and *validation of\nlower range limits* (DL\u002FQL). Accuracy and precision are section 3.3 and may be evaluated in\ncombination against a single criterion. Robustness is treated as a development activity and\ncross-refers to ICH Q14. Multivariate procedures are addressed explicitly (2.5 and 3.2.2.3), and\nAnnex 2 adds worked examples for techniques Q2(R1) never covered — quantitative ¹H-NMR, NIR,\nquantitative LC\u002FMS, qPCR, biological assays, and particle size. A Q2(R1)-shaped protocol — a flat\nlist of linearity, range, accuracy, precision, specificity, LOD, LOQ, robustness — is out of date.\nNote also the error correction dated 30 November 2023 to Table 5 and Tables 6–11.\n\n## Scripts\n\n```bash\ncd skills\u002Fanalytical-method-validation\u002Fscripts\n```\n\n| Script | Question answered |\n| --- | --- |\n| `plan_validation.py` | Which framework, which characteristics, what study layout, what protocol? |\n| `check_response.py` | Does the calibration model actually hold across the range? |\n| `check_accuracy_precision.py` | What is the recovery, and how much of the variability is between days? |\n| `check_detection_limits.py` | What are DL and QL by each allowed approach, and do they serve the reporting threshold? |\n| `check_bioanalytical_run.py` | Does this run meet ICH M10 for its modality? |\n| `compare_methods.py` | Are two procedures equivalent, at a pre-stated margin? |\n\nAll take `--format table|tsv|json`. Provenance, guideline citations, and caveats go to stderr;\ndata goes to stdout, so `> out.tsv` keeps them separate. Exit code is `0` for no findings, `1`\nwhen findings were raised, `2` for bad input — so any of them can gate a workflow.\n\n## Workflow\n\n### 1. Fix the framework and the required characteristics\n\n```bash\npython3 plan_validation.py --framework ich-q2r2 --attribute assay --technique hplc --range-use assay\n```\n\nQ2(R2) Table 1 decides what is required from the *measured attribute*, not from the technique. For\nan assay: specificity, response, accuracy, repeatability, intermediate precision. For a limit\ntest: specificity and DL only. For an identity test: specificity alone. Attributes accepted include\n`assay`, `impurity` (quantitative), `impurity-limit`, and `identity`.\n\nReportable range comes from the specification. Q2(R2) Table 2 gives worked examples — 80–120% of\ndeclared content for an assay, 70–130% for content uniformity, reporting threshold to 120% of the\nspecification for an impurity.\n\n### 2. Generate the protocol and fill in the criteria\n\n```bash\npython3 plan_validation.py --framework ich-q2r2 --attribute impurity --protocol > protocol.md\n```\n\nEvery bracketed field is a decision to make and record *before* data collection. The protocol\nskeleton deliberately refuses to pre-fill acceptance criteria for Q2(R2) work, because there is no\ndefensible default.\n\n### 3. Evaluate the response\n\n```bash\npython3 check_response.py -i calibration.csv --max-back-calc-error 2\n```\n\nInput is `level,response`, one row per injection; repeated rows at the same level are replicates,\nand supplying them is what makes the linearity test possible.\n\nReal output from a curve that a coefficient of determination would wave through:\n\n```\nstatistic                           value\ndistinct levels                     5\nslope                               166.6000\nintercept                           2495.0000\nintercept CI includes 0             no\ncoefficient of determination (r2)   0.9830\nlack-of-fit F                       469.5294\nlack-of-fit p                       1.5139e-06\nruns test p                         0.0492\n\nlevel     n  mean_response  mean_back_calculated  relative_error_pct\n50.0000   2  10075.0000     45.4982               -9.0036\n75.0000   2  15150.0000     75.9604               1.2805\n100.0000  2  20050.0000     105.3721              5.3721\n125.0000  2  24050.0000     129.3818              3.5054\n150.0000  2  26450.0000     143.7875              -4.1417\n```\n\nr² = 0.983 and the model is unusable: −9.0% back-calculated error at the bottom of the range,\nlack-of-fit p = 1.5 × 10⁻⁶, non-random residual signs. **r² is not evidence of linearity** — it\nrises with range and is nearly insensitive to curvature. The lack-of-fit F test against pure error\nand the residual pattern are the evidence, which is why Q2(R2) 3.2.2.1 asks for an analysis of the\ndeviation of points from the line rather than a correlation coefficient alone.\n\nAdd `--weight 1\u002Fx2` for a wide-range curve. The script flags heteroscedasticity when the residual\nvariance in the top third of the range exceeds the bottom third by more than 10×, because an\nunweighted fit then biases exactly the low end where a reporting threshold lives.\n\n### 4. Evaluate accuracy and precision\n\n```bash\npython3 check_accuracy_precision.py -i ap.csv --accuracy-limit 2 --rsd-limit 1.0 --design-check assay\n```\n\nInput is `level,measured,group`, where `group` is the intermediate-precision factor — day, analyst,\nor instrument.\n\n```\nlevel  component                       sd      rsd_pct  df      ci90_low_sd  ci90_high_sd\n100    repeatability (within group)    0.0707  0.0707   3       0.0438       0.2065\n100    between-group                   1.6515  1.6515   2       n\u002Fa          n\u002Fa\n100    intermediate precision (total)  1.6530  1.6530   2.0037  0.9554       7.2821\n```\n\nRepeatability of 0.07% RSD looks superb; intermediate precision is 1.65%, twenty-three times\nlarger, because the variability lives entirely between days. Reporting the within-day figure as\nthe procedure's precision would understate routine performance by more than an order of magnitude.\nThis is why the script fits a one-way random-effects model rather than pooling.\n\nTwo traps the script handles for you:\n\n- **Precision is estimated within each level, never pooled across levels.** Pooling 80\u002F100\u002F120%\n  results into one standard deviation turns the range itself into apparent imprecision. The script\n  reports per level, plus a level-independent view as percent of nominal.\n- **`--require-ci-within-limit`** enforces that the whole confidence interval sits inside the\n  limit, not just the mean. Q2(R2) 3.3.1.4 asks for the interval to be *compatible with* the\n  criterion; a mean that scrapes inside on six replicates has not demonstrated much.\n\n### 5. Establish DL and QL, and confirm them\n\n```bash\npython3 check_detection_limits.py --calibration lowcal.csv --blanks blanks.csv \\\n    --confirm-ql 0.05 --confirm-data ql_check.csv --reporting-threshold 0.05\n```\n\n```\napproach                                          sigma   slope      DL      QL\nsd-and-slope (sigma = residual SD of regression)  7.2816  5033.3490  0.0048  0.0145\nsd-and-slope (sigma = SD of y-intercept)          4.3303  5033.3490  0.0028  0.0086\nsd-and-slope (sigma = SD of 8 blanks)             3.7702  5033.3490  0.0025  0.0075\n```\n\nThe same data give QL estimates spanning 1.9×, purely from the choice of σ. Q2(R2) 3.2.3.5\ntherefore requires the limit **and the approach used to determine it** to be reported, and an\nestimated limit to be confirmed with samples at or near it. For an impurity procedure the QL must\nbe at or below the reporting threshold. Reaching for `3.3σ\u002Fslope` reflexively, reporting one number\nwith no named approach, and never confirming it are three separate findings.\n\n### 6. Bioanalytical runs under ICH M10\n\n```bash\npython3 check_bioanalytical_run.py --modality chromatographic --run run1.csv\npython3 check_bioanalytical_run.py --modality lba --isr isr.csv\npython3 check_bioanalytical_run.py --modality lba --criteria\n```\n\n`--modality` is mandatory and has no default, because the criteria genuinely differ:\n\n| | Chromatographic | Ligand binding assay |\n| --- | --- | --- |\n| Calibration tolerance | ±15%, ±20% at LLOQ | ±20%, ±25% at LLOQ and ULOQ |\n| Accuracy \u002F precision | ±15% \u002F ≤15% CV (±20% \u002F ≤20% at LLOQ) | ±20% \u002F ≤20% CV (±25% \u002F ≤25% at LLOQ and ULOQ) |\n| A&P design | 4 QC levels, 5 replicates\u002Frun, ≥3 runs over ≥2 days | 5 QC levels, 3 replicates\u002Frun, ≥6 runs over ≥2 days |\n| Total error | no such criterion | ≤30%, ≤40% at LLOQ and ULOQ |\n| ISR agreement | ±20% for ≥2\u002F3 of repeats | ±30% for ≥2\u002F3 of repeats |\n\nApplying the ±15% chromatographic numbers to a ligand binding assay, or importing the LBA total-error\ncriterion into a chromatographic method, are both common and both wrong.\n\nThe run check enforces the per-level rule that gets missed: at least 2\u002F3 of *all* QCs **and** at\nleast 50% at *each* level. A run can pass the overall fraction while a single level fails\ncompletely.\n\n```\nfinding: QC level high: 0\u002F2 within tolerance (0%); M10 requires at least 50% at each level\n```\n\n### 7. Transfer and method comparison\n\n```bash\npython3 compare_methods.py -i paired.csv --margin 2 --relative --slope-tolerance 0.05\n```\n\n```\nmean difference (%)                       1.4646\nTOST margin                               2.0000\nTOST p-value                              1.0528e-13\n90% CI (TOST)                             1.44127 to 1.48797\nequivalent at stated margin               yes\n--- for contrast only ---\npaired t-test p (NOT equivalence)         0.0000\nOLS slope (biased here)                   1.0396\nDeming slope                              1.0398\nPassing-Bablok slope                      1.0351\n```\n\nTwo errors this replaces:\n\n- **\"p > 0.05, no significant difference, therefore the methods are equivalent.\"** Failing to\n  detect a difference is not evidence of equivalence, and on a small transfer dataset that outcome\n  is close to guaranteed. TOST tests the hypothesis that matters — that the true difference lies\n  inside a pre-stated margin. Here the t test says the difference is highly significant *and* TOST\n  says the methods are equivalent at ±2%; both are true, and only one answers the question.\n- **Ordinary least squares for method comparison.** OLS assumes the reference values carry no\n  error, which is false when comparing two procedures, and biases the slope toward zero. Deming\n  (with a stated error-variance ratio) and Passing–Bablok (non-parametric, outlier-resistant) are\n  the appropriate regressions and are reported side by side with OLS for contrast.\n\nThe script also flags proportional bias — when the difference trends with concentration, a single\nmean bias and its limits of agreement are misleading regardless of how tight they look.\n\n## What this skill exists to prevent\n\n1. Validating against ICH Q2(R1)'s structure three years after Q2(R2) replaced it.\n2. Acceptance criteria written after the data were seen.\n3. r² presented as evidence of linearity.\n4. Repeatability reported as the procedure's precision, with the between-day component invisible.\n5. One DL\u002FQL number with no named approach and no confirmation.\n6. Chromatographic M10 criteria applied to a ligand binding assay, or the reverse.\n7. A t test's non-significance presented as equivalence at a method transfer.\n\n## References\n\n- `references\u002Fframework-selection.md` — which framework governs, and the questions that decide it\n- `references\u002Fich-q2r2.md` — structure, Table 1 and Table 2, per-characteristic recommended data\n- `references\u002Fich-m10-bioanalytical.md` — the full chromatographic and LBA criteria side by side\n- `references\u002Fcompendial-and-clsi.md` — USP, CLSI and ISO designations, scope, and how to cite them\n- `references\u002Fstatistics.md` — the statistical methods, why each one, and the common errors\n- `references\u002Fsource-ledger.md` — provenance and research dates for every claim in this skill\n\n## Assets\n\n- `assets\u002Fvalidation-protocol-template.md` — protocol structure with criteria stated up front\n- `assets\u002Fvalidation-report-template.md` — report structure with raw-data traceability\n\n## Related skills\n\n- `iso-standards-readiness`: Prepares and structurally reviews readiness evidence for ISO management-system and laboratory-competence standards - ISO 13485 medical devi…\n",{"name":5,"license":15,"metadata":24,"description":7,"allowed-tools":30,"compatibility":31},{"tags":25,"version":26,"category":27,"maintainer":28,"last-reviewed":29},"method validation, ICH Q2, bioanalysis, analytical chemistry, quality control","1.1","ideation-and-design","Kalaris Labs","2026-07-27","Read Write Edit Bash","Requires Python 3.11+. Scripts use only the standard library - no numpy, scipy, or network access. Statistical distributions are computed from first principles so results are reproducible in any conforming interpreter.","main","29fe36d26127205057d5e0ed8425f6b0e9a8c13a","skills\u002Fanalytical-method-validation",16,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills","https:\u002F\u002Fdocs.kalarislabs.com\u002Fresearch-agent-skills","https:\u002F\u002Fgithub.com\u002FKalarisLabs","kalarislabs.com","Applied AI lab building the infrastructure for the agentic era","2026-11-14 17:49:08",{"source":8,"skillName":5,"commands":43,"prompt":53,"zipAvailable":54},[44,47,50],{"tool":45,"command":46},"npx","npx skills add KalarisLabs\u002Fresearch-agent-skills --skill analytical-method-validation",{"tool":48,"command":49},"bunx","bunx skills add KalarisLabs\u002Fresearch-agent-skills --skill analytical-method-validation",{"tool":51,"command":52},"pnpm","pnpm dlx skills add KalarisLabs\u002Fresearch-agent-skills --skill analytical-method-validation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fanalytical-method-validation\u002FSKILL.md",true,[56,62,66,72,76,80,84,88,92,98,102,106,110,114,118,122],{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"assets\u002Fvalidation-protocol-template.md","ASSET","资产文件",4021,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fanalytical-method-validation\u002Fassets\u002Fvalidation-protocol-template.md",{"path":63,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":64,"sourceHtmlUrl":65},"assets\u002Fvalidation-report-template.md",3945,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fanalytical-method-validation\u002Fassets\u002Fvalidation-report-template.md",{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},"references\u002Fcompendial-and-clsi.md","REFERENCE","参考文档",7442,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fanalytical-method-validation\u002Freferences\u002Fcompendial-and-clsi.md",{"path":73,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":74,"sourceHtmlUrl":75},"references\u002Fframework-selection.md",5250,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fanalytical-method-validation\u002Freferences\u002Fframework-selection.md",{"path":77,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":78,"sourceHtmlUrl":79},"references\u002Fich-m10-bioanalytical.md",7324,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fanalytical-method-validation\u002Freferences\u002Fich-m10-bioanalytical.md",{"path":81,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":82,"sourceHtmlUrl":83},"references\u002Fich-q2r2.md",13596,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fanalytical-method-validation\u002Freferences\u002Fich-q2r2.md",{"path":85,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":86,"sourceHtmlUrl":87},"references\u002Fsource-ledger.md",7888,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fanalytical-method-validation\u002Freferences\u002Fsource-ledger.md",{"path":89,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":90,"sourceHtmlUrl":91},"references\u002Fstatistics.md",11370,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fanalytical-method-validation\u002Freferences\u002Fstatistics.md",{"path":93,"resourceType":94,"resourceTypeDesc":95,"sizeBytes":96,"sourceHtmlUrl":97},"scripts\u002F_catalog.py","SCRIPT","脚本",23781,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fanalytical-method-validation\u002Fscripts\u002F_catalog.py",{"path":99,"resourceType":94,"resourceTypeDesc":95,"sizeBytes":100,"sourceHtmlUrl":101},"scripts\u002F_common.py",33072,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fanalytical-method-validation\u002Fscripts\u002F_common.py",{"path":103,"resourceType":94,"resourceTypeDesc":95,"sizeBytes":104,"sourceHtmlUrl":105},"scripts\u002Fcheck_accuracy_precision.py",17666,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fanalytical-method-validation\u002Fscripts\u002Fcheck_accuracy_precision.py",{"path":107,"resourceType":94,"resourceTypeDesc":95,"sizeBytes":108,"sourceHtmlUrl":109},"scripts\u002Fcheck_bioanalytical_run.py",11457,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fanalytical-method-validation\u002Fscripts\u002Fcheck_bioanalytical_run.py",{"path":111,"resourceType":94,"resourceTypeDesc":95,"sizeBytes":112,"sourceHtmlUrl":113},"scripts\u002Fcheck_detection_limits.py",14348,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fanalytical-method-validation\u002Fscripts\u002Fcheck_detection_limits.py",{"path":115,"resourceType":94,"resourceTypeDesc":95,"sizeBytes":116,"sourceHtmlUrl":117},"scripts\u002Fcheck_response.py",9925,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fanalytical-method-validation\u002Fscripts\u002Fcheck_response.py",{"path":119,"resourceType":94,"resourceTypeDesc":95,"sizeBytes":120,"sourceHtmlUrl":121},"scripts\u002Fcompare_methods.py",9147,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fanalytical-method-validation\u002Fscripts\u002Fcompare_methods.py",{"path":123,"resourceType":94,"resourceTypeDesc":95,"sizeBytes":124,"sourceHtmlUrl":125},"scripts\u002Fplan_validation.py",15545,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fanalytical-method-validation\u002Fscripts\u002Fplan_validation.py",[127,134,141,148,155,162],{"skillNo":128,"name":129,"nameZh":6,"description":130,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":131,"categories":132,"keywords":133,"publishedAt":19},"01M74Z8MGT305R11SNY5G28QH5","plos","Prepare manuscripts for PLOS journals (PLOS ONE, PLOS Biology, PLOS Computational Biology, PLOS Genetics, PLOS Medicine, PLOS Pathogens, PLOS Neglected Tropical Diseases, PLOS Global Public Health and others), covering structure, abstract and author summary, Vancouver-style references, the mandatory data availability policy, ethics and financial disclosure statements, figure requirements (PACE), the PLOS LaTeX template, reporting guidelines and PLOS ONE's publication criteria. Use when targeting any PLOS journal or checking compliance with PLOS policies.","https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fplos\u002FSKILL.md",[],[],{"skillNo":135,"name":136,"nameZh":6,"description":137,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":138,"categories":139,"keywords":140,"publishedAt":19},"01M74Z8CCN9APXYHNQ95V1EBGT","pkpd-modeling","Pharmacokinetic and pharmacodynamic modelling and simulation - non-compartmental analysis, compartmental and population PK, PK\u002FPD and exposure-response, TMDD, PBPK orientation, bioequivalence, allometric scaling and first-in-human dose, drug interaction prediction, and Bayesian therapeutic drug monitoring. Use when analysing concentration-time data, deriving exposure metrics, fitting PK or PD models, or evaluating dosing regimens. Triggers include \"pharmacokinetics\", \"pharmacodynamics\", \"PK\u002FPD\", \"NCA\", \"non-compartmental\", \"AUC\", \"Cmax\", \"lambda z\", \"half-life\", \"clearance\", \"volume of distribution\", \"compartmental model\", \"population PK\", \"popPK\", \"NONMEM\", \"nlmixr2\", \"Pharmpy\", \"Monolix\", \"exposure-response\", \"Emax\", \"EC50\", \"indirect response\", \"effect compartment\", \"TMDD\", \"PBPK\", \"bioequivalence\", \"RSABE\", \"ABEL\", \"allometric scaling\", \"first-in-human\", \"MABEL\", \"drug-drug interaction\", \"DDI\", \"ICH M12\", \"concentration-QTc\", \"therapeutic drug monitoring\", \"MIPD\", and \"dosing regimen\".","https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpkpd-modeling\u002FSKILL.md",[],[],{"skillNo":142,"name":143,"nameZh":6,"description":144,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":145,"categories":146,"keywords":147,"publishedAt":19},"01M74Z86YHJJ1FM3X87BHN76KZ","pinecone","Guides use of Pinecone, a managed serverless vector database, through its Python client and the LangChain and LlamaIndex integrations. Covers creating indexes, upserting and querying vectors, metadata filtering, namespaces, hybrid dense and sparse search, index management, and deleting vectors. Use when building a production RAG system on a hosted vector store, adding semantic search or recommendations without running infrastructure, isolating per-user or per-tenant data with namespaces, combining dense and sparse vectors in one query, or filtering results by metadata. Do not use for self-hosted or local stores (Chroma, Weaviate) or offline similarity search (FAISS).","https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpinecone\u002FSKILL.md",[],[],{"skillNo":149,"name":150,"nameZh":6,"description":151,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":152,"categories":153,"keywords":154,"publishedAt":19},"01M74Z80T6E89SAJ8MYDD0767Q","pi-agent","Build with and use Pi, the minimal terminal coding harness. Use for installing Pi, configuring providers\u002Fmodels\u002Fsettings\u002Fenvironment variables, creating Pi skills\u002Fextensions\u002Fpackages\u002Fthemes\u002Fprompt templates, embedding Pi through the SDK, integrating over RPC or JSON event streams, parsing sessions, running local models through the llama.cpp router, developing custom Pi providers and TUI components, or using ecosystem packages such as pi-subagents (delegation\u002Forchestration), pi-mcp-adapter (MCP servers), pi-interview (interactive forms), and pi-web-access (web search, fetching, video understanding).","https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpi-agent\u002FSKILL.md",[],[],{"skillNo":156,"name":157,"nameZh":6,"description":158,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":159,"categories":160,"keywords":161,"publishedAt":19},"01M74Z7WF1Y8Q3VFAQPPPRAFMV","phoenix-observability","Open-source AI observability platform for LLM tracing, evaluation, and monitoring. Use when debugging LLM applications with detailed traces, running evaluations on datasets, or monitoring production AI systems with real-time insights.","https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fphoenix-observability\u002FSKILL.md",[],[],{"skillNo":163,"name":164,"nameZh":6,"description":165,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":166,"categories":167,"keywords":168,"publishedAt":19},"01M74Z7HNEH1A2AVYR3G1X2QV6","peft-fine-tuning","Fine-tunes LLMs with Hugging Face PEFT, using LoRA, QLoRA, IA3, AdaLoRA, prefix tuning, and prompt tuning so that under 1% of parameters are trained. Covers rank, alpha, and target module selection, loading and merging adapters, multi-adapter serving, and integration with TRL SFTTrainer, Axolotl, and vLLM. Use when fine-tuning 7B-70B models on limited GPU memory, when running QLoRA on a single 24GB GPU, when choosing LoRA rank and alpha, when merging or swapping adapters on one base model, or when debugging CUDA OOM or an adapter that does not apply. Not for full fine-tuning of small models under 1B parameters or cases needing all weights updated.","https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpeft-fine-tuning\u002FSKILL.md",[],[]]