addContinuousTransformedCovariate
[Monolix] Add transformed continuous covariate
Create a new continuous covariate by transforming an existing one. Transformed covariates cannot be use to produce new covariates.
Call getCovariateInformation to find out which covariates can be transformed. Those of type "continuous" can be used.
Usage
addContinuousTransformedCovariate(...)
Arguments
- ...
Comma-separated pairs {transformedCovariateName = (character)"formula"}
See also
getCovariateInformation get current covariates in the model addCategoricalTransformedCovariate to add a transformation of a categorical covariate addMixture to add a latent covariate removeCovariate remove added covariates
Examples
initializeLixoftConnectors("monolix")
#> [INFO] The library lixoftConnectors ("C:\Program Files\Lixoft\MonolixSuite2024R1\lib\lixoftConnectors.dll") is already loaded and initialized for monolix software -> nothing to be done.
project_file <- file.path(getDemoPath(), "1.creating_and_using_models", "1.1.libraries_of_models", "theophylline_project.mlxtran")
loadProject(project_file)
#> [INFO] Results have been successfully loaded
addContinuousTransformedCovariate( logtWEIGHT = "log(WEIGHT/70)" )
getCovariateInformation()
#> $name
#> [1] "WEIGHT" "logtWEIGHT" "SEX"
#>
#> $type
#> WEIGHT logtWEIGHT SEX
#> "continuous" "continuoustransformed" "categorical"
#>
#> $formula
#> logtWEIGHT
#> "logtWEIGHT = log(WEIGHT/70)"
#>
#> $range
#> $range$WEIGHT
#> [1] 54.6 86.4
#>
#> $range$logtWEIGHT
#> [1] -0.2484614 0.2104924
#>
#>
#> $categories
#> $categories$SEX
#> [1] "F" "M"
#>
#>
#> $covariate
#> id WEIGHT logtWEIGHT SEX
#> 1 1 79.6 0.128518900 M
#> 2 2 72.4 0.033711060 M
#> 3 3 70.5 0.007117468 M
#> 4 4 72.7 0.037846140 M
#> 5 5 54.6 -0.248461400 F
#> 6 6 80.0 0.133531400 M
#> 7 7 64.6 -0.080280830 F
#> 8 8 70.5 0.007117468 M
#> 9 9 86.4 0.210492400 M
#> 10 10 58.2 -0.184609900 F
#> 11 11 65.0 -0.074107970 F
#> 12 12 60.5 -0.145851900 F
#>