# Get PK model set with default options
PMLParametersSets <- create_ModelPK()
#' # Get PK Model search with custom options:
# will create 2 PML Parameters Sets with 2 and 3 compartments,
# with Absorption First-Order and Gamma accordingly:
ModelPKSearch <-
create_ModelPK(CompartmentsNumber = c(2, 3),
Parameterization = "Micro",
Absorption = c("First-Order", "Gamma"),
ByVector = TRUE,
ClosedForm = TRUE)
# Next example will create a set of 4 PMLParametersSets:
# a combination of models with 2 and 3 compartments and First-Order and Gamma Absorption
PMLParametersSets <-
create_ModelPK(CompartmentsNumber = c(2, 3),
Absorption = c("First-Order", "Gamma"),
ByVector = FALSE,
ClosedForm = FALSE)
# Create 2 PML Parameters Sets with elimination compartment and fraction excreted
# and add zero order absorption to the main dosepoint of the PML Structure
# with infusion
PMLParametersSets <-
create_ModelPK(CompartmentsNumber = 1,
Absorption = c("Intravenous", "Gamma"),
EliminationCpt = TRUE,
FractionExcreted = TRUE,
duration = StParm(StParmName = "Duration",
OmegaStParm = Omega(State = "None")),
PMLStructure = "PK1IVCEF")
# Create 4 PML Parameters Sets, then modify `Cl` structural parameter for all sets,
# with 2 initial estimates sets to be searched,
# add `tlag` as a structural parameter `Tlag` to 1 compartment First-Order PML parameters set,
# change `tvKa` Theta initial estimate,
# change `nV` Omega initial estimate,
# change `CObs` Observation sigmas,
# add structural parameter `Rate` for 1 compartment Weibull Parameters set,
# add `Weight` covariate for all structural parameters to be searched.
PMLParametersSets <-
create_ModelPK(
CompartmentsNumber = 1,
Absorption = c("First-Order", "Weibull"),
ByVector = FALSE,
Cl = StParm(
StParmName = "Cl",
Type = "LogNormal2",
ThetaStParm =
Theta(Name = "tvCl",
InitialEstimates =
InitialEstimate(c(-Inf, 0.2, Inf),
c(0, 3, 10)))
),
tlag = StParm(
StParmName = "Tlag",
State = "Searched",
PMLStructure = "PK1FOC",
Covariates = list(
Age = Covariate(
Name = "Age",
Type = "Categorical",
State = "Searched",
Direction = "Backward",
Center = "None",
Categories = c(1, 2, 3)
)
)
),
tvKa = Theta(Name = "tvKa", InitialEstimates = 10),
nV = Omega(Name = "nV", InitialOmega = 0.1),
CObs = Observation(
ObservationName = "CObs",
SigmasChosen = list(
AdditiveMultiplicative = c(PropPart = 0.1, AddPart = 2),
Proportional = 1
)
),
A1 = Dosepoint(
DosepointName = "A1",
rate = StParm(StParmName = "Rate"),
PMLStructure = "PK1WC"
),
Weight = Covariate(
Name = "Weight",
State = "Searched",
Center = "Median"
)
)
Run the code above in your browser using DataLab