Overview

Description

Generate replicates of the original data using either random sampling with replacement or simulation from the model.

Population parameter estimation, and eventually other tasks, are then performed for each replicate.

Usage

r <- bootmlx(project, nboot = 100, dataFolder = NULL, parametric = FALSE, tasks = NULL, settings = NULL) 

Arguments

project
a Monolix project
nboot
number of bootstrat replicates (default= 100)
dataFolder
folder where the resampled datasets are stored (default = “bootstrap”)
parametric
TRUE/{FALSE} define if parametric bootstrap is performed (new data is drawn from the model) (default=FALSE),
tasks
vector of booleans defining the list of tasks to perform (default: estimation of the population parameters)
settings
a list of optional settings


Examples

Create 5 replicates of the warfarin PK data and estimate the population parameters for each of them (default task)

library(Rsmlx)

project <- "projects/warfarinPK1.mlxtran"
r <- bootmlx(project, nboot=5)
## Generating data sets with initial data set resampling...
## Generating projects with bootstrap data sets...
## Project 1/5 => Population parameters already estimated 
## Project 2/5 => Population parameters already estimated 
## Project 3/5 => Population parameters already estimated 
## Project 4/5 => Population parameters already estimated 
## Project 5/5 => Population parameters already estimated
print(r)
##      ka_pop    V_pop beta_V_lw70    Cl_pop  omega_ka    omega_V  omega_Cl
## 1 0.6796957 7.872126   0.8447279 0.1289886 0.8081876 0.14232733 0.2640929
## 2 0.6112755 7.936020   0.8874925 0.1312744 0.6889832 0.12377265 0.2537792
## 3 0.7748641 7.884424   0.8947202 0.1380933 0.6954659 0.11892899 0.2455916
## 4 0.9713527 7.752694   0.7346770 0.1338174 0.7629227 0.08323001 0.2809670
## 5 0.4512106 7.596022   0.9211596 0.1336010 0.7679203 0.09843714 0.2605302
##          a1         b1
## 1 0.5494918 0.06677322
## 2 0.5364289 0.07871889
## 3 0.3954033 0.09011620
## 4 0.3196283 0.10290321
## 5 0.6212709 0.08107421

A new directory “./projects/warfarinPK1/bootstrap/nonParametric” was automatically created with the 5 new data files, the 5 new Monolix projects and 5 new folders with the Monolix results:

dir("./projects/warfarinPK1/bootstrap/nonParametric")
##  [1] "data"                             "populationParameters.txt"        
##  [3] "warfarinPK1_bootstrap_1"          "warfarinPK1_bootstrap_1.mlxtran" 
##  [5] "warfarinPK1_bootstrap_10"         "warfarinPK1_bootstrap_10.mlxtran"
##  [7] "warfarinPK1_bootstrap_11"         "warfarinPK1_bootstrap_11.mlxtran"
##  [9] "warfarinPK1_bootstrap_12"         "warfarinPK1_bootstrap_12.mlxtran"
## [11] "warfarinPK1_bootstrap_13"         "warfarinPK1_bootstrap_13.mlxtran"
## [13] "warfarinPK1_bootstrap_14"         "warfarinPK1_bootstrap_14.mlxtran"
## [15] "warfarinPK1_bootstrap_15"         "warfarinPK1_bootstrap_15.mlxtran"
## [17] "warfarinPK1_bootstrap_16"         "warfarinPK1_bootstrap_16.mlxtran"
## [19] "warfarinPK1_bootstrap_17"         "warfarinPK1_bootstrap_17.mlxtran"
## [21] "warfarinPK1_bootstrap_18"         "warfarinPK1_bootstrap_18.mlxtran"
## [23] "warfarinPK1_bootstrap_19"         "warfarinPK1_bootstrap_19.mlxtran"
## [25] "warfarinPK1_bootstrap_2"          "warfarinPK1_bootstrap_2.mlxtran" 
## [27] "warfarinPK1_bootstrap_20"         "warfarinPK1_bootstrap_20.mlxtran"
## [29] "warfarinPK1_bootstrap_3"          "warfarinPK1_bootstrap_3.mlxtran" 
## [31] "warfarinPK1_bootstrap_4"          "warfarinPK1_bootstrap_4.mlxtran" 
## [33] "warfarinPK1_bootstrap_5"          "warfarinPK1_bootstrap_5.mlxtran" 
## [35] "warfarinPK1_bootstrap_6"          "warfarinPK1_bootstrap_6.mlxtran" 
## [37] "warfarinPK1_bootstrap_7"          "warfarinPK1_bootstrap_7.mlxtran" 
## [39] "warfarinPK1_bootstrap_8"          "warfarinPK1_bootstrap_8.mlxtran" 
## [41] "warfarinPK1_bootstrap_9"          "warfarinPK1_bootstrap_9.mlxtran"

Add 2 replicates and plot the distribution of the estimated population parameters

r <- bootmlx(project, nboot=7, settings=list(plot=TRUE))
## Generating data sets with initial data set resampling...
## Generating projects with bootstrap data sets...
## Project 1/7 => Population parameters already estimated 
## Project 2/7 => Population parameters already estimated 
## Project 3/7 => Population parameters already estimated 
## Project 4/7 => Population parameters already estimated 
## Project 5/7 => Population parameters already estimated 
## Project 6/7 => Population parameters already estimated 
## Project 7/7 => Population parameters already estimated

Estimate the standard errors for each replicate

r <- bootmlx(project, nboot=7, tasks=c(standardErrorEstimation=TRUE))
## Generating data sets with initial data set resampling...
## Generating projects with bootstrap data sets...
## Project 1/7 => Running the missing tasks 
## Project 2/7 => Running the missing tasks 
## Project 3/7 => Running the missing tasks 
## Project 4/7 => Running the missing tasks 
## Project 5/7 => Running the missing tasks 
## Project 6/7 => Running the missing tasks 
## Project 7/7 => Running the missing tasks

Keep the original proportion of males and females

r <- bootmlx(project,  nboot = 5, settings = list(covStrat = "sex", newResampling=TRUE))
## Clearing all previous results and projectsGenerating data sets with initial data set resampling...
## Generating projects with bootstrap data sets...
## Project 1/5 => Estimating the population parameters 
## Project 2/5 => Estimating the population parameters 
## Project 3/5 => Estimating the population parameters 
## Project 4/5 => Estimating the population parameters 
## Project 5/5 => Estimating the population parameters

Generate data files with 100 individuals instead of 32 as in the original data file

r <- bootmlx(project,  nboot = 5, settings = list(N=100, newResampling=TRUE))
## Clearing all previous results and projectsGenerating data sets with initial data set resampling...
## Generating projects with bootstrap data sets...
## Project 1/5 => Estimating the population parameters 
## Project 2/5 => Estimating the population parameters 
## Project 3/5 => Estimating the population parameters 
## Project 4/5 => Estimating the population parameters 
## Project 5/5 => Estimating the population parameters

Use new datasets generated using parametric bootstrap

r <- bootmlx(project, nboot=4, parametric=TRUE)
## Generating data sets with initial data set resampling...
## Generating projects with bootstrap data sets...
## Project 1/4 => Population parameters already estimated 
## Project 2/4 => Population parameters already estimated 
## Project 3/4 => Population parameters already estimated 
## Project 4/4 => Population parameters already estimated