Use to create a PK model

pkmodel(
  isPopulation = TRUE,
  parameterization = "Clearance",
  absorption = "Intravenous",
  numCompartments = 1,
  isClosedForm = TRUE,
  isTlag = FALSE,
  hasEliminationComp = FALSE,
  isFractionExcreted = FALSE,
  isSaturating = FALSE,
  infusionAllowed = FALSE,
  isDuration = FALSE,
  isStdevFrozen = FALSE,
  data = NULL,
  columnMap = TRUE,
  modelName = "",
  workingDir = "",
  ...
)

Arguments

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).

isStdevFrozen

Set to TRUE to freeze value of standard deviation of residual error variable.

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 pkmodel_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).

Column mapping

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

Examples

if (FALSE) {
model <- pkmodel(
  parameterization = "Clearance",
  numCompartments = 2,
  data = pkData,
  ID = "Subject",
  Time = "Act_Time",
  A1 = "Amount",
  CObs = "Conc"
)

# View the model as well as its associated column mappings
print(model)
}