simulation.report {scaRabee}R Documentation

Simulations

Description

simulation.report is a secondary function called to initiate a simulation run in scaRabee. It evaluates the structural model using the initial estimates of model parameters and outputs the results to a report file stored in the run directory. See vignette('scaRabee',package='scaRabee') for more details. simulation.report is typically not called directly by users.

Usage

  simulation.report(problem = NULL,
                    files = NULL)

Arguments

problem

A list containing the following levels:

code

A list of R code extracted from the model file. Depending on content of the model file, the levels of this list could be: template, derived, lags, ode, dde, output, variance, and/or secondary.

data

A list which content depends on the scope of the analysis. If the analysis was run at the level of the subject, data contains as many levels as the number of subjects in the dataset, plus the ids level containing the vector of identification numbers of all subjects included in the analysis population. If the analysis was run at the level of the population, data contains only one level of data and ids is set to 1.

Each subject-specific level contains as many levels as there are treatment levels for this subject, plus the trts level listing all treatments for this subject, and the id level giving the identification number of the subject.

Each treatment-specific levels is a list containing the following levels:

cov

mij x 3 data.frame containing the times of observations of the dependent variables (extracted from the TIME variable), the indicators of the type of dependent variables (extracted from the CMT variable), and the actual dependent variable observations (extracted from the DV variable) for this particular treatment and this particular subject.

cov

mij x c data.frame containing the times of observations of the dependent variables (extracted from the TIME variable) and all the covariates identified for this particular treatment and this particular subject.

bolus

bij x 4 data.frame providing the instantaneous inputs for a treatment and individual.

infusion

fij x (4+c) data.frame providing the zero-order inputs for a treatment and individual.

trt

the particular treatment identifier.

method

A character string, indicating the scale of the analysis. Should be 'population' or 'subject'.

init

A data.frame of parameter data with the following columns: 'names', 'type', 'value', 'isfix', 'lb', and 'ub'.

debugmode

Logical indicator of debugging mode.

modfun

Model function.

files

A list of input used for the analysis. The following elements are expected and none of them could be null:

data

A .csv file located in the working directory, which contains the dosing information, the observations of the dependent variable(s) to be modeled, and possibly covariate information. The expected format of this file is described in details in vignette('scaRabee', package='scaRabee').

param

A .csv file located in the working directory, which contains the initial guess(es) for the model parameter(s) to be optimized or used for model simulation. The expected format of this file is described in details in vignette('scaRabee',package='scaRabee').

model

A text file located in the working directory, which defines the model. Models specified with explicit, ordinary or delay differential equations are expected to respect a certain syntax and organization detailed in vignette('scaRabee',package='scaRabee').

iter

A .csv file reporting the values of the objective function and estimates of model parameters at each iteration. (Not used for simulation runs).

report

A text file reporting for each individual in the dataset the final parameter estimates for structural model parameters, residual variability and secondary parameters as well as the related statistics (coefficients of variation, confidence intervals, covariance and correlation matrix). (Not used for simulation runs).

pred

A .csv file reporting the predictions and calculated residuals for each individual in the dataset. (Not used for simulation runs).

est

A .csv file reporting the final parameter estimates for each individual in the dataset. (Not used for simulation runs).

sim

A .csv file reporting the simulated model predictions for each individual in the dataset. (Not used for estimation runs).

Value

Creates a simulation report and returns a data.frame of simulated and observed data containing the following columns:

ID

Subject Identifier. If the analysis is run at the population level and if the original dataset contained multiple subjects distinguished by a different ID number, please note that the original ID is lost and replaced by 1 so that all available data is considered to come from the same subject.

TRT

Indicator of treatment level (defining the sub-problems).

CMT

Indicator of system state to which the simulated or observed value is associated.

TIME

Time of the observation or model prediction.

SIM

Value of the simulated state. NA if DV is not NA.

DV

Value of the observed state. NA if SIM is not NA.

Author(s)

Sebstien Bihorel (sb.pmlab@gmail.com)


[Package scaRabee version 1.1-4 Index]