simbiology-fit-model

Fit SimBiology model parameters to data using fitproblem, NLME, and NCA.

995|122|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill simbiology-fit-model
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: simbiology-fit-model
Source: https://github.com/matlab/matlab-agentic-toolkit/tree/main/skills-catalog/computational-biology/simbiology-fit-model
Command: npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill simbiology-fit-model

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Estimating SimBiology model parameters from experimental data involves error-prone APIs, confusing property names, and subtle pitfalls like incorrect ResponseMap formats, missing bounds, and misused pooled versus population fitting modes.

Core Features & Use Cases

  • Parameter Estimation with fitproblem: Fit single-subject, pooled, or per-subject models using a unified declarative interface with bounds, log transforms, and algorithm selection.
  • Population NLME Fitting: Estimate inter-individual variability and random effects with sbiofitmixed, including covariate models via CovariateModel.
  • Virtual Patients and NCA: Generate virtual patient cohorts from distributions or NLME results, and compute PK metrics like AUC, C_max, T_half, and clearance with sbionca.
  • Use Case: Given multi-subject PK concentration data in a CSV, load it as groupedData, build a fitproblem with sbiofitmixed and a proportional error model, then sample 200 virtual patients from the fitted population parameters.

Quick Start

Ask the agent to fit the SimBiology model parameters ke and ka to the concentration data in pk_data.csv using fitproblem with log transforms and bounds.

Frequently Asked Questions about simbiology-fit-model

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fit SimBiology model parameters to data in MATLAB?

Use fitproblem instead of calling sbiofit directly. Set the Model, Data as groupedData, ResponseMap in "Species = DataColumn" format, and Estimated as an estimatedInfo object with bounds, then call fit(prob) to run the estimation.

What is the difference between sbiofit and sbiofitmixed?

sbiofit handles single-subject or pooled fitting and enforces parameter bounds, while sbiofitmixed performs population NLME fitting with inter-individual variability and random effects but ignores bounds. Select via the FitFunction property on fitproblem.

How do I compute NCA metrics like AUC and half-life in SimBiology?

Use sbionca with an sbioncaoptions object specifying concentrationColumnName, timeColumnName, and a dose column such as EVDoseColumnName. Metrics like AUC_0_last, C_max, T_half, and CL are returned, with NaN required on non-dosing rows.

Why does my SimBiology fit fail or give non-physical parameters?

Common causes are missing bounds on estimatedInfo, not using log transforms for rate constants spanning orders of magnitude, or wrapping data in a plain table instead of groupedData. Always set Bounds and IndependentVariableName before fitting.

Can I compute confidence intervals for NLME fit results?

No, sbioparameterci only supports results from sbiofit nonlinear regression, not sbiofitmixed NLME results. For sbiofit results, use Gaussian or ProfileLikelihood types to compute parameter confidence intervals.

How do I generate virtual patients from a fitted population model?

Use sbiosampleparameters with the CovariateModel expression, fixed effects, and random effect covariance matrix from NLME results to sample parameter sets. Then simulate them with createSimFunction to produce virtual patient cohorts.