Learn R Programming

Certara.RDarwin (version 1.1.1)

modify_Theta: Modify Theta Parameters in PML Models

Description

This function allows to modify Theta parameter in a list of PML models (PMLModels class instance created by create_ModelPK() or create_ModelPD).

Usage

modify_Theta(
  PMLParametersSets,
  Name,
  InitialEstimates,
  Frozen,
  PMLStructures = NULL
)

Value

An updated list of PML models (PMLModels class instance) matching the specified options.

Arguments

PMLParametersSets

A list of PML parameters sets (PMLModels class instance).

Name

Character specifying the name of the Theta to be modified.

InitialEstimates

An InitialEstimate() class instance or a numerical value for the initial estimate of the Theta or a numeric vector length three with its elements representing the lower bound, initial estimate.

Frozen

A logical value indicating whether the Theta will be estimated or not.

PMLStructures

Character or character vector specifying names of PML structures in which the Theta parameter will be modified. For the naming convention of PMLStructures, see Details section of create_ModelPK() for PK models and create_ModelPD() for PD models..

Details

  • If the specified Theta does not exist in the PML models, a warning will be issued, and no modifications will be made. Thetas associated with structural parameters in the proportional part of MixRatio and Additive+Proportional error models can also be modified.

  • The current functionality does not support modifying custom thetas (fixefs) that are defined within the PML code of custom model spaces.

See Also

InitialEstimate()

Functions used for Theta specification: InitialEstimate(), Theta(), create_ModelPD(), create_ModelPK()

Examples

Run this code
PMLParametersSets <- create_ModelPK(CompartmentsNumber = c(1, 2))
# Modify a Theta parameter named "tvV" with new Initial Estimates and
# Frozen flag
PMLParametersSetsMod1 <-
  modify_Theta(PMLParametersSets,
               Name = "tvV",
               Frozen = TRUE,
               InitialEstimates = 0.3)

print(PMLParametersSetsMod1)

PMLParametersSetsMod2 <-
  add_StParm(PMLParametersSets = PMLParametersSetsMod1,
             StParmName = "Duration",
             State = "Searched",
             PMLStructures = "PK2IVC",
             DosepointArgName = "duration")

PMLParametersSetsMod3 <-
  modify_Theta(PMLParametersSets = PMLParametersSetsMod2,
               Name = "tvDuration",
               InitialEstimates = c(2, 4, Inf))

print(PMLParametersSetsMod3)

Run the code above in your browser using DataLab