add_Covariate {Certara.RDarwin} | R Documentation |
Add Covariate into PML models
Description
Add Covariate into PML models
Usage
add_Covariate(
PMLParametersSets,
Name,
Type = "Continuous",
StParmNames = NULL,
State = "Present",
Direction = "Forward",
Center = "None",
Categories = c(),
PMLStructures = NULL
)
Arguments
PMLParametersSets |
A list of PML parameters sets ( |
Name |
A character string representing the name of the covariate to be added. |
Type |
A character specifying the type of the covariate. Possible values are:
|
StParmNames |
Character or character vector specifying names of
structural parameters to which covariates should be added. Can be set to
|
State |
A character string representing the presence of the covariate on the structural parameters. Possible values are:
|
Direction |
A character string representing the direction of the
Covariate. Options are |
Center |
A character string ( |
Categories |
A numeric vector representing the categories (at least two)
of the covariate. Applicable only if |
PMLStructures |
Character or character vector specifying names of PML
structures to which the covariate will be added. For the naming covention
of PMLStructures, see Details section of |
Details
If Covariate already exists, it will be substituted with a new instance with given properties. New covariate will have default bound omegas/thetas. The user can change thetas with
modify_Theta()
and omegas withmodify_Omega()
.The current functionality does not support adding or modifying custom covariates that are defined within the PML code of custom model spaces.
Value
An updated list of PML models (PMLModels
class instance) matching
the specified options.
See Also
list_Covariates()
modify_Theta()
modify_Omega()
Functions used for Covariate specification:
Covariate()
,
create_ModelPD()
,
create_ModelPK()
,
remove_Covariate()
Examples
PMLParametersSets <- create_ModelPK()
PMLParametersSetsWT <-
add_Covariate(PMLParametersSets,
Name = "WT",
Type = "Continuous",
State = "Present",
Direction = "Forward",
Center = 70)
PMLParametersSetsWTCL <-
add_Covariate(PMLParametersSets = PMLParametersSetsWT,
Name = "Race",
Type = "Categorical",
State = "Searched",
Direction = "Backward",
Categories = c(1,2,3),
StParmNames = "Cl",
PMLStructure = "PK1IVC")