rmEta: Remove an eta from the model

View source: R/preProcessZeroOmega.R

rmEtaR Documentation

Remove an eta from the model

Description

Remove an eta from the model

Usage

rmEta(ui, eta)

Arguments

ui

rxode2 user interface

eta

eta to remove

Value

ui model with eta removed

Author(s)

Matthew L. Fidler

Examples


mod <- function ()  {
 description <- "One compartment PK model with linear clearance"
 ini({
   lka <- 0.45
   lcl <- 1
   lvc <- 3.45
    propSd <- c(0, 0.5)
    etaKa ~ 0.1
  })
 model({
   ka <- exp(lka + etaKa)
   cl <- exp(lcl)
   vc <- exp(lvc)
   Cc <- linCmt()
   Cc ~ prop(propSd)
 })
}

mod |> rmEta("etaKa")

# This can also remove more than one eta

mod <- function ()  {
 description <- "One compartment PK model with linear clearance"
 ini({
   lka <- 0.45
   lcl <- 1
   lvc <- 3.45
   propSd <- c(0, 0.5)
   etaKa ~ 0.1
   etaCl ~ 0.2
   etaVc ~ 0.3
  })
 model({
   ka <- exp(lka + etaKa)
   cl <- exp(lcl + etaCl)
   vc <- exp(lvc + etaVc)
   Cc <- linCmt()
   Cc ~ prop(propSd)
 })
}

mod |> rmEta(c("etaKa", "etaCl"))


nlmixr2est documentation built on Aug. 5, 2026, 1:11 a.m.

Related to rmEta in nlmixr2est...