setIndividualParameterModel
[Monolix] Set individual parameter model
Update the individual parameter model. The following information is editable:
distribution
: (character) vector giving the probability distribution of each parameter. The distribution can be one of"normal"
,"logNormal"
, or"logitNormal"
.limits
: (double) a list giving the distribution limits for each parameter with a"logitNormal"
distributionvariability
: (logical) a list giving, for each variability level, a vector withTRUE
for each individual parameter that has variability orFALSE
if not.covariateModel
: (logical) a list giving, for each individual parameter, a vector withTRUE
for each covariate that is included in the model for that parameter orFALSE
if not.correlationBlocks
: a list with, for each variability level, a list of correlations, where each correlation block is a vector of the parameter names included in that correlation. Parameters must have random effects to be included in correlations.
Usage
setIndividualParameterModel(...)
Arguments
- ...
A list of comma-separated pairs {[info] = [value]} (See example).
See also
getIndividualParameterModel
to see the current individual parameter model settings
The components of the individual parameter model can be updated individually: setIndividualParameterDistribution
to update just the individual parameter distributions setIndividualLogitLimits
to update just the limits for parameters with a logit distribution setIndividualParameterVariability
to update just the individual parameter variability setCovariateModel
to update just the covariate model setCorrelationBlocks
to update just the correlation structure
Examples
initializeLixoftConnectors("monolix")
project_file <- file.path(getDemoPath(), "5.models_for_individual_parameters", "5.1.probability_distribution", "warfarin_distribution3_project.mlxtran")
loadProject(project_file)
# change the distribution of parameter V to be a logitNormal between 0 and 30
setIndividualParameterModel(list(distribution = c(V = "logitNormal"), limits = list(V = c(0, 30))))
getIndividualParameterModel()
#> $name
#> [1] "Tlag" "ka" "V" "Cl"
#>
#> $distribution
#> Tlag ka V Cl
#> "logNormal" "logNormal" "logitNormal" "logNormal"
#>
#> $limits
#> $limits$V
#> [1] 0 30
#>
#>
#> $formula
#> [1] "log(Tlag) = log(Tlag_pop) + eta_Tlag\nlog(ka) = log(ka_pop) + eta_ka\nlog( V / ( 30 - V ) ) = log( V_pop / ( 30 - V_pop ) ) + eta_V\nlog(Cl) = log(Cl_pop) + eta_Cl\nCorrelations\n\tID : {Cl, V}, {Tlag, ka}\n"
#>
#> $variability
#> $variability$id
#> Tlag ka V Cl
#> TRUE TRUE TRUE TRUE
#>
#>
#> $covariateModel
#> $covariateModel$Tlag
#> sex age wt
#> FALSE FALSE FALSE
#>
#> $covariateModel$ka
#> sex age wt
#> FALSE FALSE FALSE
#>
#> $covariateModel$V
#> sex age wt
#> FALSE FALSE FALSE
#>
#> $covariateModel$Cl
#> sex age wt
#> FALSE FALSE FALSE
#>
#>
#> $correlationBlocks
#> $correlationBlocks$id
#> $correlationBlocks$id[[1]]
#> [1] "Cl" "V"
#>
#> $correlationBlocks$id[[2]]
#> [1] "Tlag" "ka"
#>
#>
#>
# remove correlation and add covariate wt on Cl
setIndividualParameterModel(list( correlationBlocks = list(id = list()),
covariateModel = list(Cl = c(sex = FALSE, age = FALSE, wt = TRUE))) )
getIndividualParameterModel()
#> $name
#> [1] "Tlag" "ka" "V" "Cl"
#>
#> $distribution
#> Tlag ka V Cl
#> "logNormal" "logNormal" "logitNormal" "logNormal"
#>
#> $limits
#> $limits$V
#> [1] 0 30
#>
#>
#> $formula
#> [1] "log(Tlag) = log(Tlag_pop) + eta_Tlag\nlog(ka) = log(ka_pop) + eta_ka\nlog( V / ( 30 - V ) ) = log( V_pop / ( 30 - V_pop ) ) + eta_V\nlog(Cl) = log(Cl_pop) + beta_Cl_wt*wt + eta_Cl\n"
#>
#> $variability
#> $variability$id
#> Tlag ka V Cl
#> TRUE TRUE TRUE TRUE
#>
#>
#> $covariateModel
#> $covariateModel$Tlag
#> sex age wt
#> FALSE FALSE FALSE
#>
#> $covariateModel$ka
#> sex age wt
#> FALSE FALSE FALSE
#>
#> $covariateModel$V
#> sex age wt
#> FALSE FALSE FALSE
#>
#> $covariateModel$Cl
#> sex age wt
#> FALSE FALSE TRUE
#>
#>
# remove variability (random effects) on parameter ka
setIndividualParameterModel(list(variability = list(id = c(ka = FALSE))))
getIndividualParameterModel()
#> $name
#> [1] "Tlag" "ka" "V" "Cl"
#>
#> $distribution
#> Tlag ka V Cl
#> "logNormal" "logNormal" "logitNormal" "logNormal"
#>
#> $limits
#> $limits$V
#> [1] 0 30
#>
#>
#> $formula
#> [1] "log(Tlag) = log(Tlag_pop) + eta_Tlag\nlog(ka) = log(ka_pop)\nlog( V / ( 30 - V ) ) = log( V_pop / ( 30 - V_pop ) ) + eta_V\nlog(Cl) = log(Cl_pop) + beta_Cl_wt*wt + eta_Cl\n"
#>
#> $variability
#> $variability$id
#> Tlag ka V Cl
#> TRUE FALSE TRUE TRUE
#>
#>
#> $covariateModel
#> $covariateModel$Tlag
#> sex age wt
#> FALSE FALSE FALSE
#>
#> $covariateModel$ka
#> sex age wt
#> FALSE FALSE FALSE
#>
#> $covariateModel$V
#> sex age wt
#> FALSE FALSE FALSE
#>
#> $covariateModel$Cl
#> sex age wt
#> FALSE FALSE TRUE
#>
#>