`pkindirectmodel.Rd`

Use to create a PK/Indirect response model.

```
pkindirectmodel(
isPopulation = TRUE,
parameterization = "Clearance",
absorption = "Intravenous",
numCompartments = 1,
isClosedForm = TRUE,
isTlag = FALSE,
hasEliminationComp = FALSE,
isFractionExcreted = FALSE,
isSaturating = FALSE,
infusionAllowed = FALSE,
isDuration = FALSE,
isSequential = FALSE,
isPkFrozen = FALSE,
hasEffectsCompartment = FALSE,
indirectType = "LimitedStimulation",
isBuildup = TRUE,
isExponent = FALSE,
indirectFrozen = FALSE,
data = NULL,
columnMap = TRUE,
modelName = "",
workingDir = "",
...
)
```

- isPopulation
Is this a population model

`TRUE`

or individual model`FALSE`

?- parameterization
Type of parameterization. Options are

`"Clearance"`

,`"Micro"`

,`"Macro"`

, or`"Macro1"`

.- absorption
Type of absorption. Options are

`"Intravenous"`

,`"FirstOrder"`

,`"Gamma"`

,`"InverseGaussian"`

,`"Weibull"`

.- numCompartments
Value of either

`1`

,`2`

, or`3`

.- isClosedForm
Set to

`TRUE`

to convert model from a differential equation to close form.- isTlag
Set to

`TRUE`

to add a lag time parameter to the model.- hasEliminationComp
Set to

`TRUE`

to add an elimination compartment to the model.- isFractionExcreted
Set to

`TRUE`

if elimination compartment (`hasEliminationComp = TRUE`

) contains a fraction excreted parameter.- isSaturating
Set to

`TRUE`

to use Michaelis-Menten kinetics for elimination. Only applicable to models with`paramteterization = "Clearance"`

- infusionAllowed
Set to

`TRUE`

if infusions allowed.- isDuration
Set to

`TRUE`

if infusions use duration instead of rate (must also set`infusionAllowed = TRUE`

).- isSequential
Set to

`TRUE`

to freeze PK fixed effects and convert the corresponding random effects into covariates as well as remove the PK observed variable from the model.- isPkFrozen
Set to

`TRUE`

to freeze PK fixed effects and remove the corresponding random effects as well as the PK observed variable from the model.- hasEffectsCompartment
Set to

`TRUE`

to include an effect compartment into the model.- indirectType
Type of drug actions for the indirect response model. Options are

`"LimitedStimulation"`

,`"InfiniteStimulation"`

,`"LimitedInhibition"`

,`"InverseInhibition"`

,`"LinearStimulation"`

, or`"LogLinearStimulation"`

.- isBuildup
Set to

`FALSE`

to have the drug actions affect the loss/degradation instead of the production.- isExponent
Set to

`TRUE`

to add an exponent parameter to the drug action term.- indirectFrozen
Set to

`TRUE`

to freeze PD fixed effects and remove the corresponding random effects as well as the PD observed variable from the model.- data
Input dataset

- columnMap
If

`TRUE`

(default) column mapping arguments are required. Set to`FALSE`

to manually map columns after defining model using`colMapping`

.- modelName
Model name for subdirectory created for model output in current working directory.

- workingDir
Working directory to run the model. Current working directory will be used if

`workingDir`

not specified.- ...
Arguments passed on to

`pkindirectmodel_MappingParameters`

`ID`

Column mapping argument for input dataset column(s) that identify individual data profiles. Only applicable to population models

`isPopulation = TRUE`

.`Time`

Column mapping argument that represents the input dataset column for the relative time used in a study and only applicable to time-based models.

`A1`

Column mapping argument that represents the input dataset column for the amount of drug administered. Only applicable to the following types of models:

Models with

`absorption = "Intravenous"`

and parameterization set to either`"Clearance"`

,`"Micro"`

, or`"Macro"`

Models with

`absorption`

set to either`"Gamma"`

,`"InverseGaussian"`

, or`"Weibull"`

`Aa`

Column mapping argument that represents the input dataset column for the amount of drug administered and only applicable to models with

`absorption = "FirstOrder"`

.`A`

Column mapping argument that represents the input dataset column for the amount of drug administered and only applicable to models with

`absorption = "Intravenous"`

and`parameterization = "Macro1"`

.`A1_Rate`

Column mapping argument that represents the input dataset column for the rate of drug administered. Only applicable to the following types of models:

Models with

`absorption = "Intravenous"`

,`infusionAllowed = TRUE`

and parameterization set to either`"Clearance"`

,`"Micro"`

or`"Macro"`

Models with

`absorption`

set to either`"Gamma"`

,`"InverseGaussian"`

, or`"Weibull"`

and`infusionAllowed = TRUE`

`A1_Duration`

Column mapping argument that represents the input dataset column for the duration of drug administered. Only applicable to the following types of models:

Models with

`absorption = "Intravenous"`

,`infusionAllowed = TRUE`

with`isDuration = TRUE`

and parameterization set to either`"Clearance"`

,`"Micro"`

or`"Macro"`

Models with

`absorption`

set to either`"Gamma"`

,`"InverseGaussian"`

, or`"Weibull"`

and`infusionAllowed = TRUE`

with`isDuration = TRUE`

`Aa_Rate`

Column mapping argument that represents the input dataset column for the rate of drug administered and only applicable to models with

`absorption = "FirstOrder"`

,`infusionAllowed = TRUE`

.`Aa_Duration`

Column mapping argument that represents the input dataset column for the duration of drug administered and only applicable to models with

`absorption = "FirstOrder"`

,`infusionAllowed = TRUE`

, and`isDuration = TRUE`

.`A_Rate`

Column mapping argument that represents the input dataset column for the rate of drug administered and only applicable to models with

`absorption = "Intravenous"`

,`infusionAllowed = TRUE`

, and`parameterization = "Macro1"`

.`A_Duration`

Column mapping argument that represents the input dataset column for the duration of drug administered and only applicable to models with

`absorption = "Intravenous"`

,`infusionAllowed = TRUE`

,`isDuration = TRUE`

, and`parameterization = "Macro1"`

.`A1Strip`

Column mapping argument that represents the input dataset column for the stripping dose and only applicable to models with

`parameterization = "Macro"`

.`CObs`

Column mapping argument that represents the input dataset column for the observations of drug concentration in the central compartment and only applicable to models with

`parameterization`

being either set to either`"Clearance"`

or`"Micro"`

.`C1Obs`

Column mapping argument that represents the input dataset column for the observations of drug concentration in the central compartment and only applicable to models with

`parameterization`

being either set to either`"Macro"`

or`"Macro1"`

.`A0Obs`

Column mapping argument that represents the input dataset column for the observed amount of drug in the elimination compartment. (

`hasEliminationComp = TRUE`

).`EObs`

Column mapping argument that represents the input dataset column for the observed drug effect.

`nV`

If

`isSequential = TRUE`

, mapped to the input dataset column that lists the values for random effect`nV`

.`nV2`

If

`isSequential = TRUE`

, mapped to the input dataset column that lists the values for random effect`nV2`

.`nV3`

If

`isSequential = TRUE`

, mapped to the input dataset column that lists the values for random effect`nV3`

.`nCl`

If

`isSequential = TRUE`

, mapped to the input dataset column that lists the values for random effect`nCl`

.`nCl2`

If

`isSequential = TRUE`

, mapped to the input dataset column that lists the values for random effect`nCl2`

.`nCl3`

If

`isSequential = TRUE`

, mapped to the input dataset column that lists the values for random effect`nCl3`

.`nKa`

If

`isSequential = TRUE`

, mapped to the input dataset column that lists the values for random effect`nKa`

.`nA`

If

`isSequential = TRUE`

, mapped to the input dataset column that lists the values for random effect`nA`

.`nAlpha`

If

`isSequential = TRUE`

, mapped to the input dataset column that lists the values for random effect`nAlpha`

.`nB`

If

`isSequential = TRUE`

, mapped to the input dataset column that lists the values for random effect`nB`

.`nBeta`

If

`isSequential = TRUE`

, mapped to the input dataset column that lists the values for random effect`nBeta`

.`nC`

If

`isSequential = TRUE`

, mapped to the input dataset column that lists the values for random effect`nC`

.`nGamma`

If

`isSequential = TRUE`

, mapped to the input dataset column that lists the values for random effect`nGamma`

.`nKe`

If

`isSequential = TRUE`

, mapped to the input dataset column that lists the values for random effect`nKe`

.`nK12`

If

`isSequential = TRUE`

, mapped to the input dataset column that lists the values for random effect`nK12`

.`nK21`

If

`isSequential = TRUE`

, mapped to the input dataset column that lists the values for random effect`nK21`

.`nK13`

If

`isSequential = TRUE`

, mapped to the input dataset column that lists the values for random effect`nK13`

.`nK31`

If

`isSequential = TRUE`

, mapped to the input dataset column that lists the values for random effect`nK31`

.`nTlag`

If

`isSequential = TRUE`

, mapped to the input dataset column that lists the values for random effect`nTlag`

.`nKm`

If

`isSequential = TRUE`

, mapped to the input dataset column that lists the values for random effect`nKm`

.`nVmax`

If

`isSequential = TRUE`

, mapped to the input dataset column that lists the values for random effect`nVmax`

.`nFe`

If

`isSequential = TRUE`

and`isFractionExcreted = TRUE`

, mapped to the input dataset column that lists the values for random effect`nFe`

.`nMeanDelayTime`

If

`isSequential = TRUE`

, mapped to the input dataset column that lists the values for random effect`nMeanDelayTime`

.`nShapeParam`

If

`isSequential = TRUE`

, mapped to the input dataset column that lists the values for random effect`nShapeParam`

.`nShapeParamMinusOne`

If

`isSequential = TRUE`

, mapped to the input dataset column that lists the values for random effect`nShapeParamMinusOne`

.

Note that quoted and unquoted column names are supported. Please see `colMapping`

.

```
model <- pkindirectmodel(
parameterization = "Micro",
data = pkpdData,
ID = "ID",
Time = "Time",
A1 = "Dose",
CObs = "CObs",
EObs = "EObs"
)
# View PML Code
print(model)
#>
#> Model Overview
#> -------------------------------------------
#> Model Name : Model_23_11_27_14_01
#> Working Directory : C:/Users/jcraig/Documents/GitHub/R-RsNLME/docs/reference/Model_23_11_27_14_01
#> Is population : TRUE
#> Model Type : PK_INDIRECT
#>
#> PK
#> -------------------------------------------
#> Parameterization : Micro
#> Absorption : Intravenous
#> Num Compartments : 1
#> Dose Tlag? : FALSE
#> Elimination Comp ?: FALSE
#> Infusion Allowed ?: FALSE
#> Sequential : FALSE
#> Freeze PK : FALSE
#>
#> Indirect
#> -------------------------------------------
#> Indirect Type : LimitedStimulation
#> Effect Compartment: FALSE
#> Buildup : TRUE
#> Exponent : FALSE
#> Indirect Frozen : FALSE
#>
#> PML
#> -------------------------------------------
#> test(){
#> cfMicro(A1, Ke)
#> dosepoint(A1)
#> C = A1 / V
#> deriv(E = Kin * (1 + Emax * C / (C + EC50)) - Kout * E)
#> sequence{ E= Kin / Kout}
#> error(EEps=1)
#> observe(EObs=E + EEps)
#> error(CEps=0.1)
#> observe(CObs=C * ( 1 + CEps))
#> stparm(V = tvV * exp(nV))
#> stparm(Ke = tvKe * exp(nKe))
#> stparm(Kin = tvKin * exp(nKin))
#> stparm(Kout = tvKout * exp(nKout))
#> stparm(Emax = tvEmax * exp(nEmax))
#> stparm(EC50 = tvEC50 * exp(nEC50))
#> fixef( tvV = c(,1,))
#> fixef( tvKe = c(,1,))
#> fixef( tvKin = c(,1,))
#> fixef( tvKout = c(,1,))
#> fixef( tvEmax = c(,1,))
#> fixef( tvEC50 = c(,1,))
#> ranef(diag(nV,nKe,nKin,nKout,nEmax,nEC50) = c(1,1,1,1,1,1))
#> }
#>
#> Structural Parameters
#> -------------------------------------------
#> V Ke Kin Kout Emax EC50
#> -------------------------------------------
#> Observations:
#> Observation Name : EObs
#> Effect Name : E
#> Epsilon Name : EEps
#> Epsilon Type : Additive
#> Epsilon frozen : FALSE
#> is BQL : FALSE
#> -------------------------------------------
#> Observation Name : CObs
#> Effect Name : C
#> Epsilon Name : CEps
#> Epsilon Type : Multiplicative
#> Epsilon frozen : FALSE
#> is BQL : FALSE
#> -------------------------------------------
#> Column Mappings
#> -------------------------------------------
#> Model Variable Name : Data Column name
#> id : ID
#> time : Time
#> A1 : Dose
#> EObs : EObs
#> CObs : CObs
#>
```