Learn R Programming

Certara.RsNLME (version 3.1.0.1)

removeCovariate: Remove covariate from structural parameters in a model object.

Description

Remove one or more covariates from structural parameters in a model object.

Usage

removeCovariate(.Object, covariate = NULL, paramName = NULL)

Value

Modified NlmePmlModel object

Arguments

.Object

Model object

covariate

Covariates to remove from model. If NULL all covariates will be removed from model.

paramName

Structural parameters for which to remove covariate effect(s) from. If NULL covariate effect will be removed from all structural parameters.

Examples

Run this code
model <- pkmodel(
  numCompartments = 2,
  data = pkData,
  ID = "Subject",
  Time = "Act_Time",
  A1 = "Amount",
  CObs = "Conc",
  workingDir = tempdir()
)

# Add Gender covariate of type categorical
model <- addCovariate(model,
  covariate = "Gender",
  type = "Categorical",
  effect = c("V2", "Cl2"),
  levels = c(0, 1),
  labels = c("Female", "Male")
)

# Add BodyWeight covariate of type continuous
model <- addCovariate(model,
  covariate = "BodyWeight",
  type = "Continuous",
  direction = "Backward",
  center = "Mean",
  effect = c("V", "Cl")
)

# Remove all covariates from model
model <- removeCovariate(model)

Run the code above in your browser using DataLab