Skip to main content
Skip table of contents

removeCovariate

Remove any of the transformed covariates (discrete and continuous) and/or latent covariates. Call getCovariateInformation to know which covariates can be removed (only those with type "categoricaltransformed", "continuoustransformed" or "latent").

Usage

R
removeCovariate(...)

Arguments

...

Covariate names (comma separated).

See also

getCovariateInformation get current covariates in the model
addContinuousTransformedCovariate to add a transformation of a continuous covariate
addCategoricalTransformedCovariate to add a transformation of a categorical covariate
addMixture to add a latent covariate

Examples

R
initializeLixoftConnectors("monolix")
project_file <- file.path(getDemoPath(), "1.creating_and_using_models", "1.1.libraries_of_models", "theophylline_project.mlxtran")
loadProject(project_file)
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
#> 
removeCovariate("logtWEIGHT")
getCovariateInformation()
#> $name
#> [1] "WEIGHT" "SEX"   
#> 
#> $type
#>        WEIGHT           SEX 
#>  "continuous" "categorical" 
#> 
#> $range
#> $range$WEIGHT
#> [1] 54.6 86.4
#> 
#> 
#> $categories
#> $categories$SEX
#> [1] "F" "M"
#> 
#> 
#> $covariate
#>    id WEIGHT SEX
#> 1   1   79.6   M
#> 2   2   72.4   M
#> 3   3   70.5   M
#> 4   4   72.7   M
#> 5   5   54.6   F
#> 6   6   80.0   M
#> 7   7   64.6   F
#> 8   8   70.5   M
#> 9   9   86.4   M
#> 10 10   58.2   F
#> 11 11   65.0   F
#> 12 12   60.5   F
#> 
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.