Create a new Covariate object and validate it

Covariate(
  Name = character(),
  Type = "Continuous",
  StParmName = character(),
  State = "Present",
  Direction = "Forward",
  Center = "None",
  Categories = c(),
  Thetas = c(),
  Omegas = c(),
  PMLStructure = character()
)

Arguments

Name

Character specifying the name of the covariate.

Type

A character specifying the type of the covariate. Possible values are:

  • Continuous A covariate can take values on a continuous scale.

  • Categorical A covariate can only take a finite number of values.

  • Occasion The associated PK parameter may vary within an individual from one event to the next, called interoccasion variability.

StParmName

A character vector specifying the corresponding structural parameter name.

State

A character string representing the presence of the covariate on the structural parameters. Possible values are:

  • None The covariate does not have an effect on any structural parameter.

  • Present The covariate has an effect on the structural parameters (the default).

  • Searched The effect of the covariate on structural parameters is searched.

Direction

A character string representing the direction of the Covariate. Options are Forward, Backward, Interpolate. Default is Forward. Interpolate is only applicable to Type == "Continuous".

Center

A character string (None, Mean or Median) or numeric value representing the center of the Covariate. Default is None. Valid only if Type == "Continuous".

Categories

A numeric vector representing the categories (at least two) of the covariate. Applicable only if Type is either Occasion or Categorical. The first category is set to the reference category for categorical covariate.

Thetas

A list of Theta objects representing Thetas covariate effects. Only applicable if Type is either Categorical or Continuous. If Type == "Continuous", one Theta corresponding to current Covariate should be presented. If Type == "Categorical", thetas corresponding to each category (except the reference category) can be specified. If not given, theta(s) will be automatically generated with initial estimate set to 0.0.

Omegas

A list of Omega objects representing the Omegas of the inter-occasion random effects. Applicable only if Type == "Occasion". The number of Omegas should be equal to the number of categories provided. If not given, Omegas will be created automatically with initial estimate set to 1.0.

PMLStructure

PML structure current Covariate instance belongs to.

Value

A Covariate object

See also

Functions used for Covariate specification: add_Covariate(), get_PMLParametersSets(), remove_Covariate()

Examples

WT_Covariate <-
  Covariate(Name = "WT",
            Type = "Continuous",
            StParmName = "V",
            State = "Present",
            Direction = "Forward",
            Center = 70,
            Thetas = Theta("dVdWT", 1))

Race_Covariate <-
  Covariate(
    Name = "Race",
    Type = "Categorical",
    StParmName = "V2",
    State = "Searched",
    Direction = "Backward",
    Center = "None",
    Categories = c(1,2,3))