runModelBuilding
[Monolix] Run model building
Run model building for automatic covariate model building or automatic statistical model building.
The current settings for running model building can been seen by calling getModelBuildingSettings
and the returned settings can be modified and used for the settings
argument. See example.
Usage
runModelBuilding(...)
Arguments
- ...
[optional] Settings to initialize the model building algorithm. See
getModelBuildingSettings
for a description of settings. Settings can be passed individually as name-value pairs or together in a single list.
See also
getModelBuildingSettings
for a description of settings getModelBuildingResults
to get results
Examples
initializeLixoftConnectors("monolix")
project_file <- file.path(getDemoPath(), "1.creating_and_using_models", "1.1.libraries_of_models", "theophylline_project.mlxtran")
loadProject(project_file)
if (FALSE) {
# these two lines are equivalent
runModelBuilding()
runModelBuilding(settings = getModelBuildingSettings())
}
# settings can be set individually as name-value pairs
runModelBuilding(useLin = FALSE, covariates = "SEX", strategy = "cossac")
# or settings can be modified in the list returned from getModelBuildingSettings, then passed to runModelBuilding
mbSettings <- getModelBuildingSettings()
# for example, to force including the covariate SEX on parameter ka,
# and to exclude the covaraite WEIGHT from parameter V
mbSettings$covariates <- c("SEX", "WEIGHT")
mbSettings$relationships[1,] = c("ka", "SEX", TRUE)
mbSettings$relationships[2,] = c("V", "WEIGHT", FALSE)
mbSettings$relationships
#> parameters covariates locked
#> 1 ka SEX TRUE
#> 2 V WEIGHT FALSE
runModelBuilding(settings = mbSettings)
getModelBuildingResults()
#> [[1]]
#> [[1]]$BICc
#> [1] 373.2566
#>
#> [[1]]$LL
#> [1] 339.3795
#>
#> [[1]]$tested
#> [1] "" ""
#>
#> [[1]]$individualModels
#> SEX WEIGHT
#> Cl FALSE FALSE
#> V FALSE FALSE
#> ka TRUE FALSE
#>
#> [[1]]$bestModel
#> [1] TRUE
#>
#>