Compute confidence intervals for the population parameters estimated by Monolix.
Most functionality to compute confidence intervals (other than profile likelihood) is now available directly in the lixoftConnectors package. Please migrate the following uses of this function:
confintmlx method | lixoftConnectors function | |
"fim" | linearizarion = TRUE | getEstimatedConfidenceIntervals (method = "linearization") |
"fim" | linearizarion = FALSE | getEstimatedConfidenceIntervals (method = "stochasticApproximation") |
"bootstrap" | parametric = TRUE | runBootstrap (method = "parametric") |
"bootstrap" | parametric = FALSE | runBootstrap (method = "nonparametric") |
For method="proflike"
, continue using this function.
The method used for computing the confidence intervals can be either based on the
standard errors derived from an estimation of the Fisher Information Matrix ("fim"),
on the profile likelihood ("proflike") or on nonparametric bootstrap estimate ("bootstrap").
method="fim"
is used by default.
When method="fim"
, the FIM can be either estimated using a linearization of the model
or a stochastic approximation. When method="proflike"
, the observed likelihood can be
either estimated using a linearization of the model or an importance sampling Monte Carlo
procedure. When method="bootstrap"
, the bootstrap estimates are obtained using the bootmlx
function
r <- confintmlx(project, parameters="all", method="fim", level=0.90,
linearization=TRUE, Nboot=100, settings=NULL)
a Monolix project
list of parameters for which confidence intervals are computed (default="all")
method c("fim", "proflike", "bootstrap")
(default="fim")
confidence level, a real number between 0 and 1 (default=0.90)
TRUE/FALSE whether the calculation of the standard errors (default=TRUE) or the profile likelihood is based on a linearization of the model (default=TRUE)
number of bootstrat replicates (default=100, used when method="bootstrap")
boolean to define if parametric bootstrap is performed (new data is drawn from the model), (default: FALSE)
a list of settings for the profile likelihood method:
max.iter
maximum number of iterations to find the solution (default=10)
tol.LL
absolute tolerance for -2LL (default=0.001)
tol.param
relative tolerance for the parameter (default=0.01)
print
TRUE/FALSE display the results (default=TRUE)
Compute confidence intervals using the standard errors derived from the estimated Fisher Information Matrix
library(Rsmlx)
project <- "projects/warfarinPK1.mlxtran"
r.fim <- confintmlx(project)
print(r.fim)
## $confint
## estimate lower upper
## ka_pop 0.55941719 0.38420502 0.8145328
## V_pop 7.77238591 7.39471923 8.1693410
## beta_V_lw70 0.89284510 0.64956631 1.1361239
## Cl_pop 0.13436970 0.12338053 0.1463377
## omega_ka 0.74765531 0.50507055 1.1067532
## omega_V 0.12073213 0.08098506 0.1799869
## omega_Cl 0.27892262 0.22251102 0.3496358
## a1 0.54294872 0.39471520 0.6911822
## b1 0.07352272 0.04625716 0.1007883
##
## $level
## [1] 0.9
##
## $method
## [1] "fim"
Compute confidence intervals using the profile likelihood method:
r.prl <- confintmlx(project, method="proflike", parameters = c("V_pop", "beta_V_lw70", "omega_V"))
## /**********************************************************************/
## LL search on V_pop
## Upper bound search / Iteration 2 / V_pop = 9.493
## Upper bound search / Iteration 3 / V_pop = 8.333
## Upper bound search / Iteration 4 / V_pop = 8.34
## Lower bound search / Iteration 2 / V_pop = 6.363
## Lower bound search / Iteration 3 / V_pop = 7.34
## Lower bound search / Iteration 4 / V_pop = 7.371
## parameter V_pop
## Value 7.772
## CI = [7.371 , 8.333]
## diff. = [-0.401 , 0.56]
## rel. diff. = [-5.157 , 7.216]
## /**********************************************************************/
## LL search on beta_V_lw70
## Upper bound search / Iteration 2 / beta_V_lw70 = 1.092
## Upper bound search / Iteration 3 / beta_V_lw70 = 1.176
## Lower bound search / Iteration 2 / beta_V_lw70 = 0.692
## Lower bound search / Iteration 3 / beta_V_lw70 = 0.628
## Lower bound search / Iteration 4 / beta_V_lw70 = 0.651
## parameter beta_V_lw70
## Value 0.892
## CI = [0.651 , 1.176]
## diff. = [-0.242 , 0.283]
## rel. diff. = [-27.032 , 31.801]
## /**********************************************************************/
## LL search on omega_V
## Upper bound search / Iteration 2 / omega_V = 0.147
## Upper bound search / Iteration 3 / omega_V = 0.191
## Upper bound search / Iteration 4 / omega_V = 0.171
## Upper bound search / Iteration 5 / omega_V = 0.175
## Lower bound search / Iteration 2 / omega_V = 0.098
## Lower bound search / Iteration 3 / omega_V = 0.023
## Lower bound search / Iteration 4 / omega_V = 0.077
## Lower bound search / Iteration 5 / omega_V = 0.074
## Lower bound search / Iteration 6 / omega_V = 0.07
## Lower bound search / Iteration 7 / omega_V = 0.042
## Lower bound search / Iteration 8 / omega_V = 0.069
## Lower bound search / Iteration 9 / omega_V = 0.07
## parameter omega_V
## Value 0.12
## CI = [0.07 , 0.175]
## diff. = [-0.051 , 0.054]
## rel. diff. = [-41.675 , 45.187]
## /**********************************************************************/
## parameter V_pop
## Value 7.772
## CI = [7.371 , 8.333]
## diff. = [-0.401 , 0.56]
## rel. diff. = [-5.157 , 7.216]
## /**********************************************************************/
## parameter beta_V_lw70
## Value 0.892
## CI = [0.651 , 1.176]
## diff. = [-0.242 , 0.283]
## rel. diff. = [-27.032 , 31.801]
## /**********************************************************************/
## parameter omega_V
## Value 0.12
## CI = [0.07 , 0.175]
## diff. = [-0.051 , 0.054]
## rel. diff. = [-41.675 , 45.187]
print(r.prl)
## $confint
## estimate lower upper
## V_pop 7.7723900 7.37158778 8.3333183
## beta_V_lw70 0.8928451 0.65149574 1.1767846
## omega_V 0.1207321 0.07041813 0.1752875
##
## $proflike
## $proflike[[1]]
## param paramInit -2LL name thresh tol.param tol.LL
## 1 6.363495 7.77239 852.2823 V_pop 2.705543 0.01 0.1
## 2 7.340131 7.77239 824.9214 V_pop 2.705543 0.01 0.1
## 3 7.371588 7.77239 824.2444 V_pop 2.705543 0.01 0.1
## 4 7.772390 7.77239 819.2299 V_pop 2.705543 0.01 0.1
## 5 8.333318 7.77239 821.3445 V_pop 2.705543 0.01 0.1
## 6 8.340940 7.77239 821.3185 V_pop 2.705543 0.01 0.1
## 7 9.493219 7.77239 841.5167 V_pop 2.705543 0.01 0.1
## useLinearization
## 1 TRUE
## 2 TRUE
## 3 TRUE
## 4 TRUE
## 5 TRUE
## 6 TRUE
## 7 TRUE
##
## $proflike[[2]]
## param paramInit -2LL name thresh tol.param tol.LL
## 1 0.6289709 0.8928451 822.4290 beta_V_lw70 2.705543 0.01 0.1
## 2 0.6514957 0.8928451 821.8525 beta_V_lw70 2.705543 0.01 0.1
## 3 0.6928451 0.8928451 820.7842 beta_V_lw70 2.705543 0.01 0.1
## 4 0.8928451 0.8928451 819.2299 beta_V_lw70 2.705543 0.01 0.1
## 5 1.0928451 0.8928451 820.5722 beta_V_lw70 2.705543 0.01 0.1
## 6 1.1767846 0.8928451 821.9819 beta_V_lw70 2.705543 0.01 0.1
## useLinearization
## 1 TRUE
## 2 TRUE
## 3 TRUE
## 4 TRUE
## 5 TRUE
## 6 TRUE
##
## $proflike[[3]]
## param paramInit -2LL name thresh tol.param tol.LL
## 1 0.02330622 0.1207321 828.9542 omega_V 2.705543 0.01 0.1
## 2 0.04240121 0.1207321 826.0104 omega_V 2.705543 0.01 0.1
## 3 0.06921732 0.1207321 822.3420 omega_V 2.705543 0.01 0.1
## 4 0.07004615 0.1207321 822.2433 omega_V 2.705543 0.01 0.1
## 5 0.07041813 0.1207321 821.7530 omega_V 2.705543 0.01 0.1
## 6 0.07463491 0.1207321 821.3072 omega_V 2.705543 0.01 0.1
## 7 0.07723433 0.1207321 821.5800 omega_V 2.705543 0.01 0.1
## 8 0.09884708 0.1207321 819.1226 omega_V 2.705543 0.01 0.1
## 9 0.12073210 0.1207321 819.2299 omega_V 2.705543 0.01 0.1
## 10 0.14746252 0.1207321 819.7394 omega_V 2.705543 0.01 0.1
## 11 0.17149316 0.1207321 821.5071 omega_V 2.705543 0.01 0.1
## 12 0.17528745 0.1207321 821.8978 omega_V 2.705543 0.01 0.1
## 13 0.19141786 0.1207321 823.7563 omega_V 2.705543 0.01 0.1
## useLinearization
## 1 TRUE
## 2 TRUE
## 3 TRUE
## 4 TRUE
## 5 TRUE
## 6 TRUE
## 7 TRUE
## 8 TRUE
## 9 TRUE
## 10 TRUE
## 11 TRUE
## 12 TRUE
## 13 TRUE
##
##
## $level
## [1] 0.9
##
## $method
## [1] "proflike"
Compute confidence intervals using the bootstrap method:
r.boot <- confintmlx(project, method="bootstrap", nboot=20)
## Generating data sets with initial data set resampling...
## Generating projects with bootstrap data sets...
## Project 1/20 => Population parameters already estimated
## Project 2/20 => Population parameters already estimated
## Project 3/20 => Population parameters already estimated
## Project 4/20 => Population parameters already estimated
## Project 5/20 => Population parameters already estimated
## Project 6/20 => Estimating the population parameters
## Project 7/20 => Estimating the population parameters
## Project 8/20 => Estimating the population parameters
## Project 9/20 => Estimating the population parameters
## Project 10/20 => Estimating the population parameters
## Project 11/20 => Estimating the population parameters
## Project 12/20 => Estimating the population parameters
## Project 13/20 => Estimating the population parameters
## Project 14/20 => Estimating the population parameters
## Project 15/20 => Estimating the population parameters
## Project 16/20 => Estimating the population parameters
## Project 17/20 => Estimating the population parameters
## Project 18/20 => Estimating the population parameters
## Project 19/20 => Estimating the population parameters
## Project 20/20 => Estimating the population parameters
print(r.boot)
## $confint
## estimate lower upper
## ka_pop 0.55941719 0.43381532 0.9713527
## V_pop 7.77238591 7.32236653 8.2168901
## beta_V_lw70 0.89284510 0.65441378 1.2730923
## Cl_pop 0.13436970 0.12447216 0.1446367
## omega_ka 0.74765531 0.56088014 0.8638393
## omega_V 0.12073213 0.07689146 0.1436114
## omega_Cl 0.27892262 0.21887904 0.3196775
## a1 0.54294872 0.31344991 0.6793549
## b1 0.07352272 0.03661033 0.1084073
##
## $level
## [1] 0.9
##
## $method
## [1] "bootstrap"