Documentation

About Data Fitting in PKPD Models

Data Fitting Functionality

SimBiology® lets you perform individual and population fitting on grouped data. This functionality uses Statistics Toolbox™ features (Version 7.3 or later).

  • Individual fit — Fit data separately for each individual using the nonlinear least squares method, estimate parameters, and calculate residuals and the estimated coefficient covariance matrix.

  • Population fit — Estimate the fixed effects and the random sources of variation on parameters, using nonlinear mixed-effects models.

    You can use the following methods to estimate the fixed effects:

    • LME — Linear mixed-effects approximation

    • RELME — Restricted LME approximation

    • FO — First-order estimate

    • FOCE — First-order conditional estimate

The following results are returned for population fitting:

  • The maximized log-likelihood for the fitted model

  • The estimated error variance for the fitted model

  • The Akaike information criterion for the fitted model

  • The Bayesian information criterion for the fitted model

  • The standard errors for the estimates of the fixed effects

  • The error degrees of freedom for the model

  • The weighted residuals for the fitted model

In addition, you can generate diagnostic plots that show:

  • The predicted time courses and observations for an individual or the population

  • Observed versus predicted values

  • Weighted residuals versus time, group, or predictions

  • Distribution of the weighted residuals

  • A box-plot for random effects or parameter estimates from individual fitting

Prerequisites for Data Fitting

Before you fit parameters, the SimBiology desktop or the MATLAB® Workspace must contain the following:

If you plan to use the command line, see the following for more information:

Perform Data Fitting with PKPD Models

Prerequisites for Using Custom SimBiology Models in Data Fitting

Overview

If you created a PK model using either the PKModelDesign object's construct method at the command line or the wizard in the SimBiology desktop, you can skip this section. This section provides information about working with a custom SimBiology model.

When using a custom model, you must provide information about whether dosing is applicable and define which components of the SimBiology model represent the observed response, the dose, and the estimated parameters. Use the PKModelMap object to define these settings as shown in Defining Model Components for Observed Response, Dose, Dosing Type, and Estimated Parameters.

Defining Model Components for Observed Response, Dose, Dosing Type, and Estimated Parameters

The PKModelMap object holds information about the dosing type and defines which components of the SimBiology model represent the observed response, the dose, and the parameters to be estimated.

If you are using a custom SimBiology model that you did not create using either the PKModelDesign object's construct method or the wizard, you must create a PKModelMap object to define these relationships.

Consider the following regression function, y = f(k,u), where y is the measured or observed response, given values of an input u, and parameter values k. In SimBiology, the model represents f, which is used to generate the regression function, if y, k, and u are identified in the model. You must, therefore, use the PKModelMap object to define which components of the model represent y, k, and u. If applicable, the PKModelMap object also needs information on the type of dosing or input being given to the model.

  1. Import an SBML model:

    modelObj = sbmlimport('lotka');
  2. Create a PKModelMap object:

    PKModelMapObj = PKModelMap;
    
  3. Use the name of the model component to specify the corresponding property in the PKModelMap object.

    Model Component RepresentsPKModelMap Object Property
    Object being driven by an inputDosed
    Measured responseObserved
    Parameters to be estimatedEstimated

    For example:

    set(PKModelMapObj, 'Observed', 'unnamed.y1');
    set(PKModelMapObj, 'Estimated', {'Reaction1.c1', 'Reaction2.c2'});

      Note:   When specifying species names, qualify the name with the compartment name in the form compartmentName.speciesName (for example, nucleus.DNA). For names of parameters scoped at the reaction level, use reactionName.parameterName. For parameters scoped at the model level, you do not have to qualify the name.

  4. Use the DosingType property to specify the type of dosing, if applicable. The allowed types are '', 'Bolus', 'Infusion', 'FirstOrder', and 'ZeroOrder'.

    For example:

    set(PKModelMapObj, 'DosingType', 'Bolus');
    

      Note:   When using custom models with DosingType set to zero-order, you must include a parameter that represents the duration of drug absorption. Set the ZeroOrderDurationParameter property of the PKModelMap object to the name of the duration parameter. For example, set(PKModelMapObj, 'ZeroOrderDurationParameter', 'Kdo');.

The previous example sets the observed response to a species y1, contained by a compartment (unnamed), and sets the parameters to be estimated to the parameters c1 and c2 that are scoped to the reactions, Reaction1 and Reaction2, respectively.

For information on ...See ...
PKModelMap object properties and allowed values

PKModelMap object Dosed, DosingType, Estimated, and Observed, ZeroOrderDurationParameter

Allowed dosing typesDosing Types
Parameter scopingWhen Reactions, Rules, and Events Specify Parameters
Parameter fittingPerform Data Fitting with PKPD Models

Dosing Multiple Compartments in a Model

  1. Use the name of the model component to specify the Dosed property in the PKModelMap object.

    For example, assume that a model contains two compartments named Central and Peripheral. Specify the species names in the dosed compartments. For example:

    set(PKModelMapObj, 'Dosed, {'Central.Drug_Central', ...
       'Peripheral.Drug_Peripheral'});
    
  2. Use the DosingType property to specify the type of dosing if applicable. The allowed types are '', 'Bolus', 'Infusion', 'FirstOrder', and 'ZeroOrder'. When specifying dosing for multiple compartments, the order in the Dosed property is the order in which the dosing type is applied.

    For example, if Central takes zero-order dosing and Peripheral takes a first-order dosing enter:

    set(PKModelMapObj, 'DosingType', {'ZeroOrder', 'FirstOrder'});
    
  3. Because the model includes zero-order as a DosingType, you must include a parameter that represents the duration of drug absorption and is used when simulating the model with dosing information or during fitting. Set the ZeroOrderDurationParameter property of the PKModelMap object to the name of the duration parameter. For example,

    set(PKModelMapObj, 'ZeroOrderDurationParameter', {'Kdo', ''})

    Specify the parameters in the same order as the species in the Dosed property.

Was this topic helpful?