Skip to contents

This function creates a new instance of Observation object and validates it.

Usage

Observation(
  ObservationName = "CObs",
  SigmasChosen = Sigmas(Proportional = 0.1),
  BQL = FALSE,
  BQLValue = NA,
  Frozen = FALSE,
  ResetObs = FALSE,
  Covariates = list(),
  PMLStructure = character()
)

Arguments

ObservationName

A character string giving the name of the Observation.

SigmasChosen

a Sigmas class instance or a list specifying the chosen sigma values for different error models. 0s are treated as no values. Inside Observation class it is transormed and kept as Sigmas class. The list could contain the following error models:

  • Additive The additive error sigma value.

  • LogAdditive The log-additive error sigma value.

  • Proportional The proportional error sigma value.

  • AdditiveMultiplicative A numeric vector specifying the additive and multiplicative parts for the additive-multiplicative error model. The vector should have names PropPart and AddPart.

  • MixRatio A numeric vector specifying the proportional and additive parts for the mix-ratio error model. The vector should have names PropPart and AddPart.

  • Power A numeric vector specifying the standard deviation and power parts for the power error model. The vector should have names StdevPart and PowerPart.

BQL

A logical value indicating whether the dataset contains BQL values and they should be taken into account (M3 method).

BQLValue

An optional numeric positive value of static LLOQ. Applicable only when BQL argument is TRUE. Any observed value less than or equal to that LLOQ value is treated as censored.

Frozen

A logical value indicating if the standard deviation (Stdev) is frozen.

ResetObs

A logical value indicating if the Observation variable should be reset to 0 after observation (doafter={A0=0;}). Applicable for elimination compartment.

Covariates

A list of covariates (Covariate instances) that should be included in the model, but not linked to any of structural parameters. Used with "Emax" PD models ('C' covariate is added automatically when creating a new model, but should be added manually when modifying the model).

PMLStructure

Character specifying the name of PML structure in which the observation should be added. For the naming convention of PMLStructures, see Details section of get_PMLParametersSets().

Value

A new Observation object

See also

Functions used for Observation specification: ObservationCustom(), Sigmas(), create_ModelPD(), create_ModelPK(), modify_Observation(), remove_Observation()

Examples

A0Obs <-
  Observation(ObservationName = "A0Obs",
              SigmasChosen = list(Additive = 2,
                                  Power = c(Stdev = 10, Power = 0.5)),
              Frozen = FALSE,
              ResetObs = TRUE,
              PMLStructure = "PK1FOC")

CObs <- Observation("CObs", Frozen = TRUE, PMLStructure = "2Cpt")