Create a new Covariate object and validate it
Covariate.RdCreate a new Covariate object and validate it
Arguments
- Name
Character specifying the name of the covariate.
- Type
A character specifying the type of the covariate. Possible values are:
ContinuousA covariate can take values on a continuous scale.CategoricalA covariate can only take a finite number of values.OccasionThe associated PK parameter may vary within an individual from one event to the next, called interoccasion variability.
- StParmName
A character specifying the corresponding structural parameter name.
- State
A character string representing the presence of the covariate on the structural parameters. Possible values are:
NoneThe covariate does not have an effect on any structural parameter.PresentThe covariate has an effect on the structural parameters (the default).SearchedThe 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 isForward.Interpolateis only applicable toType == "Continuous".- Center
A character string (
None,MeanorMedian) or numeric value representing the center of the Covariate. Default isNone. Valid only ifType == "Continuous".- Categories
A numeric vector representing the categories (at least two) of the covariate. Applicable only if
Typeis eitherOccasionorCategorical. The first category is set to the reference category for categorical covariate. If a named vector is used, the names are used as labels for the given dataset,- Thetas
A list of Theta objects representing Thetas covariate effects. Only applicable if
Typeis eitherCategoricalorContinuous. IfType == "Continuous", one Theta corresponding to current Covariate should be presented. IfType == "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.
See also
Functions used for Covariate specification:
add_Covariate(),
create_ModelPD(),
create_ModelPK(),
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))