preprocess.ofv: Preprocess model and data for ofv computation

preprocess.ofvR Documentation

Preprocess model and data for ofv computation

Description

Functions to generate arguments passed to compute_ofv. Arguments that are fixed between individuals are created once (preprocess.ofv.fix), while others are specific of each individual (preprocess.ofv.id).

Usage

preprocess.ofv.fix(x, data, select_eta = seq_along(eta(x)), lambda = 1)

preprocess.ofv.id(x, iddata)

Arguments

x

the model object

data, iddata

NMTRAN-like data set. iddata is likely a dataset of one individual

select_eta

numbers of the ETAs taken into account. Set the dimensions of the inversed OMEGA matrix

lambda

a numeric value, the weight applied to the model prior (default is 1)

Value

A list of arguments used to compute the objective function value.

The following arguments are fixed between individuals:

  • qmod: model object, modified to simulate without random effects and with controlled outputs

  • sigma: a single matrix object

  • log_transformation: a logical, whether predictions need to be log-transformed for ofv computation

  • omega_inv: a single matrix object

  • all_cmt: a vector of compartment numbers where observations can be expected

The following arguments differs between individuals:

  • idvaliddata: a matrix, individual data set (with administrations and covariates), validated with valid_data_set

  • idDV: a vector of (possibly log-transformed) observations

  • idcmt: a vector of compartments where observations belong to

  • idblq,idlloq: optional, a logical and numerical vector indicating if the observation is below the lower limit of quantification, and the LLOQ value, respectively

Examples

mod <- exmodel(add_exdata = FALSE, compile = FALSE)
dat <- exdata(ID = c(1,4))

preprocess.ofv.fix(x = mod, data = dat)
preprocess.ofv.id(x = mod, iddata = dat[dat$ID == 1,])
preprocess.ofv.id(x = mod, iddata = dat[dat$ID == 4,])


mapbayr documentation built on July 26, 2023, 5:16 p.m.