Learn R Programming

Certara.RsNLME (version 3.1.0.1)

randomEffect: Sets or updates the covariance matrix of random effects

Description

Use to set or update the covariance matrix of random effects in a model object.

Usage

randomEffect(
  .Object,
  effect,
  value = NULL,
  isDiagonal = TRUE,
  isFrozen = FALSE,
  ...
)

Value

Modified NlmePmlModel object

Arguments

.Object

Model object

effect

One or more names of available random effects.

value

Initial values for the diagonal elements of the covariance matrix of random effects (if isDiagonal = TRUE, or initial values for the lower triangular elements (including diagonal elements) of the covariance matrix (if isDiagonal = FALSE) in a row-wise order.

isDiagonal

Set to TRUE to if the covariance matrix of the specified random effects is a diagonal matrix. or FALSE if not.

isFrozen

Set to TRUE to freeze the covariance matrix of random effects.

...

Additional arguments

Examples

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

model <-
  randomEffect(model,
               effect = c("nV", "nCl", "nCl2"), value = rep(0.1, 3))

Run the code above in your browser using DataLab