dataPBK {rPBK}R Documentation

Create a list giving data and parameters to use in the model inference.

Description

Create a list giving data and parameters to use in the model inference.

Usage

dataPBK(object, ...)

## S3 method for class 'data.frame'
dataPBK(
  object,
  col_time = NA,
  col_replicate = NA,
  col_exposure = NA,
  col_compartment = NA,
  time_accumulation = NA,
  ku_nest = NA,
  ke_nest = NA,
  k_nest = NA,
  ...
)

nested_model(object)

## S3 method for class 'stanPBKdata'
nested_model(object)

Arguments

object

An object of class stanPBKdata (from dataPBK() function.

...

Further arguments to be passed to generic methods

col_time

Column name of the time column

col_replicate

Column name of the replicate column

col_exposure

Column name of the exposure column.

col_compartment

Column names of the compartment column. If several columns, give a vector with the column names.

time_accumulation

A scalar giving accumulation time.

ku_nest

Vector of binary (0 or 1) to select the uptake route. Use the nested_model() on the stanPBKdata object to check it.

ke_nest

Vector of binary (0 or 1) to select the excretion route. Use the nested_model() on the stanPBKdata object to check it.

k_nest

Matrix of binary (0 or 1) to select interaction routes. Use the nested_model() on the stanPBKdata object to check it.

Value

A list with data and parameters require for model inference.

Examples

# (1) load data file
data("dataCompartment4")
# (2) prepare data set
dataPBK_C4 <- dataPBK(
  object = dataCompartment4,
  col_time = "temps",
  col_replicate = "replicat",
  col_exposure = "condition",
  col_compartment = c("intestin", "reste", "caecum", "cephalon"),
  time_accumulation = 7)

# (1) load data file
data("dataCompartment4")
# (2) prepare data set
dataPBK_C4 <- dataPBK(
  object = dataCompartment4,
  col_time = "temps",
  col_replicate = "replicat",
  col_exposure = "condition",
  col_compartment = c("intestin", "reste", "caecum", "cephalon"),
  time_accumulation = 7)
# (3) check nesting
nested_model(dataPBK_C4)
# (2bis)
dataPBK_C42 <- dataPBK(
  object = dataCompartment4,
  col_time = "temps",
  col_replicate = "replicat",
  col_exposure = "condition",
  col_compartment = c("intestin", "reste", "caecum", "cephalon"),
  time_accumulation = 7,
  ku_nest = c(1,1,1,1), # No Change here
  ke_nest = c(1,1,1,1), # No Change here
  k_nest = matrix(c(
            c(0,1,1,1),
            c(0,0,1,1),
            c(0,0,0,0),
            c(0,0,0,0)),
            ncol=4,nrow=4,byrow=TRUE) # Remove 
  )
# (3bis) re-checking nesting
nested_model(dataPBK_C42)


[Package rPBK version 0.2.4 Index]