Modify Theta Parameters in PML Models
modify_Theta.Rd
This function allows to modify Theta parameter in a list of PML models
(PMLModels
class instance created by create_ModelPK()
or create_ModelPD).
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 ofPMLStructures
, see Details section ofcreate_ModelPK()
for PK models andcreate_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
Functions used for Theta specification:
InitialEstimate()
,
Theta()
,
create_ModelPD()
,
create_ModelPK()
Examples
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)
#> PK1IVC
#> test() {
#> cfMicro(A1, Cl / V)
#> C = A1 / V
#> dosepoint(A1, idosevar = A1Dose, infdosevar = A1InfDose, infratevar = A1InfRate)
#> error(CEps = 0.1)
#> observe(CObs = C * (1 + CEps))
#>
#> stparm(Cl = tvCl * exp( nCl ))
#> fixef(tvCl= c(, 1, ))
#> ranef(diag(nCl) = c(1))
#> stparm(V = tvV * exp( nV ))
#> fixef(tvV(freeze) = c(, 0.3, ))
#> ranef(diag(nV) = c(1))
#>
#> }
#> PK2IVC
#> test() {
#> cfMicro(A1, Cl / V, Cl2 / V, Cl2 / V2)
#> C = A1 / V
#> dosepoint(A1, idosevar = A1Dose, infdosevar = A1InfDose, infratevar = A1InfRate)
#> error(CEps = 0.1)
#> observe(CObs = C * (1 + CEps))
#>
#> stparm(Cl = tvCl * exp( nCl ))
#> fixef(tvCl= c(, 1, ))
#> ranef(diag(nCl) = c(1))
#> stparm(V = tvV * exp( nV ))
#> fixef(tvV(freeze) = c(, 0.3, ))
#> ranef(diag(nV) = c(1))
#> stparm(Cl2 = tvCl2 * exp( nCl2 ))
#> fixef(tvCl2= c(, 1, ))
#> ranef(diag(nCl2) = c(1))
#> stparm(V2 = tvV2 * exp( nV2 ))
#> fixef(tvV2= c(, 1, ))
#> ranef(diag(nV2) = c(1))
#>
#> }
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)
#> PK1IVC
#> test() {
#> cfMicro(A1, Cl / V)
#> C = A1 / V
#> dosepoint(A1, idosevar = A1Dose, infdosevar = A1InfDose, infratevar = A1InfRate)
#> error(CEps = 0.1)
#> observe(CObs = C * (1 + CEps))
#>
#> stparm(Cl = tvCl * exp( nCl ))
#> fixef(tvCl= c(, 1, ))
#> ranef(diag(nCl) = c(1))
#> stparm(V = tvV * exp( nV ))
#> fixef(tvV(freeze) = c(, 0.3, ))
#> ranef(diag(nV) = c(1))
#>
#> }
#> PK2IVC
#> test() {
#> cfMicro(A1, Cl / V, Cl2 / V, Cl2 / V2)
#> C = A1 / V
#> dosepoint(A1{_Duration[1]}, idosevar = A1Dose, infdosevar = A1InfDose, infratevar = A1InfRate)
#> {_Duration[2]}
#> error(CEps = 0.1)
#> observe(CObs = C * (1 + CEps))
#>
#> stparm(Cl = tvCl * exp( nCl ))
#> fixef(tvCl= c(, 1, ))
#> ranef(diag(nCl) = c(1))
#> stparm(V = tvV * exp( nV ))
#> fixef(tvV(freeze) = c(, 0.3, ))
#> ranef(diag(nV) = c(1))
#> stparm(Cl2 = tvCl2 * exp( nCl2 ))
#> fixef(tvCl2= c(, 1, ))
#> ranef(diag(nCl2) = c(1))
#> stparm(V2 = tvV2 * exp( nV2 ))
#> fixef(tvV2= c(, 1, ))
#> ranef(diag(nV2) = c(1))
#>
#> }