From cc50f8cad0f608cd2fb9d385f664fc4f53277b2b Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Wed, 29 Sep 2021 14:38:38 +0200 Subject: Reduce noise in nlmixr.mmkin output in examples --- R/nlmixr.R | 39 +- docs/dev/pkgdown.yml | 2 +- docs/dev/reference/Rplot001.png | Bin 43845 -> 43816 bytes docs/dev/reference/nlmixr.mmkin-1.png | Bin 127508 -> 127414 bytes docs/dev/reference/nlmixr.mmkin.html | 4190 +-------------------------------- man/nlmixr.mmkin.Rd | 39 +- 6 files changed, 99 insertions(+), 4171 deletions(-) diff --git a/R/nlmixr.R b/R/nlmixr.R index 5f7950ed..f8fffba9 100644 --- a/R/nlmixr.R +++ b/R/nlmixr.R @@ -7,7 +7,8 @@ nlmixr::nlmixr #' #' This function uses [nlmixr::nlmixr()] as a backend for fitting nonlinear mixed #' effects models created from [mmkin] row objects using the Stochastic Approximation -#' Expectation Maximisation algorithm (SAEM). +#' Expectation Maximisation algorithm (SAEM) or First Order Conditional +#' Estimation with Interaction (FOCEI). #' #' An mmkin row object is essentially a list of mkinfit objects that have been #' obtained by fitting the same model to a list of datasets using [mkinfit]. @@ -51,20 +52,31 @@ nlmixr::nlmixr #' f_mmkin_parent_tc <- mmkin(c("SFO", "FOMC", "DFOP"), ds, error_model = "tc", #' cores = 1, quiet = TRUE) #' -#' f_nlmixr_sfo_saem <- nlmixr(f_mmkin_parent["SFO", ], est = "saem") -#' f_nlmixr_sfo_focei <- nlmixr(f_mmkin_parent["SFO", ], est = "focei") +#' library(nlmixr) +#' f_nlmixr_sfo_saem <- nlmixr(f_mmkin_parent["SFO", ], est = "saem", +#' control = saemControl(print = 0)) +#' f_nlmixr_sfo_focei <- nlmixr(f_mmkin_parent["SFO", ], est = "focei", +#' control = foceiControl(print = 0)) #' -#' f_nlmixr_fomc_saem <- nlmixr(f_mmkin_parent["FOMC", ], est = "saem") -#' f_nlmixr_fomc_focei <- nlmixr(f_mmkin_parent["FOMC", ], est = "focei") +#' f_nlmixr_fomc_saem <- nlmixr(f_mmkin_parent["FOMC", ], est = "saem", +#' control = saemControl(print = 0)) +#' f_nlmixr_fomc_focei <- nlmixr(f_mmkin_parent["FOMC", ], est = "focei", +#' control = foceiControl(print = 0)) #' -#' f_nlmixr_dfop_saem <- nlmixr(f_mmkin_parent["DFOP", ], est = "saem") -#' f_nlmixr_dfop_focei <- nlmixr(f_mmkin_parent["DFOP", ], est = "focei") +#' f_nlmixr_dfop_saem <- nlmixr(f_mmkin_parent["DFOP", ], est = "saem", +#' control = saemControl(print = 0)) +#' f_nlmixr_dfop_focei <- nlmixr(f_mmkin_parent["DFOP", ], est = "focei", +#' control = foceiControl(print = 0)) #' -#' f_nlmixr_hs_saem <- nlmixr(f_mmkin_parent["HS", ], est = "saem") -#' f_nlmixr_hs_focei <- nlmixr(f_mmkin_parent["HS", ], est = "focei") +#' f_nlmixr_hs_saem <- nlmixr(f_mmkin_parent["HS", ], est = "saem", +#' control = saemControl(print = 0)) +#' f_nlmixr_hs_focei <- nlmixr(f_mmkin_parent["HS", ], est = "focei", +#' control = foceiControl(print = 0)) #' -#' f_nlmixr_fomc_saem_tc <- nlmixr(f_mmkin_parent_tc["FOMC", ], est = "saem") -#' f_nlmixr_fomc_focei_tc <- nlmixr(f_mmkin_parent_tc["FOMC", ], est = "focei") +#' f_nlmixr_fomc_saem_tc <- nlmixr(f_mmkin_parent_tc["FOMC", ], est = "saem", +#' control = saemControl(print = 0)) +#' f_nlmixr_fomc_focei_tc <- nlmixr(f_mmkin_parent_tc["FOMC", ], est = "focei", +#' control = foceiControl(print = 0)) #' #' AIC( #' f_nlmixr_sfo_saem$nm, f_nlmixr_sfo_focei$nm, @@ -76,9 +88,8 @@ nlmixr::nlmixr #' AIC(nlme(f_mmkin_parent["FOMC", ])) #' AIC(nlme(f_mmkin_parent["HS", ])) #' -#' # nlme is comparable to nlmixr with focei, saem finds a better -#' # solution, the two-component error model does not improve it -#' plot(f_nlmixr_fomc_saem) +#' # The FOCEI fit of FOMC with constant variance or the tc error model is best +#' plot(f_nlmixr_fomc_saem_tc) #' #' sfo_sfo <- mkinmod(parent = mkinsub("SFO", "A1"), #' A1 = mkinsub("SFO")) diff --git a/docs/dev/pkgdown.yml b/docs/dev/pkgdown.yml index e52da77d..a975d20f 100644 --- a/docs/dev/pkgdown.yml +++ b/docs/dev/pkgdown.yml @@ -11,7 +11,7 @@ articles: web_only/benchmarks: benchmarks.html web_only/compiled_models: compiled_models.html web_only/dimethenamid_2018: dimethenamid_2018.html -last_built: 2021-09-27T18:09Z +last_built: 2021-09-28T09:12Z urls: reference: https://pkgdown.jrwb.de/mkin/reference article: https://pkgdown.jrwb.de/mkin/articles diff --git a/docs/dev/reference/Rplot001.png b/docs/dev/reference/Rplot001.png index c26c864f..c1666cff 100644 Binary files a/docs/dev/reference/Rplot001.png and b/docs/dev/reference/Rplot001.png differ diff --git a/docs/dev/reference/nlmixr.mmkin-1.png b/docs/dev/reference/nlmixr.mmkin-1.png index 851d363d..3e8f67fd 100644 Binary files a/docs/dev/reference/nlmixr.mmkin-1.png and b/docs/dev/reference/nlmixr.mmkin-1.png differ diff --git a/docs/dev/reference/nlmixr.mmkin.html b/docs/dev/reference/nlmixr.mmkin.html index 568078c6..61f5ac07 100644 --- a/docs/dev/reference/nlmixr.mmkin.html +++ b/docs/dev/reference/nlmixr.mmkin.html @@ -42,7 +42,8 @@ +Expectation Maximisation algorithm (SAEM) or First Order Conditional +Estimation with Interaction (FOCEI)." /> @@ -148,7 +149,8 @@ Expectation Maximisation algorithm (SAEM)." />

This function uses nlmixr::nlmixr() as a backend for fitting nonlinear mixed effects models created from mmkin row objects using the Stochastic Approximation -Expectation Maximisation algorithm (SAEM).

+Expectation Maximisation algorithm (SAEM) or First Order Conditional +Estimation with Interaction (FOCEI).

# S3 method for mmkin
@@ -289,4135 +291,40 @@ obtained by fitting the same model to a list of datasets using f_mmkin_parent_tc <- mmkin(c("SFO", "FOMC", "DFOP"), ds, error_model = "tc",
   cores = 1, quiet = TRUE)
 
-f_nlmixr_sfo_saem <- nlmixr(f_mmkin_parent["SFO", ], est = "saem")
+library(nlmixr)
+
#> +#> Attaching package: ‘nlmixr’
#> The following object is masked from ‘package:mkin’: +#> +#> saem
f_nlmixr_sfo_saem <- nlmixr(f_mmkin_parent["SFO", ], est = "saem", + control = saemControl(print = 0))
#> parameter labels from comments are typically ignored in non-interactive mode
#> Need to run with the source intact to parse comments
#>
#> → generate SAEM model
#> done
#> RxODE 1.1.1 using 8 threads (see ?getRxThreads) -#> no cache: create with `rxCreateCache()`
#> 1: 86.5083 -3.1968 4.1673 1.7173 48.7028 -#> 2: 87.3628 -3.1468 3.9589 1.6315 45.1225 -#> 3: 86.8866 -3.2249 3.7610 1.8212 43.0034 -#> 4: 85.9210 -3.2427 3.5729 1.7302 39.4197 -#> 5: 85.8539 -3.2018 3.3943 1.7234 38.2933 -#> 6: 85.6934 -3.2262 3.2246 1.6843 39.0348 -#> 7: 85.7421 -3.2696 4.1298 1.7086 39.8152 -#> 8: 85.1605 -3.2190 3.9234 1.7588 41.7476 -#> 9: 84.7745 -3.2389 3.7361 1.6708 41.8512 -#> 10: 84.6549 -3.2078 3.5493 1.6489 41.6110 -#> 11: 84.4739 -3.2788 3.3718 1.5664 42.0076 -#> 12: 84.7871 -3.2674 3.4931 1.6097 40.9060 -#> 13: 84.5267 -3.2635 3.3185 1.6352 39.6914 -#> 14: 84.9806 -3.2353 3.1525 1.6470 39.2556 -#> 15: 84.9752 -3.2566 2.9949 1.6756 39.6152 -#> 16: 85.6293 -3.2232 2.8452 1.7076 39.4391 -#> 17: 85.9944 -3.2268 2.7029 1.6702 40.2731 -#> 18: 86.2811 -3.2260 2.5678 1.7100 41.4854 -#> 19: 86.2617 -3.2476 2.4489 1.7051 41.3066 -#> 20: 85.7552 -3.2032 3.3323 1.8885 42.2273 -#> 21: 85.6493 -3.2685 3.2317 1.7941 39.4198 -#> 22: 86.0133 -3.2457 4.0910 1.7044 39.0319 -#> 23: 86.1636 -3.2528 4.9399 1.6571 38.6728 -#> 24: 86.3086 -3.1708 7.0791 1.8182 39.6791 -#> 25: 85.7316 -3.2203 6.7252 1.7369 38.3546 -#> 26: 85.3476 -3.2341 6.3889 1.6864 38.0521 -#> 27: 85.6328 -3.2543 6.0695 1.6945 37.7990 -#> 28: 85.1715 -3.2191 5.7660 1.7898 38.5662 -#> 29: 85.4945 -3.2264 5.4777 1.7007 40.1659 -#> 30: 85.0864 -3.2463 5.2038 1.6156 39.0718 -#> 31: 85.8220 -3.2347 4.9436 1.6115 39.2011 -#> 32: 85.9869 -3.2400 4.6964 1.6818 41.2956 -#> 33: 85.9899 -3.2041 4.4616 1.6606 40.6657 -#> 34: 85.8353 -3.2065 4.2385 1.6868 41.5006 -#> 35: 85.8113 -3.2366 4.0266 1.8261 41.0403 -#> 36: 85.5233 -3.2389 3.8253 1.7348 39.5202 -#> 37: 85.1751 -3.2657 3.6340 1.6948 39.6097 -#> 38: 85.2768 -3.2380 3.4887 1.6820 38.7641 -#> 39: 84.8240 -3.2264 3.3143 1.5979 39.8074 -#> 40: 85.3754 -3.2147 3.1485 1.5810 39.1710 -#> 41: 85.0277 -3.2347 2.9911 1.7061 39.9948 -#> 42: 85.0113 -3.2651 3.1969 1.6208 39.7266 -#> 43: 85.0772 -3.2729 3.0371 1.6160 40.2919 -#> 44: 85.0769 -3.2272 3.3310 1.7321 38.5229 -#> 45: 85.1638 -3.2546 3.1644 1.6968 40.2382 -#> 46: 84.7966 -3.2597 5.0694 1.6816 38.7996 -#> 47: 85.0588 -3.2247 5.9549 1.7452 39.6569 -#> 48: 85.1769 -3.2557 5.6572 1.7441 37.9050 -#> 49: 84.9296 -3.2425 5.3743 1.6729 37.7885 -#> 50: 85.3414 -3.2421 5.1056 1.6646 38.2243 -#> 51: 84.9127 -3.2674 5.8827 1.7180 40.2859 -#> 52: 85.2014 -3.2471 5.5885 1.7318 39.1745 -#> 53: 85.9330 -3.2228 7.2369 1.8328 39.0461 -#> 54: 86.9718 -3.1447 6.9332 1.8404 39.3098 -#> 55: 87.2708 -3.1595 6.6308 1.8049 39.1338 -#> 56: 87.2006 -3.1746 6.2993 1.7541 38.2780 -#> 57: 87.8013 -3.2306 5.9843 1.6664 40.4876 -#> 58: 87.7294 -3.2120 5.6851 1.5831 41.5056 -#> 59: 87.4898 -3.2207 5.4008 1.5039 41.4401 -#> 60: 86.9156 -3.1861 5.1308 1.6408 39.8972 -#> 61: 86.4508 -3.1870 4.8742 1.5935 39.6871 -#> 62: 86.4028 -3.2191 4.6305 1.6267 39.2092 -#> 63: 86.2536 -3.2491 4.5199 1.5617 39.7603 -#> 64: 85.9775 -3.2650 4.2939 1.6077 39.1909 -#> 65: 85.8907 -3.2430 4.0792 1.6729 37.9420 -#> 66: 85.3450 -3.2888 3.8753 1.6201 40.8998 -#> 67: 85.1869 -3.2940 3.6815 1.6157 40.5107 -#> 68: 84.8029 -3.2830 3.4974 1.6040 40.6254 -#> 69: 85.3549 -3.2425 4.4768 1.5238 40.2418 -#> 70: 85.7957 -3.2296 4.2529 1.7175 40.8618 -#> 71: 85.4200 -3.2381 4.0403 1.6695 41.5731 -#> 72: 85.2950 -3.2566 3.8383 1.5998 40.6494 -#> 73: 85.0683 -3.2464 3.6464 1.5576 39.8095 -#> 74: 85.1667 -3.2436 3.4641 1.6383 39.4925 -#> 75: 84.6547 -3.2300 3.7226 1.6656 40.4684 -#> 76: 84.4882 -3.2521 3.6468 1.6035 40.1800 -#> 77: 84.5250 -3.2398 4.1501 1.6827 40.5269 -#> 78: 84.5191 -3.2372 5.5482 1.6309 41.1739 -#> 79: 84.7471 -3.2581 6.0637 1.6259 41.1003 -#> 80: 85.0581 -3.2680 5.7605 1.6841 40.8918 -#> 81: 84.8468 -3.2564 5.4725 1.6475 39.3456 -#> 82: 84.7614 -3.2385 5.1988 1.7550 38.7275 -#> 83: 85.2921 -3.2657 5.9253 1.6672 39.2423 -#> 84: 85.5760 -3.2261 5.6290 1.7505 39.5500 -#> 85: 85.3215 -3.2277 5.5987 1.8027 39.3145 -#> 86: 85.2656 -3.2023 5.3188 1.8024 40.3098 -#> 87: 84.8950 -3.2551 5.0528 1.7123 39.3470 -#> 88: 84.3157 -3.2661 4.8002 1.6267 38.7095 -#> 89: 84.5442 -3.2870 4.5602 1.5892 39.1735 -#> 90: 85.0956 -3.2195 4.8385 1.5796 39.5164 -#> 91: 84.8619 -3.2621 4.5966 1.6889 39.5512 -#> 92: 84.4901 -3.2735 6.1405 1.6704 39.3358 -#> 93: 84.0819 -3.2609 5.8335 1.6130 38.8618 -#> 94: 84.7585 -3.2336 5.5418 1.6301 38.6591 -#> 95: 85.2669 -3.2358 5.2647 1.6619 38.9136 -#> 96: 85.4955 -3.2064 5.0015 1.7673 39.0495 -#> 97: 85.6591 -3.2016 4.7514 1.7046 40.7861 -#> 98: 86.2097 -3.2833 7.4722 1.6413 42.2938 -#> 99: 85.9645 -3.2570 7.7124 1.5592 41.7216 -#> 100: 85.7018 -3.2605 8.2687 1.6798 40.6639 -#> 101: 85.9905 -3.1956 11.0194 1.7017 39.4324 -#> 102: 87.2679 -3.1741 10.4684 1.7063 38.6812 -#> 103: 86.1910 -3.1709 9.9450 1.7151 38.5198 -#> 104: 86.4413 -3.1544 9.4478 1.7123 38.7428 -#> 105: 85.9840 -3.1921 10.6297 1.8135 38.7775 -#> 106: 85.9926 -3.1839 10.0982 1.7228 40.3136 -#> 107: 85.1792 -3.2343 9.5933 1.6367 40.2709 -#> 108: 84.7583 -3.2332 9.1136 1.6907 41.2122 -#> 109: 85.3756 -3.2311 8.6579 1.7307 39.9303 -#> 110: 84.9686 -3.2365 8.2250 1.7221 40.0379 -#> 111: 84.8527 -3.2448 7.8138 1.6775 39.6794 -#> 112: 84.6271 -3.2609 7.4231 1.7321 41.5666 -#> 113: 84.8515 -3.3056 7.2514 1.7001 41.9758 -#> 114: 84.5991 -3.2319 7.8463 1.7690 41.1386 -#> 115: 85.0535 -3.2864 7.4540 1.7282 40.3883 -#> 116: 85.8661 -3.2355 7.0813 1.7801 39.3078 -#> 117: 85.9911 -3.2357 6.7272 1.6911 38.3913 -#> 118: 86.1894 -3.2424 6.3909 1.6701 38.1915 -#> 119: 85.5637 -3.1992 6.0713 1.7360 38.9386 -#> 120: 86.0733 -3.2069 5.7677 1.7185 36.5189 -#> 121: 86.0168 -3.2181 5.4794 1.7135 38.4044 -#> 122: 86.7470 -3.2319 6.1989 1.6840 38.2615 -#> 123: 86.2918 -3.2089 5.8890 1.6656 38.8486 -#> 124: 85.9387 -3.2124 5.5945 1.6334 37.9425 -#> 125: 86.1519 -3.2717 5.3148 1.7094 38.9708 -#> 126: 85.5194 -3.2391 5.4217 1.6799 39.4876 -#> 127: 85.9691 -3.2205 5.8051 1.6436 40.0593 -#> 128: 85.6171 -3.2309 5.5148 1.6852 39.5398 -#> 129: 84.9252 -3.2495 5.2391 1.7154 40.4020 -#> 130: 85.1496 -3.2882 5.0538 1.7189 40.0908 -#> 131: 85.8552 -3.2474 7.1203 1.6329 39.0547 -#> 132: 86.4666 -3.2151 6.7643 1.7342 38.6596 -#> 133: 86.1550 -3.1895 6.4261 1.7904 38.6211 -#> 134: 86.5040 -3.1785 6.1048 1.7180 39.0804 -#> 135: 85.9752 -3.2116 5.7996 1.6979 38.1745 -#> 136: 86.2161 -3.2075 5.5096 1.7408 38.9002 -#> 137: 85.8408 -3.2604 6.9319 1.7616 39.1657 -#> 138: 86.1261 -3.2179 7.0802 1.8115 37.6614 -#> 139: 85.9082 -3.2374 6.7262 1.7209 38.1986 -#> 140: 85.9556 -3.2641 6.3899 1.8300 39.2071 -#> 141: 86.2052 -3.1928 6.0704 1.7385 38.1745 -#> 142: 86.4062 -3.2076 5.8348 1.6693 38.0271 -#> 143: 86.0680 -3.2372 5.5431 1.7259 39.3885 -#> 144: 86.2001 -3.2040 5.2659 1.6803 38.1606 -#> 145: 86.5820 -3.2306 5.0026 1.6063 38.7208 -#> 146: 86.4522 -3.2072 4.7525 1.6572 37.5206 -#> 147: 85.8311 -3.2320 4.5149 1.7043 39.6955 -#> 148: 86.0754 -3.2072 5.4070 1.6707 38.8858 -#> 149: 87.0038 -3.1954 5.1367 1.7361 37.9862 -#> 150: 86.8647 -3.1903 4.8798 1.7995 39.6906 -#> 151: 86.4913 -3.2101 4.6358 1.7618 39.2462 -#> 152: 86.4667 -3.2254 4.6929 1.7762 38.0665 -#> 153: 86.0176 -3.2241 4.4586 1.7708 37.6367 -#> 154: 85.8680 -3.2359 5.2401 1.7272 37.7322 -#> 155: 85.6560 -3.2147 3.3340 1.7833 38.4605 -#> 156: 85.6927 -3.1987 1.9644 1.8176 39.4958 -#> 157: 86.3686 -3.2294 3.4959 1.6556 39.7058 -#> 158: 86.7614 -3.2051 2.3005 1.6413 40.3968 -#> 159: 86.6393 -3.2243 1.7824 1.6521 40.0846 -#> 160: 86.8686 -3.1850 1.6490 1.7211 39.6362 -#> 161: 86.7853 -3.2071 1.1720 1.6132 39.6921 -#> 162: 86.7337 -3.1825 1.0646 1.5897 41.1027 -#> 163: 86.9192 -3.1365 1.0339 1.6656 40.2410 -#> 164: 86.6652 -3.2052 0.9750 1.5817 40.6189 -#> 165: 86.6154 -3.1870 1.2602 1.6559 40.1832 -#> 166: 86.7300 -3.2096 1.2144 1.6571 39.8989 -#> 167: 86.4536 -3.2135 0.5155 1.7436 39.6313 -#> 168: 86.4848 -3.2315 0.5060 1.6681 39.1479 -#> 169: 86.2641 -3.2444 0.3935 1.6781 40.2903 -#> 170: 86.2482 -3.2628 0.3342 1.6177 40.2600 -#> 171: 86.2833 -3.2338 0.1701 1.6698 39.8946 -#> 172: 86.2155 -3.2175 0.1858 1.6090 39.9709 -#> 173: 86.2916 -3.2313 0.2088 1.6918 41.4421 -#> 174: 86.1920 -3.2050 0.2067 1.7521 40.7724 -#> 175: 86.2771 -3.2071 0.2213 1.5502 40.5055 -#> 176: 86.2589 -3.1867 0.2010 1.5814 40.0963 -#> 177: 86.2740 -3.2209 0.2679 1.6774 40.9479 -#> 178: 86.2210 -3.1896 0.4420 1.5512 40.3238 -#> 179: 86.1769 -3.2036 0.5592 1.6008 40.3873 -#> 180: 85.9366 -3.2046 0.5056 1.6948 41.4254 -#> 181: 85.9173 -3.2167 0.6033 1.6886 39.5784 -#> 182: 85.7077 -3.2508 0.5008 1.7501 40.4224 -#> 183: 85.8084 -3.2743 0.5737 1.7174 40.0576 -#> 184: 85.7776 -3.2518 0.7164 1.7495 39.8748 -#> 185: 85.6192 -3.2378 1.1401 1.7562 39.9841 -#> 186: 85.6951 -3.2460 1.5642 1.7330 39.1282 -#> 187: 85.5281 -3.2309 1.5452 1.7900 38.4833 -#> 188: 85.3476 -3.2018 1.1385 1.8106 39.2842 -#> 189: 85.1914 -3.2180 1.0465 1.7562 40.0715 -#> 190: 85.2759 -3.2275 1.0437 1.7160 39.9928 -#> 191: 85.3630 -3.2728 1.5672 1.7394 39.4749 -#> 192: 85.1334 -3.2467 0.9598 1.6243 39.7385 -#> 193: 84.9313 -3.2401 0.6441 1.6518 39.5447 -#> 194: 84.9097 -3.2361 0.4275 1.6509 40.3383 -#> 195: 84.9131 -3.2241 0.3344 1.5868 39.1438 -#> 196: 84.9117 -3.2419 0.2435 1.6882 40.1132 -#> 197: 84.9569 -3.2776 0.2352 1.6351 40.1070 -#> 198: 84.9113 -3.2334 0.2133 1.6282 39.9988 -#> 199: 84.9028 -3.2637 0.1859 1.6127 38.8695 -#> 200: 84.9020 -3.2456 0.2429 1.6172 40.2644 -#> 201: 84.9327 -3.2292 0.1787 1.6720 40.5826 -#> 202: 84.9313 -3.2363 0.1487 1.6641 40.1952 -#> 203: 84.9208 -3.2350 0.1445 1.6449 40.0176 -#> 204: 84.9312 -3.2296 0.1488 1.6292 40.1353 -#> 205: 84.9302 -3.2277 0.1454 1.6167 40.4137 -#> 206: 84.9378 -3.2314 0.1474 1.6263 40.2241 -#> 207: 84.9190 -3.2369 0.1454 1.6374 40.1459 -#> 208: 84.9085 -3.2385 0.1527 1.6439 40.1931 -#> 209: 84.8920 -3.2411 0.1566 1.6396 40.1558 -#> 210: 84.8787 -3.2435 0.1574 1.6381 40.1872 -#> 211: 84.8784 -3.2460 0.1528 1.6407 40.1825 -#> 212: 84.8745 -3.2469 0.1474 1.6439 40.0865 -#> 213: 84.8702 -3.2474 0.1429 1.6459 40.0164 -#> 214: 84.8592 -3.2476 0.1421 1.6506 39.9852 -#> 215: 84.8558 -3.2479 0.1389 1.6549 39.9882 -#> 216: 84.8542 -3.2488 0.1365 1.6625 39.9461 -#> 217: 84.8594 -3.2488 0.1354 1.6691 39.9751 -#> 218: 84.8634 -3.2487 0.1335 1.6751 39.9844 -#> 219: 84.8653 -3.2485 0.1298 1.6759 39.9263 -#> 220: 84.8722 -3.2496 0.1267 1.6748 39.8897 -#> 221: 84.8782 -3.2496 0.1267 1.6757 39.8504 -#> 222: 84.8772 -3.2483 0.1278 1.6761 39.8406 -#> 223: 84.8765 -3.2490 0.1296 1.6785 39.8138 -#> 224: 84.8750 -3.2492 0.1274 1.6772 39.8278 -#> 225: 84.8767 -3.2493 0.1266 1.6727 39.8642 -#> 226: 84.8741 -3.2495 0.1251 1.6711 39.8208 -#> 227: 84.8678 -3.2502 0.1234 1.6680 39.8193 -#> 228: 84.8618 -3.2509 0.1217 1.6660 39.7846 -#> 229: 84.8567 -3.2504 0.1208 1.6640 39.7538 -#> 230: 84.8559 -3.2503 0.1215 1.6624 39.7184 -#> 231: 84.8548 -3.2501 0.1203 1.6596 39.6840 -#> 232: 84.8528 -3.2505 0.1206 1.6550 39.6882 -#> 233: 84.8510 -3.2499 0.1229 1.6560 39.7083 -#> 234: 84.8479 -3.2502 0.1243 1.6568 39.7116 -#> 235: 84.8443 -3.2509 0.1244 1.6571 39.7504 -#> 236: 84.8391 -3.2515 0.1253 1.6584 39.7761 -#> 237: 84.8390 -3.2522 0.1246 1.6595 39.8188 -#> 238: 84.8433 -3.2520 0.1240 1.6606 39.8393 -#> 239: 84.8453 -3.2517 0.1233 1.6604 39.8360 -#> 240: 84.8439 -3.2519 0.1225 1.6597 39.8355 -#> 241: 84.8423 -3.2516 0.1215 1.6591 39.8154 -#> 242: 84.8403 -3.2521 0.1208 1.6572 39.7956 -#> 243: 84.8378 -3.2514 0.1199 1.6579 39.7842 -#> 244: 84.8375 -3.2501 0.1191 1.6582 39.7851 -#> 245: 84.8367 -3.2497 0.1200 1.6571 39.7873 -#> 246: 84.8348 -3.2499 0.1200 1.6561 39.7972 -#> 247: 84.8344 -3.2490 0.1196 1.6546 39.8425 -#> 248: 84.8320 -3.2485 0.1197 1.6551 39.8607 -#> 249: 84.8330 -3.2477 0.1212 1.6550 39.8643 -#> 250: 84.8348 -3.2481 0.1217 1.6561 39.8570 -#> 251: 84.8384 -3.2483 0.1214 1.6569 39.8535 -#> 252: 84.8394 -3.2487 0.1218 1.6578 39.8584 -#> 253: 84.8408 -3.2490 0.1229 1.6586 39.9146 -#> 254: 84.8414 -3.2497 0.1232 1.6602 39.9561 -#> 255: 84.8424 -3.2502 0.1229 1.6617 39.9734 -#> 256: 84.8428 -3.2506 0.1230 1.6609 39.9959 -#> 257: 84.8425 -3.2507 0.1221 1.6600 40.0029 -#> 258: 84.8420 -3.2513 0.1213 1.6585 40.0135 -#> 259: 84.8411 -3.2512 0.1212 1.6576 40.0261 -#> 260: 84.8404 -3.2513 0.1219 1.6562 40.0238 -#> 261: 84.8382 -3.2514 0.1226 1.6553 40.0140 -#> 262: 84.8358 -3.2511 0.1226 1.6547 40.0022 -#> 263: 84.8337 -3.2513 0.1224 1.6539 40.0037 -#> 264: 84.8318 -3.2511 0.1223 1.6531 39.9986 -#> 265: 84.8316 -3.2504 0.1213 1.6533 40.0094 -#> 266: 84.8325 -3.2503 0.1202 1.6549 40.0179 -#> 267: 84.8328 -3.2501 0.1189 1.6547 40.0438 -#> 268: 84.8324 -3.2505 0.1183 1.6532 40.0734 -#> 269: 84.8315 -3.2505 0.1177 1.6545 40.0714 -#> 270: 84.8304 -3.2508 0.1175 1.6545 40.0698 -#> 271: 84.8293 -3.2512 0.1173 1.6542 40.0623 -#> 272: 84.8279 -3.2512 0.1165 1.6537 40.0659 -#> 273: 84.8260 -3.2512 0.1171 1.6536 40.0580 -#> 274: 84.8241 -3.2512 0.1172 1.6523 40.0540 -#> 275: 84.8245 -3.2508 0.1171 1.6529 40.0513 -#> 276: 84.8240 -3.2510 0.1165 1.6523 40.0407 -#> 277: 84.8240 -3.2509 0.1160 1.6516 40.0290 -#> 278: 84.8250 -3.2507 0.1156 1.6505 40.0255 -#> 279: 84.8253 -3.2507 0.1147 1.6509 40.0301 -#> 280: 84.8252 -3.2507 0.1140 1.6503 40.0278 -#> 281: 84.8255 -3.2508 0.1135 1.6504 40.0238 -#> 282: 84.8246 -3.2506 0.1128 1.6505 40.0212 -#> 283: 84.8237 -3.2508 0.1120 1.6509 40.0206 -#> 284: 84.8235 -3.2507 0.1121 1.6518 40.0316 -#> 285: 84.8236 -3.2499 0.1121 1.6523 40.0330 -#> 286: 84.8230 -3.2490 0.1118 1.6530 40.0435 -#> 287: 84.8222 -3.2485 0.1119 1.6526 40.0428 -#> 288: 84.8211 -3.2486 0.1120 1.6512 40.0446 -#> 289: 84.8196 -3.2490 0.1121 1.6508 40.0355 -#> 290: 84.8189 -3.2494 0.1121 1.6503 40.0319 -#> 291: 84.8183 -3.2495 0.1126 1.6501 40.0263 -#> 292: 84.8174 -3.2496 0.1127 1.6495 40.0226 -#> 293: 84.8163 -3.2499 0.1126 1.6488 40.0255 -#> 294: 84.8165 -3.2499 0.1125 1.6479 40.0207 -#> 295: 84.8165 -3.2502 0.1130 1.6466 40.0406 -#> 296: 84.8158 -3.2508 0.1131 1.6464 40.0428 -#> 297: 84.8162 -3.2506 0.1129 1.6465 40.0432 -#> 298: 84.8166 -3.2501 0.1131 1.6460 40.0415 -#> 299: 84.8184 -3.2499 0.1138 1.6451 40.0513 -#> 300: 84.8205 -3.2499 0.1144 1.6450 40.0615 -#> 301: 84.8216 -3.2496 0.1156 1.6450 40.0591 -#> 302: 84.8225 -3.2498 0.1161 1.6448 40.0618 -#> 303: 84.8232 -3.2493 0.1163 1.6451 40.0612 -#> 304: 84.8233 -3.2488 0.1166 1.6450 40.0669 -#> 305: 84.8230 -3.2485 0.1163 1.6439 40.0714 -#> 306: 84.8221 -3.2482 0.1158 1.6440 40.0838 -#> 307: 84.8217 -3.2479 0.1154 1.6445 40.0835 -#> 308: 84.8219 -3.2477 0.1156 1.6450 40.0829 -#> 309: 84.8224 -3.2477 0.1152 1.6450 40.0836 -#> 310: 84.8224 -3.2480 0.1148 1.6457 40.0873 -#> 311: 84.8225 -3.2480 0.1143 1.6459 40.0894 -#> 312: 84.8219 -3.2482 0.1136 1.6460 40.0835 -#> 313: 84.8214 -3.2484 0.1131 1.6462 40.0810 -#> 314: 84.8208 -3.2485 0.1130 1.6471 40.0786 -#> 315: 84.8211 -3.2485 0.1128 1.6470 40.0707 -#> 316: 84.8211 -3.2483 0.1127 1.6469 40.0628 -#> 317: 84.8210 -3.2482 0.1124 1.6472 40.0580 -#> 318: 84.8201 -3.2484 0.1122 1.6472 40.0602 -#> 319: 84.8196 -3.2484 0.1117 1.6479 40.0555 -#> 320: 84.8183 -3.2480 0.1119 1.6486 40.0659 -#> 321: 84.8173 -3.2479 0.1122 1.6489 40.0713 -#> 322: 84.8164 -3.2479 0.1129 1.6491 40.0781 -#> 323: 84.8159 -3.2480 0.1136 1.6489 40.0790 -#> 324: 84.8158 -3.2480 0.1140 1.6489 40.0746 -#> 325: 84.8158 -3.2480 0.1138 1.6484 40.0845 -#> 326: 84.8157 -3.2482 0.1137 1.6482 40.0953 -#> 327: 84.8155 -3.2482 0.1134 1.6482 40.0955 -#> 328: 84.8156 -3.2482 0.1133 1.6471 40.1167 -#> 329: 84.8152 -3.2483 0.1129 1.6466 40.1195 -#> 330: 84.8152 -3.2482 0.1124 1.6459 40.1280 -#> 331: 84.8151 -3.2478 0.1120 1.6467 40.1282 -#> 332: 84.8147 -3.2477 0.1115 1.6471 40.1265 -#> 333: 84.8145 -3.2477 0.1110 1.6470 40.1333 -#> 334: 84.8144 -3.2479 0.1108 1.6468 40.1474 -#> 335: 84.8141 -3.2481 0.1106 1.6475 40.1549 -#> 336: 84.8135 -3.2481 0.1103 1.6481 40.1664 -#> 337: 84.8134 -3.2481 0.1106 1.6476 40.1837 -#> 338: 84.8129 -3.2479 0.1109 1.6482 40.1855 -#> 339: 84.8126 -3.2478 0.1107 1.6478 40.1830 -#> 340: 84.8120 -3.2482 0.1106 1.6471 40.1893 -#> 341: 84.8120 -3.2482 0.1106 1.6467 40.1931 -#> 342: 84.8119 -3.2482 0.1106 1.6473 40.2091 -#> 343: 84.8135 -3.2483 0.1109 1.6475 40.2113 -#> 344: 84.8153 -3.2483 0.1114 1.6472 40.2116 -#> 345: 84.8165 -3.2484 0.1119 1.6465 40.2110 -#> 346: 84.8171 -3.2481 0.1121 1.6462 40.2099 -#> 347: 84.8184 -3.2483 0.1126 1.6459 40.2120 -#> 348: 84.8189 -3.2483 0.1127 1.6455 40.2115 -#> 349: 84.8198 -3.2483 0.1127 1.6450 40.2087 -#> 350: 84.8202 -3.2482 0.1125 1.6454 40.2118 -#> 351: 84.8208 -3.2483 0.1120 1.6447 40.2094 -#> 352: 84.8213 -3.2483 0.1118 1.6444 40.2070 -#> 353: 84.8218 -3.2481 0.1115 1.6445 40.2077 -#> 354: 84.8226 -3.2482 0.1114 1.6439 40.2077 -#> 355: 84.8230 -3.2481 0.1113 1.6439 40.2072 -#> 356: 84.8232 -3.2479 0.1111 1.6439 40.2075 -#> 357: 84.8239 -3.2477 0.1109 1.6441 40.2021 -#> 358: 84.8245 -3.2476 0.1107 1.6445 40.2028 -#> 359: 84.8251 -3.2476 0.1107 1.6452 40.2032 -#> 360: 84.8252 -3.2474 0.1110 1.6462 40.2012 -#> 361: 84.8258 -3.2473 0.1108 1.6469 40.2043 -#> 362: 84.8260 -3.2475 0.1107 1.6467 40.2056 -#> 363: 84.8262 -3.2474 0.1106 1.6469 40.2028 -#> 364: 84.8266 -3.2472 0.1104 1.6473 40.1979 -#> 365: 84.8270 -3.2469 0.1102 1.6479 40.1923 -#> 366: 84.8273 -3.2469 0.1100 1.6482 40.1872 -#> 367: 84.8267 -3.2468 0.1099 1.6483 40.1836 -#> 368: 84.8263 -3.2470 0.1099 1.6483 40.1850 -#> 369: 84.8269 -3.2471 0.1098 1.6484 40.1864 -#> 370: 84.8274 -3.2472 0.1098 1.6484 40.1856 -#> 371: 84.8282 -3.2471 0.1101 1.6489 40.1839 -#> 372: 84.8288 -3.2469 0.1099 1.6492 40.1804 -#> 373: 84.8294 -3.2467 0.1098 1.6494 40.1806 -#> 374: 84.8301 -3.2466 0.1096 1.6491 40.1855 -#> 375: 84.8301 -3.2467 0.1093 1.6488 40.1951 -#> 376: 84.8302 -3.2467 0.1092 1.6484 40.1921 -#> 377: 84.8302 -3.2467 0.1092 1.6486 40.1842 -#> 378: 84.8300 -3.2467 0.1095 1.6485 40.1760 -#> 379: 84.8296 -3.2468 0.1094 1.6483 40.1701 -#> 380: 84.8297 -3.2469 0.1094 1.6483 40.1738 -#> 381: 84.8299 -3.2469 0.1093 1.6485 40.1801 -#> 382: 84.8302 -3.2470 0.1092 1.6488 40.1857 -#> 383: 84.8299 -3.2469 0.1090 1.6491 40.1859 -#> 384: 84.8297 -3.2470 0.1090 1.6488 40.1903 -#> 385: 84.8289 -3.2469 0.1095 1.6487 40.1978 -#> 386: 84.8282 -3.2470 0.1098 1.6487 40.1976 -#> 387: 84.8277 -3.2471 0.1101 1.6488 40.1910 -#> 388: 84.8270 -3.2471 0.1104 1.6486 40.1863 -#> 389: 84.8263 -3.2471 0.1108 1.6486 40.1837 -#> 390: 84.8259 -3.2472 0.1109 1.6491 40.1881 -#> 391: 84.8250 -3.2472 0.1111 1.6499 40.1919 -#> 392: 84.8248 -3.2471 0.1113 1.6501 40.1961 -#> 393: 84.8247 -3.2471 0.1113 1.6503 40.1941 -#> 394: 84.8241 -3.2470 0.1114 1.6508 40.1933 -#> 395: 84.8239 -3.2469 0.1115 1.6510 40.1916 -#> 396: 84.8239 -3.2468 0.1115 1.6515 40.1946 -#> 397: 84.8239 -3.2466 0.1113 1.6517 40.1979 -#> 398: 84.8241 -3.2467 0.1112 1.6519 40.1966 -#> 399: 84.8244 -3.2466 0.1112 1.6522 40.1975 -#> 400: 84.8248 -3.2466 0.1111 1.6523 40.1919 -#> 401: 84.8255 -3.2466 0.1109 1.6523 40.1889 -#> 402: 84.8259 -3.2468 0.1108 1.6523 40.1836 -#> 403: 84.8257 -3.2470 0.1109 1.6524 40.1787 -#> 404: 84.8251 -3.2470 0.1111 1.6528 40.1788 -#> 405: 84.8244 -3.2472 0.1113 1.6530 40.1761 -#> 406: 84.8235 -3.2472 0.1113 1.6529 40.1763 -#> 407: 84.8231 -3.2471 0.1112 1.6531 40.1742 -#> 408: 84.8229 -3.2471 0.1110 1.6530 40.1728 -#> 409: 84.8229 -3.2471 0.1109 1.6528 40.1698 -#> 410: 84.8233 -3.2473 0.1109 1.6524 40.1701 -#> 411: 84.8235 -3.2474 0.1109 1.6522 40.1714 -#> 412: 84.8236 -3.2474 0.1110 1.6517 40.1716 -#> 413: 84.8241 -3.2474 0.1111 1.6512 40.1741 -#> 414: 84.8238 -3.2476 0.1108 1.6508 40.1809 -#> 415: 84.8238 -3.2477 0.1108 1.6505 40.1803 -#> 416: 84.8234 -3.2475 0.1110 1.6504 40.1880 -#> 417: 84.8232 -3.2475 0.1112 1.6510 40.1938 -#> 418: 84.8232 -3.2475 0.1112 1.6511 40.1944 -#> 419: 84.8231 -3.2476 0.1114 1.6513 40.1921 -#> 420: 84.8226 -3.2477 0.1113 1.6511 40.1880 -#> 421: 84.8220 -3.2478 0.1111 1.6508 40.1859 -#> 422: 84.8213 -3.2478 0.1110 1.6503 40.1897 -#> 423: 84.8207 -3.2479 0.1110 1.6499 40.1876 -#> 424: 84.8203 -3.2479 0.1111 1.6498 40.1860 -#> 425: 84.8198 -3.2479 0.1111 1.6498 40.1817 -#> 426: 84.8191 -3.2479 0.1113 1.6498 40.1796 -#> 427: 84.8186 -3.2478 0.1112 1.6498 40.1781 -#> 428: 84.8183 -3.2478 0.1114 1.6496 40.1738 -#> 429: 84.8177 -3.2477 0.1116 1.6495 40.1695 -#> 430: 84.8172 -3.2477 0.1119 1.6496 40.1739 -#> 431: 84.8169 -3.2478 0.1120 1.6494 40.1741 -#> 432: 84.8169 -3.2479 0.1121 1.6490 40.1758 -#> 433: 84.8170 -3.2479 0.1121 1.6491 40.1793 -#> 434: 84.8171 -3.2480 0.1122 1.6488 40.1808 -#> 435: 84.8173 -3.2481 0.1123 1.6487 40.1845 -#> 436: 84.8176 -3.2481 0.1123 1.6489 40.1866 -#> 437: 84.8178 -3.2480 0.1122 1.6496 40.1872 -#> 438: 84.8183 -3.2480 0.1121 1.6502 40.1869 -#> 439: 84.8185 -3.2481 0.1119 1.6504 40.1834 -#> 440: 84.8185 -3.2480 0.1118 1.6506 40.1831 -#> 441: 84.8188 -3.2480 0.1120 1.6502 40.1893 -#> 442: 84.8192 -3.2480 0.1120 1.6501 40.1930 -#> 443: 84.8196 -3.2480 0.1120 1.6499 40.1917 -#> 444: 84.8202 -3.2478 0.1122 1.6498 40.1966 -#> 445: 84.8207 -3.2476 0.1124 1.6499 40.1977 -#> 446: 84.8210 -3.2473 0.1123 1.6496 40.2017 -#> 447: 84.8217 -3.2472 0.1123 1.6491 40.2030 -#> 448: 84.8221 -3.2473 0.1122 1.6488 40.2025 -#> 449: 84.8225 -3.2474 0.1121 1.6485 40.2069 -#> 450: 84.8224 -3.2473 0.1119 1.6484 40.2078 -#> 451: 84.8221 -3.2473 0.1118 1.6483 40.2032 -#> 452: 84.8220 -3.2472 0.1117 1.6484 40.1989 -#> 453: 84.8220 -3.2472 0.1117 1.6483 40.1953 -#> 454: 84.8220 -3.2473 0.1122 1.6483 40.1942 -#> 455: 84.8220 -3.2472 0.1124 1.6484 40.1932 -#> 456: 84.8220 -3.2470 0.1124 1.6478 40.1972 -#> 457: 84.8222 -3.2469 0.1125 1.6476 40.1989 -#> 458: 84.8226 -3.2468 0.1125 1.6479 40.1989 -#> 459: 84.8228 -3.2467 0.1126 1.6480 40.2035 -#> 460: 84.8231 -3.2467 0.1124 1.6479 40.2032 -#> 461: 84.8236 -3.2466 0.1126 1.6482 40.2030 -#> 462: 84.8238 -3.2466 0.1124 1.6481 40.2052 -#> 463: 84.8238 -3.2467 0.1123 1.6479 40.2023 -#> 464: 84.8233 -3.2467 0.1123 1.6479 40.2004 -#> 465: 84.8230 -3.2468 0.1123 1.6482 40.2043 -#> 466: 84.8233 -3.2469 0.1123 1.6480 40.2062 -#> 467: 84.8236 -3.2468 0.1121 1.6480 40.2026 -#> 468: 84.8238 -3.2468 0.1120 1.6477 40.2034 -#> 469: 84.8239 -3.2468 0.1119 1.6474 40.2035 -#> 470: 84.8241 -3.2469 0.1116 1.6473 40.2015 -#> 471: 84.8241 -3.2470 0.1116 1.6476 40.1993 -#> 472: 84.8240 -3.2469 0.1117 1.6478 40.1977 -#> 473: 84.8239 -3.2468 0.1119 1.6479 40.1949 -#> 474: 84.8239 -3.2466 0.1118 1.6480 40.1946 -#> 475: 84.8239 -3.2464 0.1119 1.6483 40.1941 -#> 476: 84.8237 -3.2462 0.1121 1.6488 40.1930 -#> 477: 84.8235 -3.2462 0.1122 1.6488 40.1901 -#> 478: 84.8235 -3.2462 0.1125 1.6488 40.1837 -#> 479: 84.8238 -3.2463 0.1128 1.6486 40.1814 -#> 480: 84.8238 -3.2464 0.1129 1.6484 40.1794 -#> 481: 84.8239 -3.2464 0.1129 1.6483 40.1783 -#> 482: 84.8237 -3.2465 0.1130 1.6482 40.1784 -#> 483: 84.8234 -3.2465 0.1130 1.6483 40.1764 -#> 484: 84.8227 -3.2465 0.1132 1.6482 40.1775 -#> 485: 84.8223 -3.2465 0.1133 1.6483 40.1764 -#> 486: 84.8219 -3.2465 0.1135 1.6484 40.1781 -#> 487: 84.8215 -3.2465 0.1136 1.6487 40.1770 -#> 488: 84.8214 -3.2466 0.1136 1.6486 40.1796 -#> 489: 84.8214 -3.2466 0.1134 1.6489 40.1801 -#> 490: 84.8214 -3.2466 0.1132 1.6490 40.1786 -#> 491: 84.8218 -3.2466 0.1131 1.6494 40.1805 -#> 492: 84.8220 -3.2465 0.1133 1.6495 40.1805 -#> 493: 84.8223 -3.2465 0.1137 1.6493 40.1791 -#> 494: 84.8223 -3.2465 0.1140 1.6494 40.1774 -#> 495: 84.8224 -3.2465 0.1142 1.6491 40.1764 -#> 496: 84.8225 -3.2465 0.1142 1.6491 40.1750 -#> 497: 84.8229 -3.2465 0.1142 1.6487 40.1742 -#> 498: 84.8230 -3.2466 0.1140 1.6485 40.1712 -#> 499: 84.8229 -3.2466 0.1137 1.6485 40.1688 -#> 500: 84.8228 -3.2468 0.1134 1.6488 40.1690
#> Calculating covariance matrix
#>
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → compiling EBE model...
#>
#> done
#> Calculating residuals/tables
#> done
f_nlmixr_sfo_focei <- nlmixr(f_mmkin_parent["SFO", ], est = "focei") -
#> parameter labels from comments are typically ignored in non-interactive mode
#> Need to run with the source intact to parse comments
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → calculate jacobian
#>
#> → calculate sensitivities
#>
#> → calculate ∂(f)/∂(η)
#>
#> → calculate ∂(R²)/∂(η)
#>
#> → finding duplicate expressions in inner model...
#>
#> → optimizing duplicate expressions in inner model...
#>
#> → finding duplicate expressions in EBE model...
#>
#> → optimizing duplicate expressions in EBE model...
#>
#> → compiling inner model...
#>
#> done
#> → finding duplicate expressions in FD model...
#>
#> → compiling EBE model...
#>
#> done
#> → compiling events FD model...
#>
#> done
#> Key: U: Unscaled Parameters; X: Back-transformed parameters; G: Gill difference gradient approximation -#> F: Forward difference gradient approximation -#> C: Central difference gradient approximation -#> M: Mixed forward and central difference gradient approximation -#> Unscaled parameters for Omegas=chol(solve(omega)); -#> Diagonals are transformed, as specified by foceiControl(diagXform=) -#> |-----+---------------+-----------+-----------+-----------+-----------| -#> | #| Objective Fun | parent_0 |log_k_parent | sigma | o1 | -#> |.....................| o2 |...........|...........|...........| -#> | 1| 451.22394 | 1.000 | -1.000 | -0.7995 | -0.9125 | -#> |.....................| -0.9081 |...........|...........|...........| -#> | U| 451.22394 | 86.39 | -3.215 | 5.768 | 0.7049 | -#> |.....................| 0.9021 |...........|...........|...........| -#> | X| 451.22394 | 86.39 | 0.04015 | 5.768 | 0.7049 | -#> |.....................| 0.9021 |...........|...........|...........| -#> | G| Gill Diff. | 52.79 | 0.01520 | -15.05 | 0.6163 | -#> |.....................| 2.488 |...........|...........|...........| -#> | 2| 3099.6543 | 0.03939 | -1.000 | -0.5255 | -0.9237 | -#> |.....................| -0.9534 |...........|...........|...........| -#> | U| 3099.6543 | 3.403 | -3.215 | 6.558 | 0.6970 | -#> |.....................| 0.8613 |...........|...........|...........| -#> | X| 3099.6543 | 3.403 | 0.04014 | 6.558 | 0.6970 | -#> |.....................| 0.8613 |...........|...........|...........| -#> | 3| 473.10068 | 0.9039 | -1.000 | -0.7721 | -0.9136 | -#> |.....................| -0.9126 |...........|...........|...........| -#> | U| 473.10068 | 78.09 | -3.215 | 5.847 | 0.7041 | -#> |.....................| 0.8980 |...........|...........|...........| -#> | X| 473.10068 | 78.09 | 0.04015 | 5.847 | 0.7041 | -#> |.....................| 0.8980 |...........|...........|...........| -#> | 4| 450.95086 | 0.9904 | -1.000 | -0.7967 | -0.9126 | -#> |.....................| -0.9086 |...........|...........|...........| -#> | U| 450.95086 | 85.56 | -3.215 | 5.776 | 0.7048 | -#> |.....................| 0.9017 |...........|...........|...........| -#> | X| 450.95086 | 85.56 | 0.04015 | 5.776 | 0.7048 | -#> |.....................| 0.9017 |...........|...........|...........| -#> | F| Forward Diff. | -4.520 | 0.09729 | -14.85 | -0.2941 | -#> |.....................| 2.449 |...........|...........|...........| -#> | 5| 450.82239 | 0.9932 | -1.000 | -0.7873 | -0.9124 | -#> |.....................| -0.9101 |...........|...........|...........| -#> | U| 450.82239 | 85.81 | -3.215 | 5.804 | 0.7049 | -#> |.....................| 0.9003 |...........|...........|...........| -#> | X| 450.82239 | 85.81 | 0.04015 | 5.804 | 0.7049 | -#> |.....................| 0.9003 |...........|...........|...........| -#> | 6| 450.73959 | 0.9981 | -1.000 | -0.7712 | -0.9121 | -#> |.....................| -0.9128 |...........|...........|...........| -#> | U| 450.73959 | 86.23 | -3.215 | 5.850 | 0.7051 | -#> |.....................| 0.8979 |...........|...........|...........| -#> | X| 450.73959 | 86.23 | 0.04015 | 5.850 | 0.7051 | -#> |.....................| 0.8979 |...........|...........|...........| -#> | F| Forward Diff. | 41.55 | 0.02901 | -12.22 | 0.2553 | -#> |.....................| 2.069 |...........|...........|...........| -#> | 7| 450.34694 | 0.9875 | -1.000 | -0.7467 | -0.9114 | -#> |.....................| -0.9169 |...........|...........|...........| -#> | U| 450.34694 | 85.32 | -3.215 | 5.921 | 0.7056 | -#> |.....................| 0.8942 |...........|...........|...........| -#> | X| 450.34694 | 85.32 | 0.04014 | 5.921 | 0.7056 | -#> |.....................| 0.8942 |...........|...........|...........| -#> | F| Forward Diff. | -19.58 | 0.1161 | -10.02 | -0.6042 | -#> |.....................| 1.700 |...........|...........|...........| -#> | 8| 450.09191 | 0.9931 | -1.001 | -0.7208 | -0.9093 | -#> |.....................| -0.9217 |...........|...........|...........| -#> | U| 450.09191 | 85.80 | -3.216 | 5.995 | 0.7071 | -#> |.....................| 0.8899 |...........|...........|...........| -#> | X| 450.09191 | 85.80 | 0.04012 | 5.995 | 0.7071 | -#> |.....................| 0.8899 |...........|...........|...........| -#> | F| Forward Diff. | 13.00 | 0.06566 | -7.570 | -0.3896 | -#> |.....................| 1.273 |...........|...........|...........| -#> | 9| 449.93949 | 0.9873 | -1.002 | -0.6965 | -0.8998 | -#> |.....................| -0.9259 |...........|...........|...........| -#> | U| 449.93949 | 85.30 | -3.217 | 6.065 | 0.7138 | -#> |.....................| 0.8861 |...........|...........|...........| -#> | X| 449.93949 | 85.30 | 0.04009 | 6.065 | 0.7138 | -#> |.....................| 0.8861 |...........|...........|...........| -#> | F| Forward Diff. | -18.86 | 0.1073 | -5.670 | -0.6860 | -#> |.....................| 0.8878 |...........|...........|...........| -#> | 10| 449.82026 | 0.9918 | -1.004 | -0.6799 | -0.8791 | -#> |.....................| -0.9254 |...........|...........|...........| -#> | U| 449.82026 | 85.69 | -3.219 | 6.113 | 0.7284 | -#> |.....................| 0.8865 |...........|...........|...........| -#> | X| 449.82026 | 85.69 | 0.04000 | 6.113 | 0.7284 | -#> |.....................| 0.8865 |...........|...........|...........| -#> | F| Forward Diff. | 8.164 | 0.05669 | -4.296 | -0.3775 | -#> |.....................| 0.8823 |...........|...........|...........| -#> | 11| 449.76996 | 0.9897 | -1.006 | -0.6720 | -0.8560 | -#> |.....................| -0.9364 |...........|...........|...........| -#> | U| 449.76996 | 85.50 | -3.221 | 6.136 | 0.7447 | -#> |.....................| 0.8766 |...........|...........|...........| -#> | X| 449.76996 | 85.50 | 0.03990 | 6.136 | 0.7447 | -#> |.....................| 0.8766 |...........|...........|...........| -#> | F| Forward Diff. | -2.743 | 0.05613 | -3.782 | -0.3486 | -#> |.....................| -0.07732 |...........|...........|...........| -#> | 12| 449.73800 | 0.9901 | -1.008 | -0.6600 | -0.8416 | -#> |.....................| -0.9169 |...........|...........|...........| -#> | U| 449.738 | 85.54 | -3.223 | 6.170 | 0.7549 | -#> |.....................| 0.8942 |...........|...........|...........| -#> | X| 449.738 | 85.54 | 0.03983 | 6.170 | 0.7549 | -#> |.....................| 0.8942 |...........|...........|...........| -#> | F| Forward Diff. | 0.5907 | 0.04688 | -2.910 | -0.3174 | -#> |.....................| 1.529 |...........|...........|...........| -#> | 13| 449.73838 | 0.9854 | -1.008 | -0.6366 | -0.8390 | -#> |.....................| -0.9292 |...........|...........|...........| -#> | U| 449.73838 | 85.13 | -3.224 | 6.238 | 0.7567 | -#> |.....................| 0.8831 |...........|...........|...........| -#> | X| 449.73838 | 85.13 | 0.03981 | 6.238 | 0.7567 | -#> |.....................| 0.8831 |...........|...........|...........| -#> | 14| 449.71577 | 0.9877 | -1.008 | -0.6484 | -0.8403 | -#> |.....................| -0.9231 |...........|...........|...........| -#> | U| 449.71577 | 85.33 | -3.223 | 6.204 | 0.7558 | -#> |.....................| 0.8886 |...........|...........|...........| -#> | X| 449.71577 | 85.33 | 0.03982 | 6.204 | 0.7558 | -#> |.....................| 0.8886 |...........|...........|...........| -#> | F| Forward Diff. | -13.00 | 0.06593 | -2.084 | -0.4341 | -#> |.....................| 1.007 |...........|...........|...........| -#> | 15| 449.68436 | 0.9912 | -1.009 | -0.6401 | -0.8344 | -#> |.....................| -0.9311 |...........|...........|...........| -#> | U| 449.68436 | 85.64 | -3.224 | 6.228 | 0.7599 | -#> |.....................| 0.8814 |...........|...........|...........| -#> | X| 449.68436 | 85.64 | 0.03979 | 6.228 | 0.7599 | -#> |.....................| 0.8814 |...........|...........|...........| -#> | F| Forward Diff. | 7.939 | 0.02803 | -1.419 | -0.2659 | -#> |.....................| 0.3125 |...........|...........|...........| -#> | 16| 449.66988 | 0.9896 | -1.010 | -0.6363 | -0.8221 | -#> |.....................| -0.9344 |...........|...........|...........| -#> | U| 449.66988 | 85.50 | -3.226 | 6.239 | 0.7686 | -#> |.....................| 0.8784 |...........|...........|...........| -#> | X| 449.66988 | 85.50 | 0.03973 | 6.239 | 0.7686 | -#> |.....................| 0.8784 |...........|...........|...........| -#> | F| Forward Diff. | -0.8695 | 0.03361 | -1.202 | -0.2917 | -#> |.....................| 0.02327 |...........|...........|...........| -#> | 17| 449.66421 | 0.9900 | -1.012 | -0.6343 | -0.8088 | -#> |.....................| -0.9351 |...........|...........|...........| -#> | U| 449.66421 | 85.53 | -3.227 | 6.245 | 0.7779 | -#> |.....................| 0.8778 |...........|...........|...........| -#> | X| 449.66421 | 85.53 | 0.03969 | 6.245 | 0.7779 | -#> |.....................| 0.8778 |...........|...........|...........| -#> | 18| 449.65407 | 0.9895 | -1.015 | -0.6307 | -0.7728 | -#> |.....................| -0.9370 |...........|...........|...........| -#> | U| 449.65407 | 85.49 | -3.230 | 6.255 | 0.8033 | -#> |.....................| 0.8761 |...........|...........|...........| -#> | X| 449.65407 | 85.49 | 0.03957 | 6.255 | 0.8033 | -#> |.....................| 0.8761 |...........|...........|...........| -#> | F| Forward Diff. | 0.6836 | 0.009868 | -0.9456 | -0.1262 | -#> |.....................| -0.2597 |...........|...........|...........| -#> | 19| 449.64227 | 0.9890 | -1.006 | -0.6121 | -0.7274 | -#> |.....................| -0.9339 |...........|...........|...........| -#> | U| 449.64227 | 85.45 | -3.222 | 6.309 | 0.8353 | -#> |.....................| 0.8789 |...........|...........|...........| -#> | X| 449.64227 | 85.45 | 0.03989 | 6.309 | 0.8353 | -#> |.....................| 0.8789 |...........|...........|...........| -#> | F| Forward Diff. | -0.4372 | 0.06357 | 0.2445 | -0.08318 | -#> |.....................| -0.05696 |...........|...........|...........| -#> | 20| 449.64227 | 0.9890 | -1.006 | -0.6121 | -0.7274 | -#> |.....................| -0.9339 |...........|...........|...........| -#> | U| 449.64227 | 85.45 | -3.222 | 6.309 | 0.8353 | -#> |.....................| 0.8789 |...........|...........|...........| -#> | X| 449.64227 | 85.45 | 0.03989 | 6.309 | 0.8353 | -#> |.....................| 0.8789 |...........|...........|...........| -#> calculating covariance matrix +#> no cache: create with `rxCreateCache()`
#> Calculating covariance matrix
#>
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → compiling EBE model...
#>
#> done
#> Calculating residuals/tables
#> done
f_nlmixr_sfo_focei <- nlmixr(f_mmkin_parent["SFO", ], est = "focei", + control = foceiControl(print = 0)) +
#> parameter labels from comments are typically ignored in non-interactive mode
#> Need to run with the source intact to parse comments
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → calculate jacobian
#>
#> → calculate sensitivities
#>
#> → calculate ∂(f)/∂(η)
#>
#> → calculate ∂(R²)/∂(η)
#>
#> → finding duplicate expressions in inner model...
#>
#> → optimizing duplicate expressions in inner model...
#>
#> → finding duplicate expressions in EBE model...
#>
#> → optimizing duplicate expressions in EBE model...
#>
#> → compiling inner model...
#>
#> done
#> → finding duplicate expressions in FD model...
#>
#> → compiling EBE model...
#>
#> done
#> → compiling events FD model...
#>
#> done
#> calculating covariance matrix #> done
#> Calculating residuals/tables
#> done
#> Warning: initial ETAs were nudged; (can control by foceiControl(etaNudge=., etaNudge2=))
#> Warning: last objective function was not at minimum, possible problems in optimization
#> Warning: gradient problems with initial estimate and covariance; see $scaleInfo
-f_nlmixr_fomc_saem <- nlmixr(f_mmkin_parent["FOMC", ], est = "saem") -
#> parameter labels from comments are typically ignored in non-interactive mode
#> Need to run with the source intact to parse comments
#>
#> → generate SAEM model
#> done
#> 1: 93.6754 -0.2977 2.0254 2.7655 0.7032 0.5111 15.3443 -#> 2: 93.8828 -0.2006 2.0786 2.6886 0.6681 0.4855 7.5256 -#> 3: 94.0494 -0.2006 2.0891 2.9975 0.6347 0.4612 7.0501 -#> 4: 94.1641 -0.2446 2.0103 3.6008 0.6029 0.4382 6.2482 -#> 5: 93.8983 -0.2562 1.9851 4.5637 0.5728 0.4163 6.1507 -#> 6: 93.9311 -0.2542 1.9733 5.7516 0.5441 0.3954 6.1445 -#> 7: 93.8631 -0.2535 1.9876 5.4640 0.5169 0.3757 5.9234 -#> 8: 94.2851 -0.2327 1.9851 5.7884 0.4943 0.3569 5.9887 -#> 9: 94.2114 -0.2348 2.0169 5.4990 0.4733 0.3390 5.9730 -#> 10: 94.0782 -0.1951 2.0678 5.2240 0.4969 0.3221 5.7694 -#> 11: 94.0527 -0.1898 2.0988 4.9628 0.4924 0.3060 5.6429 -#> 12: 93.9845 -0.1795 2.1168 4.7147 0.4748 0.2907 5.4764 -#> 13: 93.9424 -0.1958 2.0924 4.4790 0.4551 0.2762 5.5598 -#> 14: 94.2255 -0.2005 2.0963 4.2910 0.4552 0.2623 5.4520 -#> 15: 94.6065 -0.1964 2.0794 4.0765 0.4516 0.2492 5.5275 -#> 16: 94.8393 -0.1872 2.0825 4.7814 0.4714 0.2368 5.4708 -#> 17: 94.5489 -0.1873 2.0822 5.3772 0.4714 0.2249 5.5790 -#> 18: 94.5797 -0.1994 2.0702 5.1083 0.4563 0.2137 5.5962 -#> 19: 94.7205 -0.1987 2.0942 5.1405 0.4580 0.2030 5.8328 -#> 20: 94.2162 -0.1961 2.0955 7.2352 0.4578 0.2081 5.5730 -#> 21: 94.2688 -0.1935 2.0980 6.8735 0.4539 0.2199 5.6561 -#> 22: 94.4008 -0.2294 2.0430 6.5298 0.4312 0.2528 5.4970 -#> 23: 93.8617 -0.2126 2.0861 6.2033 0.4420 0.2401 5.3679 -#> 24: 93.9223 -0.2173 2.0786 5.8931 0.4419 0.2281 5.4475 -#> 25: 94.1259 -0.2199 2.0790 5.5985 0.4429 0.2167 5.2610 -#> 26: 93.5597 -0.1966 2.1115 5.3186 0.4521 0.2059 5.0971 -#> 27: 93.5468 -0.2077 2.1016 5.0526 0.4458 0.2090 5.2223 -#> 28: 93.6901 -0.2106 2.0884 4.8000 0.4439 0.2114 5.1693 -#> 29: 93.4521 -0.1991 2.1349 4.5600 0.4236 0.2248 5.1834 -#> 30: 93.7678 -0.1998 2.1267 5.5252 0.4212 0.2297 5.0549 -#> 31: 93.5695 -0.2039 2.1244 5.2489 0.4165 0.2334 5.0965 -#> 32: 93.8288 -0.1855 2.1392 5.1872 0.4401 0.2286 5.0321 -#> 33: 93.9053 -0.1827 2.1426 4.9278 0.4479 0.2171 5.0706 -#> 34: 94.0876 -0.1871 2.1151 4.6814 0.4613 0.2063 5.1438 -#> 35: 94.5298 -0.1845 2.1221 4.4474 0.4586 0.2006 5.1897 -#> 36: 94.3221 -0.1765 2.1144 5.3164 0.4401 0.2193 5.0921 -#> 37: 94.3600 -0.1842 2.1021 5.3586 0.4507 0.2210 5.0926 -#> 38: 94.3734 -0.1790 2.1261 5.0907 0.4494 0.2100 5.1494 -#> 39: 94.5052 -0.1806 2.1319 4.8362 0.4514 0.1995 5.0177 -#> 40: 94.1042 -0.1906 2.0983 4.5944 0.4360 0.1984 5.2507 -#> 41: 94.1815 -0.1914 2.1166 4.3646 0.4385 0.1977 5.1065 -#> 42: 93.9837 -0.2144 2.0673 4.1464 0.4378 0.1878 5.1603 -#> 43: 93.8806 -0.2107 2.0840 3.9642 0.4456 0.1848 5.0904 -#> 44: 94.1765 -0.2107 2.0722 3.7660 0.4456 0.1881 5.1562 -#> 45: 94.2089 -0.2018 2.0874 3.5777 0.4482 0.1787 5.1219 -#> 46: 93.8851 -0.2111 2.0869 3.9421 0.4462 0.1697 5.0752 -#> 47: 94.1372 -0.2192 2.0731 3.7450 0.4517 0.1733 5.1784 -#> 48: 94.0436 -0.2157 2.0730 3.5578 0.4577 0.1854 5.1957 -#> 49: 93.9915 -0.2122 2.0740 3.3799 0.4450 0.1829 5.1116 -#> 50: 94.0579 -0.2233 2.0633 3.2109 0.4453 0.1964 5.0295 -#> 51: 94.0044 -0.2283 2.0544 3.9314 0.4563 0.2118 5.0457 -#> 52: 94.1080 -0.2174 2.0551 4.8914 0.4548 0.2182 5.0504 -#> 53: 94.3715 -0.2134 2.0598 6.2569 0.4509 0.2162 4.9574 -#> 54: 94.7344 -0.2119 2.0459 5.9440 0.4563 0.2121 5.1069 -#> 55: 94.2730 -0.2055 2.0625 5.6468 0.4758 0.2125 5.2656 -#> 56: 94.0206 -0.2017 2.0715 5.3645 0.4719 0.2045 5.1400 -#> 57: 94.0409 -0.1986 2.0837 5.0963 0.4801 0.2068 5.0902 -#> 58: 94.2392 -0.2122 2.0652 4.8415 0.4560 0.2334 5.1883 -#> 59: 93.9996 -0.1962 2.0764 4.5994 0.4686 0.2417 5.1242 -#> 60: 94.1448 -0.1840 2.1016 4.3694 0.4916 0.2296 5.0867 -#> 61: 94.4861 -0.1840 2.1239 4.3846 0.4916 0.2181 5.3979 -#> 62: 93.9892 -0.1781 2.1083 5.1623 0.5216 0.2072 5.0944 -#> 63: 94.0641 -0.1822 2.1129 4.9628 0.5123 0.1969 5.4228 -#> 64: 94.1414 -0.1733 2.1343 6.7238 0.5220 0.1879 5.3546 -#> 65: 94.0908 -0.1754 2.1160 8.4197 0.5165 0.1852 5.0873 -#> 66: 94.1490 -0.1753 2.1054 7.9987 0.5183 0.1857 5.0777 -#> 67: 93.8958 -0.1613 2.1295 7.5988 0.5004 0.2102 5.0641 -#> 68: 94.0579 -0.1683 2.1511 7.2188 0.5083 0.2110 5.3362 -#> 69: 94.0001 -0.1581 2.1629 6.8579 0.5225 0.2272 5.4399 -#> 70: 93.9712 -0.1733 2.1393 6.5150 0.5153 0.2403 5.5011 -#> 71: 94.3143 -0.1758 2.0989 6.1893 0.5043 0.2713 5.5366 -#> 72: 94.2138 -0.1842 2.1003 5.8798 0.5130 0.2578 5.2964 -#> 73: 94.1742 -0.1951 2.0773 5.5858 0.5165 0.2449 5.1986 -#> 74: 94.1287 -0.2003 2.0606 5.3065 0.5115 0.2326 4.8815 -#> 75: 94.4113 -0.1918 2.0811 5.6717 0.5153 0.2210 4.8370 -#> 76: 94.5175 -0.1940 2.0773 5.3881 0.5127 0.2127 4.9333 -#> 77: 94.4157 -0.1882 2.0714 5.1187 0.5189 0.2021 5.0162 -#> 78: 94.6190 -0.2000 2.0529 4.8628 0.5057 0.2064 4.9436 -#> 79: 94.8081 -0.2006 2.0458 4.6196 0.5053 0.2177 5.0159 -#> 80: 94.7817 -0.1943 2.0547 4.3886 0.5076 0.2099 5.1427 -#> 81: 94.5410 -0.1990 2.0686 4.8770 0.5032 0.2092 5.1192 -#> 82: 94.9536 -0.1936 2.0879 6.9870 0.4781 0.2068 5.1053 -#> 83: 94.7923 -0.1936 2.0777 6.6377 0.4734 0.2120 5.1233 -#> 84: 94.9314 -0.1881 2.0981 6.3058 0.4701 0.2088 5.2821 -#> 85: 94.8024 -0.1866 2.0975 5.9905 0.4684 0.2150 5.2088 -#> 86: 94.6506 -0.2019 2.0677 5.6910 0.4510 0.2043 5.2488 -#> 87: 94.9460 -0.1868 2.0823 5.4064 0.4625 0.2089 5.2663 -#> 88: 94.6365 -0.1901 2.0791 5.3471 0.4509 0.2203 5.2214 -#> 89: 94.5943 -0.2135 2.0521 5.0798 0.4585 0.2093 5.0161 -#> 90: 94.7957 -0.2131 2.0545 4.8258 0.4502 0.2026 5.1344 -#> 91: 94.6308 -0.2096 2.0565 4.5845 0.4566 0.2108 5.0403 -#> 92: 94.3521 -0.2059 2.0557 4.3553 0.4925 0.2072 5.3715 -#> 93: 94.5188 -0.2130 2.0646 4.1375 0.4980 0.1996 5.5624 -#> 94: 94.5995 -0.2056 2.0593 3.9306 0.4995 0.2167 5.3581 -#> 95: 94.7276 -0.1868 2.0922 3.7341 0.4863 0.2059 5.3610 -#> 96: 94.5986 -0.1900 2.0771 3.5474 0.4998 0.1956 5.2070 -#> 97: 94.2586 -0.1881 2.1051 3.9558 0.4757 0.1858 5.1561 -#> 98: 94.0716 -0.2098 2.0698 5.6441 0.4539 0.2044 5.1802 -#> 99: 94.2657 -0.2065 2.0679 5.6964 0.4679 0.2190 5.3608 -#> 100: 94.2331 -0.2203 2.0679 5.4116 0.4445 0.2256 5.4031 -#> 101: 93.8634 -0.2222 2.0720 5.1410 0.4279 0.2341 5.3774 -#> 102: 93.7675 -0.2496 2.0232 4.8839 0.4103 0.2224 5.1238 -#> 103: 93.9534 -0.2416 2.0249 4.6397 0.4144 0.2113 5.0031 -#> 104: 94.0631 -0.2442 2.0216 4.8203 0.4119 0.2007 5.1163 -#> 105: 94.0324 -0.2464 2.0092 4.5793 0.4135 0.2047 5.1666 -#> 106: 93.9954 -0.2482 2.0256 4.9167 0.4083 0.2052 5.2515 -#> 107: 94.2189 -0.2507 2.0121 4.6709 0.4072 0.2087 5.3430 -#> 108: 94.3707 -0.2448 2.0215 4.4373 0.4119 0.1996 5.1549 -#> 109: 94.1518 -0.2428 2.0197 4.2155 0.4155 0.1958 5.5480 -#> 110: 93.9287 -0.2571 2.0275 4.0047 0.4152 0.1931 5.8482 -#> 111: 93.9743 -0.2488 2.0202 3.8045 0.4171 0.2084 5.9798 -#> 112: 93.6245 -0.2350 2.0346 3.6142 0.4397 0.1980 6.0270 -#> 113: 94.5370 -0.2330 2.0593 3.9090 0.4422 0.1881 5.4431 -#> 114: 94.5052 -0.2289 2.0555 3.7135 0.4391 0.1787 5.5970 -#> 115: 94.5963 -0.2216 2.0579 3.5279 0.4446 0.1727 5.3901 -#> 116: 94.5059 -0.2293 2.0459 3.3515 0.4407 0.1705 5.2788 -#> 117: 94.6315 -0.2211 2.0564 3.1839 0.4279 0.1689 5.3258 -#> 118: 94.4868 -0.2194 2.0508 4.6523 0.4275 0.1604 5.1421 -#> 119: 94.1809 -0.2232 2.0444 7.0101 0.4302 0.1612 5.3468 -#> 120: 94.0950 -0.2231 2.0482 7.2110 0.4304 0.1625 5.1691 -#> 121: 94.1525 -0.2059 2.0682 6.8504 0.4474 0.1875 5.2811 -#> 122: 94.7122 -0.2154 2.0692 6.6747 0.4366 0.1906 5.3851 -#> 123: 94.2915 -0.2311 2.0431 6.9655 0.4351 0.2021 5.2103 -#> 124: 93.9984 -0.2310 2.0401 6.6173 0.4396 0.2091 5.0920 -#> 125: 94.3668 -0.2068 2.0505 6.2864 0.4983 0.1987 5.3263 -#> 126: 94.3570 -0.2043 2.0525 5.9721 0.5006 0.1887 5.3281 -#> 127: 94.7086 -0.2177 2.0377 5.6735 0.4762 0.1958 5.4003 -#> 128: 94.3565 -0.2173 2.0432 5.3898 0.4754 0.2055 5.5196 -#> 129: 94.4862 -0.2066 2.0639 5.1203 0.4807 0.1952 5.4783 -#> 130: 94.6107 -0.2026 2.0908 4.8643 0.4579 0.1855 5.6186 -#> 131: 94.6831 -0.1907 2.0920 4.6211 0.4710 0.1762 5.4859 -#> 132: 94.7035 -0.2052 2.0733 4.6333 0.4492 0.1723 5.2721 -#> 133: 94.1511 -0.2192 2.0615 5.7533 0.4362 0.1905 5.5019 -#> 134: 94.2758 -0.2101 2.0624 5.4656 0.4356 0.1810 5.3233 -#> 135: 94.6546 -0.1960 2.0826 5.1923 0.4281 0.1980 5.2515 -#> 136: 94.0322 -0.2100 2.0770 4.9327 0.4156 0.2103 5.3514 -#> 137: 94.0915 -0.2096 2.0859 5.6044 0.4159 0.2008 5.2755 -#> 138: 94.2452 -0.1983 2.1055 6.0837 0.4213 0.2185 5.0580 -#> 139: 94.5460 -0.1876 2.1093 6.8410 0.4301 0.2288 5.0840 -#> 140: 94.6905 -0.1863 2.1167 7.4689 0.4313 0.2173 5.0868 -#> 141: 94.6425 -0.1703 2.1240 7.0955 0.4522 0.2065 4.9715 -#> 142: 94.2538 -0.1632 2.1514 6.7407 0.4499 0.2059 5.0853 -#> 143: 94.3098 -0.1625 2.1567 6.4037 0.4499 0.2115 5.5860 -#> 144: 94.2802 -0.1716 2.1510 6.0835 0.4535 0.2081 5.1989 -#> 145: 94.1169 -0.1707 2.1523 5.7793 0.4531 0.2109 5.1407 -#> 146: 94.2558 -0.1579 2.1623 5.4903 0.4654 0.2427 5.2652 -#> 147: 93.9440 -0.1587 2.1673 5.2158 0.4611 0.2537 5.2699 -#> 148: 94.4271 -0.1587 2.1586 4.9550 0.4611 0.2595 5.1280 -#> 149: 94.2734 -0.1768 2.1160 4.7073 0.4809 0.2802 4.9251 -#> 150: 94.2406 -0.1928 2.0941 5.4176 0.4626 0.2662 5.0837 -#> 151: 94.4217 -0.1884 2.0965 5.1467 0.4677 0.2538 5.1728 -#> 152: 94.4856 -0.1826 2.1127 5.6736 0.4646 0.2373 5.1522 -#> 153: 94.3458 -0.1686 2.1381 6.3603 0.4760 0.2028 5.2197 -#> 154: 94.3945 -0.1633 2.1370 5.1586 0.4402 0.1955 5.3770 -#> 155: 94.6367 -0.1520 2.1596 6.4738 0.4533 0.1882 5.3345 -#> 156: 94.9050 -0.1521 2.1417 6.8382 0.4532 0.1729 5.2770 -#> 157: 94.5823 -0.1540 2.1326 5.5745 0.4487 0.1813 5.2760 -#> 158: 94.8355 -0.1691 2.1357 5.2979 0.4296 0.1990 5.3177 -#> 159: 94.7330 -0.1740 2.1148 4.0960 0.4476 0.1820 5.3001 -#> 160: 94.4926 -0.1731 2.1123 4.3550 0.4666 0.1817 5.1849 -#> 161: 94.4953 -0.1758 2.1063 4.0311 0.4698 0.1929 5.1371 -#> 162: 94.5639 -0.1753 2.1064 4.3044 0.4692 0.1911 5.1437 -#> 163: 94.5477 -0.1798 2.1041 4.1393 0.4804 0.2002 5.3561 -#> 164: 94.3812 -0.1934 2.1019 3.5760 0.4689 0.1908 5.3231 -#> 165: 94.0978 -0.1924 2.0973 2.2052 0.4743 0.1962 5.2813 -#> 166: 94.1374 -0.2043 2.0834 2.5477 0.4639 0.1904 5.3277 -#> 167: 94.1587 -0.2036 2.0797 2.7035 0.4561 0.1951 5.3106 -#> 168: 94.1518 -0.2166 2.0654 2.4969 0.4405 0.2090 5.3148 -#> 169: 94.3328 -0.2164 2.0652 2.3067 0.4455 0.1993 5.2385 -#> 170: 94.6029 -0.2176 2.0456 1.7913 0.4478 0.2085 5.4589 -#> 171: 94.2690 -0.2189 2.0635 1.8133 0.4496 0.1999 5.4918 -#> 172: 94.3227 -0.2120 2.0643 1.7763 0.4337 0.2063 5.4992 -#> 173: 94.3099 -0.2039 2.0892 1.1103 0.4350 0.2201 5.5148 -#> 174: 94.3192 -0.1895 2.1140 0.9817 0.4454 0.2078 5.5249 -#> 175: 94.2327 -0.1967 2.0939 0.9890 0.4361 0.1876 5.6321 -#> 176: 94.2707 -0.1989 2.0958 1.3001 0.4405 0.1790 5.6494 -#> 177: 94.0762 -0.2024 2.0908 0.9179 0.4426 0.1778 5.7085 -#> 178: 94.1807 -0.2074 2.0761 1.2663 0.4237 0.2064 5.5157 -#> 179: 94.2221 -0.2029 2.1083 2.0148 0.4270 0.2023 5.6770 -#> 180: 94.5889 -0.1975 2.0974 1.5302 0.4223 0.1778 5.7495 -#> 181: 94.4280 -0.2163 2.0648 1.8829 0.3908 0.1994 5.3948 -#> 182: 94.7076 -0.2247 2.0340 2.1148 0.4238 0.2062 5.4167 -#> 183: 94.5127 -0.2292 2.0317 3.0950 0.4302 0.2160 5.5009 -#> 184: 94.2522 -0.2335 2.0515 2.8900 0.4265 0.2038 5.2995 -#> 185: 94.2331 -0.2330 2.0431 3.3282 0.4276 0.2044 5.2220 -#> 186: 94.2207 -0.2259 2.0512 4.0568 0.4253 0.2008 5.2307 -#> 187: 94.5124 -0.2188 2.0603 3.0941 0.4381 0.1962 5.6927 -#> 188: 94.7691 -0.2454 2.0193 3.1090 0.4409 0.2012 5.5051 -#> 189: 94.5693 -0.2399 2.0169 3.1069 0.4292 0.1883 5.4354 -#> 190: 94.5742 -0.2318 2.0256 4.4216 0.4200 0.1932 5.3851 -#> 191: 94.3882 -0.2475 1.9949 4.5490 0.4366 0.1972 5.2470 -#> 192: 94.4267 -0.2478 1.9943 4.3327 0.4281 0.1995 5.2792 -#> 193: 94.6313 -0.2522 1.9703 3.5911 0.4321 0.1944 5.6218 -#> 194: 94.4345 -0.2616 1.9704 3.2209 0.4260 0.1925 5.5199 -#> 195: 94.6135 -0.2614 1.9622 2.1481 0.4264 0.1879 5.5750 -#> 196: 94.7574 -0.2324 2.0049 1.3351 0.4661 0.1738 5.6590 -#> 197: 94.8293 -0.2064 2.0452 1.6807 0.4904 0.1600 5.7639 -#> 198: 94.6372 -0.2157 2.0307 1.6350 0.5008 0.1524 5.6539 -#> 199: 94.5600 -0.2145 2.0318 1.5133 0.4982 0.1604 5.7178 -#> 200: 94.6945 -0.2100 2.0475 1.4526 0.5066 0.1649 5.6094 -#> 201: 94.5335 -0.2025 2.0594 1.3754 0.5066 0.1681 5.6560 -#> 202: 94.4663 -0.1992 2.0657 1.3622 0.5074 0.1665 5.6522 -#> 203: 94.4750 -0.1956 2.0762 1.3218 0.5051 0.1648 5.5985 -#> 204: 94.4206 -0.1916 2.0795 1.3219 0.5066 0.1593 5.5864 -#> 205: 94.4408 -0.1891 2.0816 1.2934 0.5089 0.1553 5.5967 -#> 206: 94.4631 -0.1863 2.0859 1.2768 0.5108 0.1522 5.6212 -#> 207: 94.4742 -0.1825 2.0912 1.3219 0.5122 0.1479 5.6704 -#> 208: 94.4802 -0.1789 2.0950 1.3488 0.5137 0.1450 5.7072 -#> 209: 94.4734 -0.1756 2.1019 1.3165 0.5155 0.1423 5.7458 -#> 210: 94.4589 -0.1742 2.1056 1.3379 0.5156 0.1409 5.7722 -#> 211: 94.4513 -0.1727 2.1083 1.3395 0.5192 0.1395 5.7707 -#> 212: 94.4422 -0.1718 2.1096 1.3506 0.5219 0.1384 5.7602 -#> 213: 94.4503 -0.1704 2.1112 1.3519 0.5233 0.1377 5.7705 -#> 214: 94.4387 -0.1688 2.1143 1.3620 0.5238 0.1374 5.7627 -#> 215: 94.4468 -0.1677 2.1171 1.3815 0.5236 0.1366 5.7552 -#> 216: 94.4314 -0.1671 2.1191 1.4034 0.5217 0.1362 5.7279 -#> 217: 94.4134 -0.1669 2.1206 1.4118 0.5197 0.1363 5.7109 -#> 218: 94.3896 -0.1665 2.1219 1.3959 0.5181 0.1381 5.6979 -#> 219: 94.3836 -0.1667 2.1226 1.3965 0.5160 0.1402 5.6829 -#> 220: 94.3740 -0.1674 2.1219 1.4130 0.5144 0.1419 5.6839 -#> 221: 94.3663 -0.1677 2.1216 1.4134 0.5131 0.1436 5.6717 -#> 222: 94.3498 -0.1683 2.1212 1.4170 0.5117 0.1453 5.6595 -#> 223: 94.3416 -0.1687 2.1219 1.4195 0.5105 0.1467 5.6587 -#> 224: 94.3412 -0.1687 2.1222 1.4245 0.5097 0.1474 5.6517 -#> 225: 94.3323 -0.1685 2.1235 1.4231 0.5093 0.1484 5.6419 -#> 226: 94.3228 -0.1686 2.1239 1.4167 0.5088 0.1493 5.6305 -#> 227: 94.3135 -0.1688 2.1241 1.4162 0.5084 0.1502 5.6197 -#> 228: 94.3088 -0.1686 2.1251 1.4170 0.5088 0.1515 5.6124 -#> 229: 94.2995 -0.1685 2.1257 1.4316 0.5092 0.1527 5.6079 -#> 230: 94.2864 -0.1690 2.1256 1.4492 0.5088 0.1534 5.6042 -#> 231: 94.2783 -0.1688 2.1260 1.4606 0.5085 0.1548 5.6037 -#> 232: 94.2725 -0.1687 2.1267 1.4571 0.5083 0.1557 5.6020 -#> 233: 94.2692 -0.1682 2.1279 1.4649 0.5076 0.1570 5.6027 -#> 234: 94.2697 -0.1678 2.1292 1.4540 0.5070 0.1584 5.5990 -#> 235: 94.2623 -0.1673 2.1302 1.4424 0.5064 0.1593 5.5919 -#> 236: 94.2610 -0.1667 2.1313 1.4255 0.5055 0.1599 5.5953 -#> 237: 94.2660 -0.1663 2.1322 1.4242 0.5053 0.1605 5.5922 -#> 238: 94.2753 -0.1666 2.1320 1.4370 0.5044 0.1611 5.5891 -#> 239: 94.2821 -0.1662 2.1326 1.4395 0.5036 0.1629 5.5864 -#> 240: 94.2886 -0.1661 2.1330 1.4375 0.5028 0.1644 5.5815 -#> 241: 94.2934 -0.1664 2.1329 1.4276 0.5020 0.1661 5.5777 -#> 242: 94.2963 -0.1664 2.1329 1.4247 0.5012 0.1677 5.5704 -#> 243: 94.2931 -0.1666 2.1328 1.4269 0.5008 0.1690 5.5631 -#> 244: 94.2919 -0.1667 2.1326 1.4279 0.5003 0.1701 5.5610 -#> 245: 94.2959 -0.1675 2.1316 1.4289 0.4993 0.1705 5.5524 -#> 246: 94.2992 -0.1683 2.1305 1.4378 0.4986 0.1706 5.5436 -#> 247: 94.2997 -0.1689 2.1296 1.4461 0.4977 0.1707 5.5383 -#> 248: 94.2978 -0.1693 2.1290 1.4430 0.4970 0.1714 5.5362 -#> 249: 94.2991 -0.1697 2.1285 1.4495 0.4963 0.1720 5.5379 -#> 250: 94.3068 -0.1702 2.1279 1.4556 0.4954 0.1723 5.5390 -#> 251: 94.3097 -0.1707 2.1272 1.4588 0.4936 0.1729 5.5342 -#> 252: 94.3104 -0.1711 2.1267 1.4582 0.4919 0.1739 5.5310 -#> 253: 94.3099 -0.1715 2.1262 1.4551 0.4903 0.1746 5.5279 -#> 254: 94.3110 -0.1721 2.1255 1.4592 0.4886 0.1758 5.5223 -#> 255: 94.3111 -0.1731 2.1236 1.4755 0.4878 0.1775 5.5175 -#> 256: 94.3096 -0.1735 2.1227 1.4971 0.4875 0.1784 5.5162 -#> 257: 94.3079 -0.1738 2.1222 1.5277 0.4874 0.1795 5.5132 -#> 258: 94.3103 -0.1741 2.1217 1.5521 0.4872 0.1806 5.5112 -#> 259: 94.3148 -0.1745 2.1212 1.5788 0.4868 0.1817 5.5066 -#> 260: 94.3170 -0.1750 2.1205 1.6038 0.4863 0.1832 5.5007 -#> 261: 94.3158 -0.1756 2.1197 1.6324 0.4857 0.1849 5.4968 -#> 262: 94.3141 -0.1763 2.1186 1.6503 0.4850 0.1866 5.4918 -#> 263: 94.3135 -0.1764 2.1184 1.6658 0.4849 0.1879 5.4910 -#> 264: 94.3121 -0.1767 2.1183 1.6841 0.4848 0.1893 5.4875 -#> 265: 94.3098 -0.1769 2.1184 1.7115 0.4847 0.1903 5.4832 -#> 266: 94.3087 -0.1768 2.1188 1.7162 0.4845 0.1911 5.4783 -#> 267: 94.3082 -0.1767 2.1191 1.7209 0.4842 0.1920 5.4735 -#> 268: 94.3094 -0.1764 2.1198 1.7314 0.4837 0.1926 5.4720 -#> 269: 94.3074 -0.1764 2.1199 1.7340 0.4831 0.1938 5.4718 -#> 270: 94.3025 -0.1764 2.1200 1.7440 0.4832 0.1949 5.4720 -#> 271: 94.3025 -0.1769 2.1194 1.7538 0.4829 0.1958 5.4748 -#> 272: 94.3039 -0.1772 2.1191 1.7664 0.4829 0.1966 5.4773 -#> 273: 94.3046 -0.1773 2.1192 1.7820 0.4826 0.1976 5.4754 -#> 274: 94.3051 -0.1774 2.1193 1.7895 0.4823 0.1988 5.4735 -#> 275: 94.3026 -0.1773 2.1193 1.7891 0.4819 0.1998 5.4749 -#> 276: 94.3034 -0.1771 2.1195 1.7875 0.4812 0.2010 5.4829 -#> 277: 94.3047 -0.1771 2.1197 1.7843 0.4805 0.2026 5.4878 -#> 278: 94.3067 -0.1771 2.1197 1.7747 0.4799 0.2039 5.4888 -#> 279: 94.3066 -0.1768 2.1202 1.7772 0.4795 0.2049 5.4889 -#> 280: 94.3035 -0.1768 2.1203 1.7797 0.4788 0.2062 5.4888 -#> 281: 94.2961 -0.1771 2.1203 1.7789 0.4782 0.2068 5.4874 -#> 282: 94.2893 -0.1772 2.1203 1.7797 0.4777 0.2072 5.4865 -#> 283: 94.2880 -0.1776 2.1198 1.7743 0.4772 0.2074 5.4856 -#> 284: 94.2897 -0.1779 2.1195 1.7717 0.4768 0.2076 5.4836 -#> 285: 94.2922 -0.1781 2.1194 1.7756 0.4765 0.2075 5.4818 -#> 286: 94.2964 -0.1783 2.1190 1.7759 0.4763 0.2074 5.4798 -#> 287: 94.2991 -0.1787 2.1181 1.7884 0.4761 0.2075 5.4769 -#> 288: 94.2980 -0.1793 2.1171 1.7901 0.4756 0.2077 5.4772 -#> 289: 94.2948 -0.1797 2.1166 1.7957 0.4752 0.2077 5.4763 -#> 290: 94.2922 -0.1801 2.1161 1.8012 0.4749 0.2074 5.4752 -#> 291: 94.2891 -0.1803 2.1157 1.8016 0.4747 0.2073 5.4743 -#> 292: 94.2890 -0.1805 2.1155 1.8012 0.4746 0.2072 5.4743 -#> 293: 94.2874 -0.1808 2.1152 1.8012 0.4743 0.2073 5.4743 -#> 294: 94.2841 -0.1811 2.1148 1.8003 0.4740 0.2075 5.4758 -#> 295: 94.2834 -0.1813 2.1143 1.7982 0.4743 0.2075 5.4766 -#> 296: 94.2817 -0.1816 2.1138 1.7997 0.4745 0.2074 5.4756 -#> 297: 94.2772 -0.1820 2.1131 1.8025 0.4747 0.2074 5.4778 -#> 298: 94.2759 -0.1822 2.1125 1.8097 0.4747 0.2073 5.4781 -#> 299: 94.2752 -0.1825 2.1120 1.8176 0.4748 0.2071 5.4784 -#> 300: 94.2758 -0.1828 2.1115 1.8353 0.4750 0.2069 5.4771 -#> 301: 94.2789 -0.1829 2.1113 1.8511 0.4749 0.2066 5.4767 -#> 302: 94.2808 -0.1833 2.1107 1.8541 0.4747 0.2065 5.4785 -#> 303: 94.2832 -0.1836 2.1103 1.8571 0.4745 0.2064 5.4789 -#> 304: 94.2838 -0.1840 2.1097 1.8584 0.4743 0.2064 5.4792 -#> 305: 94.2835 -0.1843 2.1090 1.8633 0.4741 0.2066 5.4790 -#> 306: 94.2868 -0.1847 2.1083 1.8633 0.4738 0.2069 5.4802 -#> 307: 94.2909 -0.1851 2.1076 1.8702 0.4737 0.2072 5.4787 -#> 308: 94.2916 -0.1857 2.1067 1.8754 0.4735 0.2075 5.4773 -#> 309: 94.2889 -0.1860 2.1062 1.8785 0.4732 0.2078 5.4774 -#> 310: 94.2875 -0.1863 2.1059 1.8854 0.4727 0.2082 5.4763 -#> 311: 94.2889 -0.1867 2.1053 1.8873 0.4722 0.2087 5.4746 -#> 312: 94.2889 -0.1870 2.1047 1.8956 0.4717 0.2090 5.4748 -#> 313: 94.2836 -0.1873 2.1044 1.8980 0.4711 0.2093 5.4721 -#> 314: 94.2801 -0.1876 2.1041 1.8924 0.4706 0.2096 5.4718 -#> 315: 94.2768 -0.1880 2.1038 1.8875 0.4701 0.2096 5.4727 -#> 316: 94.2766 -0.1883 2.1035 1.8854 0.4697 0.2097 5.4730 -#> 317: 94.2779 -0.1886 2.1030 1.8808 0.4693 0.2099 5.4725 -#> 318: 94.2806 -0.1889 2.1024 1.8789 0.4688 0.2101 5.4713 -#> 319: 94.2853 -0.1891 2.1018 1.8852 0.4684 0.2104 5.4690 -#> 320: 94.2867 -0.1894 2.1016 1.8898 0.4680 0.2106 5.4677 -#> 321: 94.2883 -0.1897 2.1013 1.8975 0.4676 0.2108 5.4656 -#> 322: 94.2864 -0.1899 2.1011 1.9078 0.4672 0.2109 5.4622 -#> 323: 94.2831 -0.1902 2.1009 1.9181 0.4668 0.2109 5.4593 -#> 324: 94.2799 -0.1904 2.1008 1.9355 0.4665 0.2109 5.4599 -#> 325: 94.2802 -0.1905 2.1007 1.9474 0.4660 0.2112 5.4608 -#> 326: 94.2808 -0.1907 2.1006 1.9656 0.4654 0.2114 5.4606 -#> 327: 94.2815 -0.1907 2.1006 1.9851 0.4649 0.2118 5.4596 -#> 328: 94.2805 -0.1908 2.1007 2.0051 0.4644 0.2120 5.4584 -#> 329: 94.2810 -0.1909 2.1004 2.0162 0.4638 0.2124 5.4566 -#> 330: 94.2812 -0.1912 2.0999 2.0210 0.4632 0.2131 5.4548 -#> 331: 94.2830 -0.1915 2.0994 2.0253 0.4625 0.2136 5.4520 -#> 332: 94.2835 -0.1920 2.0987 2.0288 0.4619 0.2142 5.4493 -#> 333: 94.2832 -0.1924 2.0981 2.0365 0.4615 0.2148 5.4463 -#> 334: 94.2845 -0.1928 2.0976 2.0433 0.4611 0.2153 5.4436 -#> 335: 94.2856 -0.1931 2.0971 2.0423 0.4607 0.2158 5.4405 -#> 336: 94.2886 -0.1936 2.0963 2.0400 0.4606 0.2165 5.4386 -#> 337: 94.2888 -0.1939 2.0957 2.0352 0.4604 0.2171 5.4376 -#> 338: 94.2879 -0.1944 2.0950 2.0360 0.4600 0.2179 5.4361 -#> 339: 94.2860 -0.1947 2.0946 2.0418 0.4599 0.2186 5.4342 -#> 340: 94.2842 -0.1951 2.0940 2.0455 0.4597 0.2192 5.4324 -#> 341: 94.2804 -0.1954 2.0934 2.0535 0.4596 0.2199 5.4310 -#> 342: 94.2772 -0.1958 2.0928 2.0586 0.4594 0.2204 5.4310 -#> 343: 94.2753 -0.1962 2.0921 2.0604 0.4592 0.2209 5.4304 -#> 344: 94.2749 -0.1965 2.0916 2.0591 0.4589 0.2214 5.4305 -#> 345: 94.2757 -0.1969 2.0911 2.0582 0.4586 0.2220 5.4302 -#> 346: 94.2774 -0.1972 2.0906 2.0554 0.4584 0.2225 5.4301 -#> 347: 94.2772 -0.1974 2.0901 2.0533 0.4583 0.2230 5.4298 -#> 348: 94.2769 -0.1977 2.0895 2.0497 0.4581 0.2235 5.4302 -#> 349: 94.2792 -0.1980 2.0890 2.0439 0.4579 0.2241 5.4327 -#> 350: 94.2825 -0.1983 2.0884 2.0391 0.4577 0.2245 5.4358 -#> 351: 94.2849 -0.1985 2.0879 2.0352 0.4576 0.2251 5.4399 -#> 352: 94.2871 -0.1988 2.0874 2.0396 0.4576 0.2257 5.4414 -#> 353: 94.2888 -0.1991 2.0869 2.0407 0.4573 0.2262 5.4417 -#> 354: 94.2914 -0.1994 2.0863 2.0383 0.4571 0.2268 5.4417 -#> 355: 94.2933 -0.1996 2.0859 2.0385 0.4570 0.2275 5.4418 -#> 356: 94.2932 -0.1999 2.0853 2.0377 0.4569 0.2284 5.4426 -#> 357: 94.2944 -0.2001 2.0850 2.0362 0.4566 0.2292 5.4423 -#> 358: 94.2948 -0.2003 2.0847 2.0415 0.4562 0.2299 5.4409 -#> 359: 94.2950 -0.2005 2.0843 2.0452 0.4558 0.2304 5.4393 -#> 360: 94.2967 -0.2008 2.0840 2.0514 0.4554 0.2307 5.4385 -#> 361: 94.2983 -0.2009 2.0839 2.0676 0.4551 0.2308 5.4386 -#> 362: 94.2992 -0.2009 2.0840 2.0770 0.4549 0.2307 5.4370 -#> 363: 94.2991 -0.2008 2.0841 2.0831 0.4550 0.2306 5.4348 -#> 364: 94.2982 -0.2007 2.0843 2.0892 0.4549 0.2304 5.4348 -#> 365: 94.2951 -0.2005 2.0847 2.1002 0.4551 0.2302 5.4347 -#> 366: 94.2938 -0.2004 2.0850 2.1176 0.4553 0.2300 5.4343 -#> 367: 94.2945 -0.2003 2.0850 2.1310 0.4553 0.2298 5.4346 -#> 368: 94.2956 -0.2003 2.0851 2.1436 0.4554 0.2295 5.4323 -#> 369: 94.2960 -0.2003 2.0850 2.1526 0.4555 0.2293 5.4309 -#> 370: 94.2964 -0.2003 2.0848 2.1577 0.4555 0.2292 5.4295 -#> 371: 94.2965 -0.2004 2.0847 2.1621 0.4555 0.2290 5.4278 -#> 372: 94.2972 -0.2004 2.0847 2.1635 0.4556 0.2285 5.4275 -#> 373: 94.2975 -0.2003 2.0848 2.1643 0.4556 0.2282 5.4275 -#> 374: 94.2985 -0.2004 2.0847 2.1648 0.4556 0.2277 5.4270 -#> 375: 94.3001 -0.2004 2.0846 2.1682 0.4555 0.2273 5.4255 -#> 376: 94.3024 -0.2005 2.0845 2.1692 0.4555 0.2268 5.4246 -#> 377: 94.3050 -0.2005 2.0843 2.1700 0.4555 0.2264 5.4239 -#> 378: 94.3041 -0.2005 2.0843 2.1680 0.4555 0.2258 5.4242 -#> 379: 94.3034 -0.2006 2.0842 2.1688 0.4554 0.2255 5.4233 -#> 380: 94.3027 -0.2007 2.0840 2.1754 0.4554 0.2250 5.4222 -#> 381: 94.3015 -0.2008 2.0839 2.1806 0.4553 0.2246 5.4205 -#> 382: 94.3006 -0.2009 2.0837 2.1812 0.4552 0.2242 5.4194 -#> 383: 94.3004 -0.2010 2.0835 2.1835 0.4551 0.2236 5.4178 -#> 384: 94.3001 -0.2011 2.0834 2.1895 0.4550 0.2232 5.4159 -#> 385: 94.3005 -0.2012 2.0834 2.1910 0.4547 0.2228 5.4148 -#> 386: 94.2993 -0.2013 2.0834 2.1926 0.4545 0.2224 5.4139 -#> 387: 94.2974 -0.2014 2.0834 2.1956 0.4543 0.2221 5.4135 -#> 388: 94.2964 -0.2014 2.0835 2.1979 0.4541 0.2218 5.4124 -#> 389: 94.2956 -0.2013 2.0837 2.1974 0.4540 0.2215 5.4117 -#> 390: 94.2962 -0.2013 2.0838 2.1995 0.4538 0.2213 5.4115 -#> 391: 94.2962 -0.2013 2.0838 2.1987 0.4537 0.2211 5.4116 -#> 392: 94.2956 -0.2013 2.0839 2.2007 0.4536 0.2209 5.4111 -#> 393: 94.2954 -0.2012 2.0839 2.2041 0.4535 0.2207 5.4106 -#> 394: 94.2953 -0.2012 2.0840 2.2033 0.4535 0.2205 5.4103 -#> 395: 94.2964 -0.2012 2.0841 2.2052 0.4533 0.2203 5.4098 -#> 396: 94.2950 -0.2012 2.0841 2.2123 0.4532 0.2202 5.4081 -#> 397: 94.2940 -0.2011 2.0843 2.2227 0.4533 0.2201 5.4070 -#> 398: 94.2938 -0.2011 2.0842 2.2283 0.4534 0.2201 5.4065 -#> 399: 94.2930 -0.2012 2.0842 2.2296 0.4535 0.2201 5.4066 -#> 400: 94.2931 -0.2011 2.0844 2.2345 0.4537 0.2199 5.4071 -#> 401: 94.2926 -0.2009 2.0846 2.2414 0.4539 0.2198 5.4067 -#> 402: 94.2916 -0.2008 2.0848 2.2478 0.4541 0.2196 5.4070 -#> 403: 94.2902 -0.2007 2.0849 2.2543 0.4544 0.2194 5.4071 -#> 404: 94.2895 -0.2007 2.0851 2.2578 0.4546 0.2192 5.4079 -#> 405: 94.2896 -0.2006 2.0853 2.2600 0.4548 0.2190 5.4082 -#> 406: 94.2897 -0.2004 2.0855 2.2636 0.4550 0.2188 5.4086 -#> 407: 94.2880 -0.2002 2.0859 2.2670 0.4554 0.2188 5.4079 -#> 408: 94.2883 -0.1999 2.0861 2.2735 0.4556 0.2189 5.4076 -#> 409: 94.2874 -0.1997 2.0865 2.2822 0.4559 0.2190 5.4073 -#> 410: 94.2861 -0.1995 2.0867 2.2861 0.4563 0.2190 5.4062 -#> 411: 94.2861 -0.1993 2.0869 2.2883 0.4566 0.2190 5.4049 -#> 412: 94.2869 -0.1991 2.0872 2.2926 0.4570 0.2190 5.4039 -#> 413: 94.2874 -0.1990 2.0873 2.2936 0.4574 0.2190 5.4031 -#> 414: 94.2881 -0.1988 2.0874 2.2972 0.4577 0.2189 5.4019 -#> 415: 94.2895 -0.1987 2.0876 2.2999 0.4580 0.2188 5.4004 -#> 416: 94.2900 -0.1985 2.0878 2.3003 0.4582 0.2186 5.3997 -#> 417: 94.2917 -0.1984 2.0880 2.2986 0.4583 0.2185 5.3993 -#> 418: 94.2937 -0.1982 2.0882 2.2986 0.4584 0.2183 5.3995 -#> 419: 94.2947 -0.1981 2.0885 2.2993 0.4584 0.2182 5.3995 -#> 420: 94.2954 -0.1979 2.0886 2.2993 0.4585 0.2180 5.3996 -#> 421: 94.2963 -0.1978 2.0888 2.3029 0.4587 0.2180 5.3992 -#> 422: 94.2982 -0.1976 2.0890 2.3074 0.4588 0.2178 5.4000 -#> 423: 94.3001 -0.1975 2.0891 2.3099 0.4589 0.2178 5.3999 -#> 424: 94.3007 -0.1974 2.0891 2.3106 0.4589 0.2177 5.4001 -#> 425: 94.3016 -0.1973 2.0893 2.3107 0.4589 0.2176 5.3997 -#> 426: 94.3021 -0.1972 2.0894 2.3119 0.4590 0.2175 5.3990 -#> 427: 94.3009 -0.1972 2.0894 2.3100 0.4590 0.2175 5.3971 -#> 428: 94.2998 -0.1972 2.0895 2.3070 0.4590 0.2175 5.3966 -#> 429: 94.2988 -0.1973 2.0895 2.3033 0.4590 0.2175 5.3958 -#> 430: 94.2968 -0.1973 2.0895 2.3028 0.4590 0.2174 5.3955 -#> 431: 94.2950 -0.1973 2.0895 2.3004 0.4589 0.2174 5.3954 -#> 432: 94.2944 -0.1973 2.0896 2.2966 0.4589 0.2174 5.3956 -#> 433: 94.2950 -0.1972 2.0897 2.2942 0.4589 0.2176 5.3959 -#> 434: 94.2949 -0.1972 2.0898 2.2911 0.4589 0.2177 5.3955 -#> 435: 94.2943 -0.1971 2.0900 2.2914 0.4588 0.2179 5.3943 -#> 436: 94.2943 -0.1970 2.0902 2.2895 0.4586 0.2180 5.3948 -#> 437: 94.2955 -0.1970 2.0903 2.2890 0.4585 0.2181 5.3954 -#> 438: 94.2961 -0.1969 2.0905 2.2918 0.4584 0.2183 5.3958 -#> 439: 94.2954 -0.1968 2.0906 2.2943 0.4583 0.2185 5.3953 -#> 440: 94.2944 -0.1968 2.0906 2.2977 0.4581 0.2187 5.3949 -#> 441: 94.2931 -0.1968 2.0907 2.2991 0.4578 0.2188 5.3952 -#> 442: 94.2926 -0.1968 2.0908 2.2990 0.4575 0.2188 5.3951 -#> 443: 94.2922 -0.1968 2.0909 2.2990 0.4573 0.2188 5.3938 -#> 444: 94.2917 -0.1969 2.0909 2.2995 0.4571 0.2188 5.3927 -#> 445: 94.2901 -0.1969 2.0910 2.3067 0.4568 0.2187 5.3911 -#> 446: 94.2898 -0.1969 2.0910 2.3082 0.4566 0.2187 5.3891 -#> 447: 94.2897 -0.1969 2.0910 2.3121 0.4564 0.2187 5.3871 -#> 448: 94.2883 -0.1970 2.0911 2.3180 0.4562 0.2188 5.3858 -#> 449: 94.2879 -0.1970 2.0912 2.3210 0.4561 0.2188 5.3851 -#> 450: 94.2874 -0.1970 2.0914 2.3243 0.4559 0.2188 5.3841 -#> 451: 94.2873 -0.1969 2.0915 2.3247 0.4557 0.2188 5.3834 -#> 452: 94.2873 -0.1969 2.0917 2.3249 0.4555 0.2187 5.3839 -#> 453: 94.2868 -0.1968 2.0920 2.3257 0.4554 0.2187 5.3831 -#> 454: 94.2857 -0.1967 2.0922 2.3240 0.4552 0.2187 5.3824 -#> 455: 94.2848 -0.1965 2.0925 2.3214 0.4551 0.2186 5.3822 -#> 456: 94.2838 -0.1964 2.0929 2.3204 0.4550 0.2185 5.3822 -#> 457: 94.2831 -0.1962 2.0932 2.3202 0.4549 0.2184 5.3819 -#> 458: 94.2831 -0.1961 2.0935 2.3174 0.4548 0.2183 5.3810 -#> 459: 94.2829 -0.1960 2.0938 2.3183 0.4546 0.2183 5.3807 -#> 460: 94.2818 -0.1958 2.0941 2.3213 0.4545 0.2183 5.3802 -#> 461: 94.2812 -0.1956 2.0945 2.3292 0.4544 0.2182 5.3785 -#> 462: 94.2813 -0.1955 2.0948 2.3328 0.4544 0.2182 5.3778 -#> 463: 94.2816 -0.1953 2.0951 2.3364 0.4543 0.2181 5.3770 -#> 464: 94.2810 -0.1952 2.0954 2.3365 0.4542 0.2180 5.3764 -#> 465: 94.2797 -0.1950 2.0957 2.3341 0.4541 0.2179 5.3756 -#> 466: 94.2777 -0.1949 2.0960 2.3368 0.4541 0.2178 5.3750 -#> 467: 94.2755 -0.1949 2.0962 2.3417 0.4539 0.2178 5.3738 -#> 468: 94.2741 -0.1948 2.0965 2.3426 0.4537 0.2177 5.3731 -#> 469: 94.2735 -0.1947 2.0967 2.3410 0.4535 0.2175 5.3729 -#> 470: 94.2731 -0.1946 2.0970 2.3440 0.4534 0.2173 5.3733 -#> 471: 94.2727 -0.1945 2.0972 2.3505 0.4533 0.2171 5.3724 -#> 472: 94.2734 -0.1944 2.0973 2.3550 0.4533 0.2169 5.3719 -#> 473: 94.2745 -0.1944 2.0974 2.3593 0.4533 0.2167 5.3715 -#> 474: 94.2746 -0.1944 2.0975 2.3622 0.4533 0.2166 5.3708 -#> 475: 94.2753 -0.1943 2.0975 2.3673 0.4533 0.2165 5.3701 -#> 476: 94.2760 -0.1943 2.0976 2.3745 0.4534 0.2166 5.3698 -#> 477: 94.2771 -0.1942 2.0978 2.3812 0.4535 0.2166 5.3695 -#> 478: 94.2767 -0.1941 2.0981 2.3891 0.4535 0.2166 5.3691 -#> 479: 94.2762 -0.1940 2.0984 2.3931 0.4534 0.2166 5.3691 -#> 480: 94.2754 -0.1939 2.0986 2.3958 0.4533 0.2166 5.3685 -#> 481: 94.2743 -0.1938 2.0987 2.3990 0.4532 0.2165 5.3677 -#> 482: 94.2733 -0.1937 2.0988 2.3996 0.4531 0.2164 5.3670 -#> 483: 94.2724 -0.1937 2.0989 2.4031 0.4531 0.2163 5.3659 -#> 484: 94.2726 -0.1937 2.0989 2.4035 0.4530 0.2162 5.3651 -#> 485: 94.2722 -0.1937 2.0989 2.4033 0.4530 0.2162 5.3649 -#> 486: 94.2716 -0.1936 2.0991 2.4046 0.4529 0.2163 5.3645 -#> 487: 94.2710 -0.1936 2.0992 2.4078 0.4527 0.2165 5.3643 -#> 488: 94.2693 -0.1936 2.0992 2.4088 0.4525 0.2167 5.3653 -#> 489: 94.2689 -0.1936 2.0993 2.4116 0.4523 0.2170 5.3645 -#> 490: 94.2686 -0.1936 2.0993 2.4105 0.4520 0.2172 5.3644 -#> 491: 94.2685 -0.1935 2.0994 2.4097 0.4518 0.2174 5.3651 -#> 492: 94.2677 -0.1935 2.0995 2.4103 0.4517 0.2175 5.3657 -#> 493: 94.2670 -0.1935 2.0996 2.4112 0.4515 0.2177 5.3661 -#> 494: 94.2668 -0.1935 2.0996 2.4140 0.4514 0.2178 5.3662 -#> 495: 94.2667 -0.1936 2.0996 2.4157 0.4513 0.2179 5.3660 -#> 496: 94.2670 -0.1936 2.0996 2.4163 0.4511 0.2180 5.3668 -#> 497: 94.2664 -0.1936 2.0996 2.4170 0.4510 0.2181 5.3676 -#> 498: 94.2654 -0.1937 2.0996 2.4128 0.4509 0.2181 5.3683 -#> 499: 94.2643 -0.1937 2.0996 2.4109 0.4508 0.2181 5.3679 -#> 500: 94.2635 -0.1938 2.0995 2.4122 0.4508 0.2181 5.3682
#> Calculating covariance matrix
#>
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → compiling EBE model...
#>
#> done
#> Calculating residuals/tables
#> done
f_nlmixr_fomc_focei <- nlmixr(f_mmkin_parent["FOMC", ], est = "focei") -
#> parameter labels from comments are typically ignored in non-interactive mode
#> Need to run with the source intact to parse comments
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → calculate jacobian
#>
#> → calculate sensitivities
#>
#> → calculate ∂(f)/∂(η)
#>
#> → calculate ∂(R²)/∂(η)
#>
#> → finding duplicate expressions in inner model...
#>
#> → optimizing duplicate expressions in inner model...
#>
#> → finding duplicate expressions in EBE model...
#>
#> → optimizing duplicate expressions in EBE model...
#>
#> → compiling inner model...
#>
#> done
#> → finding duplicate expressions in FD model...
#>
#> → optimizing duplicate expressions in FD model...
#>
#> → compiling EBE model...
#>
#> done
#> → compiling events FD model...
#>
#> done
#> Key: U: Unscaled Parameters; X: Back-transformed parameters; G: Gill difference gradient approximation -#> F: Forward difference gradient approximation -#> C: Central difference gradient approximation -#> M: Mixed forward and central difference gradient approximation -#> Unscaled parameters for Omegas=chol(solve(omega)); -#> Diagonals are transformed, as specified by foceiControl(diagXform=) -#> |-----+---------------+-----------+-----------+-----------+-----------| -#> | #| Objective Fun | parent_0 | log_alpha | log_beta | sigma | -#> |.....................| o1 | o2 | o3 |...........| -#> | 1| 296.31831 | 1.000 | -1.000 | -0.9520 | -0.9547 | -#> |.....................| -0.9791 | -0.9725 | -0.9706 |...........| -#> | U| 296.31831 | 94.44 | -0.2226 | 2.048 | 1.920 | -#> |.....................| 0.7656 | 1.078 | 1.168 |...........| -#> | X| 296.31831 | 94.44 | 0.8004 | 7.754 | 1.920 | -#> |.....................| 0.7656 | 1.078 | 1.168 |...........| -#> | G| Gill Diff. | 9.126 | 0.009097 | -0.01177 | -32.33 | -#> |.....................| 6.099 | -8.436 | -11.35 |...........| -#> | 2| 594.25462 | 0.7531 | -1.000 | -0.9517 | -0.07988 | -#> |.....................| -1.144 | -0.7442 | -0.6636 |...........| -#> | U| 594.25462 | 71.12 | -0.2229 | 2.049 | 2.760 | -#> |.....................| 0.6392 | 1.324 | 1.526 |...........| -#> | X| 594.25462 | 71.12 | 0.8002 | 7.756 | 2.760 | -#> |.....................| 0.6392 | 1.324 | 1.526 |...........| -#> | 3| 298.71818 | 0.9753 | -1.000 | -0.9520 | -0.8672 | -#> |.....................| -0.9956 | -0.9497 | -0.9399 |...........| -#> | U| 298.71818 | 92.11 | -0.2226 | 2.048 | 2.004 | -#> |.....................| 0.7529 | 1.103 | 1.204 |...........| -#> | X| 298.71818 | 92.11 | 0.8004 | 7.754 | 2.004 | -#> |.....................| 0.7529 | 1.103 | 1.204 |...........| -#> | 4| 295.79061 | 0.9925 | -1.000 | -0.9520 | -0.9282 | -#> |.....................| -0.9841 | -0.9656 | -0.9613 |...........| -#> | U| 295.79061 | 93.73 | -0.2226 | 2.048 | 1.945 | -#> |.....................| 0.7617 | 1.086 | 1.179 |...........| -#> | X| 295.79061 | 93.73 | 0.8004 | 7.754 | 1.945 | -#> |.....................| 0.7617 | 1.086 | 1.179 |...........| -#> | F| Forward Diff. | -134.6 | -0.07715 | -0.3541 | -29.37 | -#> |.....................| 6.863 | -7.752 | -10.79 |...........| -#> | 5| 294.44078 | 1.001 | -1.000 | -0.9520 | -0.9020 | -#> |.....................| -0.9892 | -0.9588 | -0.9521 |...........| -#> | U| 294.44078 | 94.55 | -0.2226 | 2.048 | 1.970 | -#> |.....................| 0.7578 | 1.093 | 1.189 |...........| -#> | X| 294.44078 | 94.55 | 0.8004 | 7.754 | 1.970 | -#> |.....................| 0.7578 | 1.093 | 1.189 |...........| -#> | F| Forward Diff. | 30.39 | 0.01643 | 0.02646 | -26.06 | -#> |.....................| 5.336 | -7.397 | -10.44 |...........| -#> | 6| 293.62741 | 0.9971 | -1.000 | -0.9519 | -0.8750 | -#> |.....................| -0.9945 | -0.9516 | -0.9423 |...........| -#> | U| 293.62741 | 94.17 | -0.2226 | 2.048 | 1.996 | -#> |.....................| 0.7538 | 1.101 | 1.201 |...........| -#> | X| 293.62741 | 94.17 | 0.8004 | 7.754 | 1.996 | -#> |.....................| 0.7538 | 1.101 | 1.201 |...........| -#> | 7| 292.50099 | 0.9961 | -1.000 | -0.9519 | -0.8316 | -#> |.....................| -1.003 | -0.9401 | -0.9267 |...........| -#> | U| 292.50099 | 94.07 | -0.2226 | 2.048 | 2.038 | -#> |.....................| 0.7474 | 1.113 | 1.219 |...........| -#> | X| 292.50099 | 94.07 | 0.8004 | 7.755 | 2.038 | -#> |.....................| 0.7474 | 1.113 | 1.219 |...........| -#> | 8| 290.76125 | 0.9939 | -1.000 | -0.9518 | -0.7361 | -#> |.....................| -1.021 | -0.9149 | -0.8925 |...........| -#> | U| 290.76125 | 93.87 | -0.2226 | 2.048 | 2.130 | -#> |.....................| 0.7332 | 1.140 | 1.259 |...........| -#> | X| 290.76125 | 93.87 | 0.8004 | 7.756 | 2.130 | -#> |.....................| 0.7332 | 1.140 | 1.259 |...........| -#> | F| Forward Diff. | -91.20 | -0.08176 | -0.4010 | -10.74 | -#> |.....................| 3.658 | -4.872 | -7.770 |...........| -#> | 9| 293.40175 | 1.024 | -0.9990 | -0.9455 | -0.7012 | -#> |.....................| -1.060 | -0.8302 | -0.7398 |...........| -#> | U| 293.40175 | 96.67 | -0.2216 | 2.055 | 2.163 | -#> |.....................| 0.7035 | 1.231 | 1.437 |...........| -#> | X| 293.40175 | 96.67 | 0.8012 | 7.804 | 2.163 | -#> |.....................| 0.7035 | 1.231 | 1.437 |...........| -#> | 10| 292.85583 | 1.019 | -0.9997 | -0.9499 | -0.7242 | -#> |.....................| -1.033 | -0.8898 | -0.8474 |...........| -#> | U| 292.85583 | 96.21 | -0.2223 | 2.050 | 2.141 | -#> |.....................| 0.7242 | 1.167 | 1.312 |...........| -#> | X| 292.85583 | 96.21 | 0.8007 | 7.770 | 2.141 | -#> |.....................| 0.7242 | 1.167 | 1.312 |...........| -#> | 11| 291.55187 | 1.011 | -1.000 | -0.9517 | -0.7341 | -#> |.....................| -1.022 | -0.9140 | -0.8910 |...........| -#> | U| 291.55187 | 95.48 | -0.2226 | 2.048 | 2.132 | -#> |.....................| 0.7326 | 1.141 | 1.261 |...........| -#> | X| 291.55187 | 95.48 | 0.8004 | 7.756 | 2.132 | -#> |.....................| 0.7326 | 1.141 | 1.261 |...........| -#> | 12| 290.49268 | 0.9997 | -1.000 | -0.9518 | -0.7354 | -#> |.....................| -1.022 | -0.9146 | -0.8920 |...........| -#> | U| 290.49268 | 94.41 | -0.2226 | 2.048 | 2.130 | -#> |.....................| 0.7330 | 1.141 | 1.259 |...........| -#> | X| 290.49268 | 94.41 | 0.8004 | 7.756 | 2.130 | -#> |.....................| 0.7330 | 1.141 | 1.259 |...........| -#> | F| Forward Diff. | 2.619 | -0.007793 | -0.07320 | -10.57 | -#> |.....................| 3.077 | -4.876 | -7.795 |...........| -#> | 13| 290.41825 | 0.9986 | -1.000 | -0.9517 | -0.7312 | -#> |.....................| -1.023 | -0.9126 | -0.8889 |...........| -#> | U| 290.41825 | 94.31 | -0.2226 | 2.048 | 2.134 | -#> |.....................| 0.7321 | 1.143 | 1.263 |...........| -#> | X| 290.41825 | 94.31 | 0.8004 | 7.756 | 2.134 | -#> |.....................| 0.7321 | 1.143 | 1.263 |...........| -#> | 14| 290.31205 | 0.9955 | -1.000 | -0.9517 | -0.7186 | -#> |.....................| -1.027 | -0.9068 | -0.8796 |...........| -#> | U| 290.31205 | 94.01 | -0.2226 | 2.049 | 2.146 | -#> |.....................| 0.7292 | 1.149 | 1.274 |...........| -#> | X| 290.31205 | 94.01 | 0.8004 | 7.757 | 2.146 | -#> |.....................| 0.7292 | 1.149 | 1.274 |...........| -#> | F| Forward Diff. | -64.45 | -0.06351 | -0.3251 | -9.485 | -#> |.....................| 2.861 | -4.414 | -7.225 |...........| -#> | 15| 290.00198 | 1.000 | -0.9999 | -0.9510 | -0.7191 | -#> |.....................| -1.030 | -0.8965 | -0.8595 |...........| -#> | U| 290.00198 | 94.46 | -0.2225 | 2.049 | 2.146 | -#> |.....................| 0.7268 | 1.160 | 1.297 |...........| -#> | X| 290.00198 | 94.46 | 0.8005 | 7.762 | 2.146 | -#> |.....................| 0.7268 | 1.160 | 1.297 |...........| -#> | F| Forward Diff. | 11.27 | -0.003123 | -0.03408 | -9.156 | -#> |.....................| 2.235 | -3.823 | -6.423 |...........| -#> | 16| 289.83558 | 0.9983 | -0.9998 | -0.9502 | -0.7180 | -#> |.....................| -1.031 | -0.8872 | -0.8384 |...........| -#> | U| 289.83558 | 94.28 | -0.2224 | 2.050 | 2.147 | -#> |.....................| 0.7259 | 1.170 | 1.322 |...........| -#> | X| 289.83558 | 94.28 | 0.8006 | 7.768 | 2.147 | -#> |.....................| 0.7259 | 1.170 | 1.322 |...........| -#> | 17| 289.63307 | 0.9979 | -0.9995 | -0.9489 | -0.7184 | -#> |.....................| -1.032 | -0.8720 | -0.8037 |...........| -#> | U| 289.63307 | 94.24 | -0.2221 | 2.051 | 2.147 | -#> |.....................| 0.7248 | 1.186 | 1.363 |...........| -#> | X| 289.63307 | 94.24 | 0.8008 | 7.778 | 2.147 | -#> |.....................| 0.7248 | 1.186 | 1.363 |...........| -#> | 18| 289.44450 | 0.9972 | -0.9991 | -0.9468 | -0.7190 | -#> |.....................| -1.035 | -0.8473 | -0.7469 |...........| -#> | U| 289.4445 | 94.18 | -0.2217 | 2.053 | 2.146 | -#> |.....................| 0.7231 | 1.213 | 1.429 |...........| -#> | X| 289.4445 | 94.18 | 0.8011 | 7.794 | 2.146 | -#> |.....................| 0.7231 | 1.213 | 1.429 |...........| -#> | F| Forward Diff. | -36.76 | -0.05208 | -0.1861 | -9.057 | -#> |.....................| 2.429 | -0.6853 | -1.924 |...........| -#> | 19| 288.93351 | 0.9984 | -0.9961 | -0.9370 | -0.6306 | -#> |.....................| -1.080 | -0.9120 | -0.7149 |...........| -#> | U| 288.93351 | 94.29 | -0.2187 | 2.063 | 2.231 | -#> |.....................| 0.6885 | 1.143 | 1.466 |...........| -#> | X| 288.93351 | 94.29 | 0.8035 | 7.871 | 2.231 | -#> |.....................| 0.6885 | 1.143 | 1.466 |...........| -#> | F| Forward Diff. | -14.48 | -0.02726 | 0.2181 | -3.062 | -#> |.....................| -0.1976 | -4.306 | -0.8806 |...........| -#> | 20| 288.85238 | 1.002 | -0.9934 | -0.9444 | -0.5654 | -#> |.....................| -1.062 | -0.8288 | -0.7747 |...........| -#> | U| 288.85238 | 94.67 | -0.2160 | 2.056 | 2.293 | -#> |.....................| 0.7024 | 1.233 | 1.396 |...........| -#> | X| 288.85238 | 94.67 | 0.8057 | 7.813 | 2.293 | -#> |.....................| 0.7024 | 1.233 | 1.396 |...........| -#> | F| Forward Diff. | 40.49 | 0.1537 | 0.2940 | 0.6524 | -#> |.....................| 0.4942 | 0.3489 | -3.099 |...........| -#> | 21| 289.09335 | 0.9960 | -1.025 | -1.050 | -0.5645 | -#> |.....................| -1.111 | -0.8117 | -0.7552 |...........| -#> | U| 289.09335 | 94.07 | -0.2476 | 1.951 | 2.294 | -#> |.....................| 0.6648 | 1.251 | 1.419 |...........| -#> | X| 289.09335 | 94.07 | 0.7806 | 7.034 | 2.294 | -#> |.....................| 0.6648 | 1.251 | 1.419 |...........| -#> | 22| 288.97418 | 0.9945 | -1.003 | -0.9755 | -0.5652 | -#> |.....................| -1.076 | -0.8238 | -0.7685 |...........| -#> | U| 288.97418 | 93.92 | -0.2254 | 2.025 | 2.294 | -#> |.....................| 0.6912 | 1.238 | 1.404 |...........| -#> | X| 288.97418 | 93.92 | 0.7982 | 7.574 | 2.294 | -#> |.....................| 0.6912 | 1.238 | 1.404 |...........| -#> | 23| 288.99640 | 0.9941 | -0.9963 | -0.9538 | -0.5655 | -#> |.....................| -1.066 | -0.8273 | -0.7723 |...........| -#> | U| 288.9964 | 93.88 | -0.2189 | 2.046 | 2.293 | -#> |.....................| 0.6990 | 1.235 | 1.399 |...........| -#> | X| 288.9964 | 93.88 | 0.8034 | 7.740 | 2.293 | -#> |.....................| 0.6990 | 1.235 | 1.399 |...........| -#> | 24| 288.82158 | 0.9975 | -0.9934 | -0.9445 | -0.5655 | -#> |.....................| -1.062 | -0.8288 | -0.7743 |...........| -#> | U| 288.82158 | 94.20 | -0.2160 | 2.056 | 2.293 | -#> |.....................| 0.7023 | 1.233 | 1.397 |...........| -#> | X| 288.82158 | 94.20 | 0.8057 | 7.813 | 2.293 | -#> |.....................| 0.7023 | 1.233 | 1.397 |...........| -#> | F| Forward Diff. | -27.98 | 0.07663 | -0.09902 | 0.6250 | -#> |.....................| 0.3387 | 0.3777 | -3.049 |...........| -#> | 25| 288.78525 | 0.9995 | -0.9943 | -0.9465 | -0.5657 | -#> |.....................| -1.059 | -0.8303 | -0.7716 |...........| -#> | U| 288.78525 | 94.39 | -0.2169 | 2.054 | 2.293 | -#> |.....................| 0.7042 | 1.231 | 1.400 |...........| -#> | X| 288.78525 | 94.39 | 0.8050 | 7.797 | 2.293 | -#> |.....................| 0.7042 | 1.231 | 1.400 |...........| -#> | F| Forward Diff. | -0.7037 | 0.08814 | -0.009566 | 0.5597 | -#> |.....................| 0.2999 | 0.2778 | -2.968 |...........| -#> | 26| 288.77680 | 1.000 | -0.9946 | -0.9467 | -0.5664 | -#> |.....................| -1.059 | -0.8311 | -0.7670 |...........| -#> | U| 288.7768 | 94.48 | -0.2172 | 2.053 | 2.292 | -#> |.....................| 0.7047 | 1.231 | 1.405 |...........| -#> | X| 288.7768 | 94.48 | 0.8048 | 7.795 | 2.292 | -#> |.....................| 0.7047 | 1.231 | 1.405 |...........| -#> | F| Forward Diff. | 12.46 | 0.09472 | 0.05753 | 0.4960 | -#> |.....................| 0.3156 | 0.2411 | -2.796 |...........| -#> | 27| 288.76499 | 0.9995 | -0.9954 | -0.9482 | -0.5665 | -#> |.....................| -1.055 | -0.8326 | -0.7642 |...........| -#> | U| 288.76499 | 94.39 | -0.2180 | 2.052 | 2.292 | -#> |.....................| 0.7071 | 1.229 | 1.409 |...........| -#> | X| 288.76499 | 94.39 | 0.8042 | 7.783 | 2.292 | -#> |.....................| 0.7071 | 1.229 | 1.409 |...........| -#> | F| Forward Diff. | -0.8358 | 0.06465 | -0.06858 | 0.5747 | -#> |.....................| 0.6430 | 0.1630 | -2.683 |...........| -#> | 28| 288.75697 | 1.000 | -0.9957 | -0.9484 | -0.5681 | -#> |.....................| -1.059 | -0.8325 | -0.7609 |...........| -#> | U| 288.75697 | 94.45 | -0.2183 | 2.052 | 2.291 | -#> |.....................| 0.7046 | 1.229 | 1.413 |...........| -#> | X| 288.75697 | 94.45 | 0.8039 | 7.782 | 2.291 | -#> |.....................| 0.7046 | 1.229 | 1.413 |...........| -#> | F| Forward Diff. | 8.673 | 0.06496 | -0.02049 | 0.4885 | -#> |.....................| 0.5066 | 0.1747 | -2.560 |...........| -#> | 29| 288.75050 | 0.9994 | -0.9958 | -0.9480 | -0.5696 | -#> |.....................| -1.063 | -0.8317 | -0.7600 |...........| -#> | U| 288.7505 | 94.38 | -0.2184 | 2.052 | 2.289 | -#> |.....................| 0.7012 | 1.230 | 1.414 |...........| -#> | X| 288.7505 | 94.38 | 0.8038 | 7.785 | 2.289 | -#> |.....................| 0.7012 | 1.230 | 1.414 |...........| -#> | F| Forward Diff. | -2.463 | 0.04955 | -0.07455 | 0.3979 | -#> |.....................| 0.1788 | 0.2263 | -2.511 |...........| -#> | 30| 288.74110 | 0.9997 | -0.9954 | -0.9459 | -0.5705 | -#> |.....................| -1.061 | -0.8331 | -0.7562 |...........| -#> | U| 288.7411 | 94.41 | -0.2180 | 2.054 | 2.289 | -#> |.....................| 0.7025 | 1.228 | 1.418 |...........| -#> | X| 288.7411 | 94.41 | 0.8041 | 7.801 | 2.289 | -#> |.....................| 0.7025 | 1.228 | 1.418 |...........| -#> | 31| 288.72064 | 0.9993 | -0.9939 | -0.9392 | -0.5730 | -#> |.....................| -1.056 | -0.8374 | -0.7455 |...........| -#> | U| 288.72064 | 94.37 | -0.2166 | 2.061 | 2.286 | -#> |.....................| 0.7068 | 1.224 | 1.431 |...........| -#> | X| 288.72064 | 94.37 | 0.8053 | 7.854 | 2.286 | -#> |.....................| 0.7068 | 1.224 | 1.431 |...........| -#> | 32| 288.70690 | 0.9989 | -0.9915 | -0.9277 | -0.5774 | -#> |.....................| -1.046 | -0.8449 | -0.7267 |...........| -#> | U| 288.7069 | 94.33 | -0.2141 | 2.072 | 2.282 | -#> |.....................| 0.7141 | 1.216 | 1.453 |...........| -#> | X| 288.7069 | 94.33 | 0.8073 | 7.944 | 2.282 | -#> |.....................| 0.7141 | 1.216 | 1.453 |...........| -#> | F| Forward Diff. | -8.246 | 0.08782 | 0.6230 | -0.2261 | -#> |.....................| 0.9054 | -0.5290 | -1.268 |...........| -#> | 33| 288.68146 | 1.000 | -0.9932 | -0.9567 | -0.5899 | -#> |.....................| -1.067 | -0.8479 | -0.7019 |...........| -#> | U| 288.68146 | 94.46 | -0.2158 | 2.043 | 2.270 | -#> |.....................| 0.6982 | 1.212 | 1.481 |...........| -#> | X| 288.68146 | 94.46 | 0.8059 | 7.717 | 2.270 | -#> |.....................| 0.6982 | 1.212 | 1.481 |...........| -#> | F| Forward Diff. | 8.603 | 0.1068 | -0.4021 | -0.6499 | -#> |.....................| 0.1745 | -0.5873 | -0.4459 |...........| -#> | 34| 288.70236 | 1.001 | -1.018 | -0.9264 | -0.5930 | -#> |.....................| -1.088 | -0.8392 | -0.6985 |...........| -#> | U| 288.70236 | 94.50 | -0.2403 | 2.074 | 2.267 | -#> |.....................| 0.6822 | 1.222 | 1.485 |...........| -#> | X| 288.70236 | 94.50 | 0.7864 | 7.955 | 2.267 | -#> |.....................| 0.6822 | 1.222 | 1.485 |...........| -#> | 35| 288.67546 | 0.9997 | -0.9992 | -0.9493 | -0.5906 | -#> |.....................| -1.072 | -0.8457 | -0.7010 |...........| -#> | U| 288.67546 | 94.41 | -0.2218 | 2.051 | 2.269 | -#> |.....................| 0.6943 | 1.215 | 1.482 |...........| -#> | X| 288.67546 | 94.41 | 0.8011 | 7.775 | 2.269 | -#> |.....................| 0.6943 | 1.215 | 1.482 |...........| -#> | F| Forward Diff. | 1.309 | -0.03968 | -0.1448 | -0.6596 | -#> |.....................| 0.05856 | -0.4617 | -0.3123 |...........| -#> | 36| 288.67323 | 0.9995 | -0.9891 | -0.9462 | -0.5890 | -#> |.....................| -1.074 | -0.8436 | -0.6999 |...........| -#> | U| 288.67323 | 94.40 | -0.2117 | 2.054 | 2.271 | -#> |.....................| 0.6929 | 1.217 | 1.484 |...........| -#> | X| 288.67323 | 94.40 | 0.8092 | 7.800 | 2.271 | -#> |.....................| 0.6929 | 1.217 | 1.484 |...........| -#> | F| Forward Diff. | -0.3529 | 0.1695 | -0.04594 | -0.6688 | -#> |.....................| -0.2932 | -0.3576 | -0.2566 |...........| -#> | 37| 288.67323 | 0.9995 | -0.9891 | -0.9462 | -0.5890 | -#> |.....................| -1.074 | -0.8436 | -0.6999 |...........| -#> | U| 288.67323 | 94.40 | -0.2117 | 2.054 | 2.271 | -#> |.....................| 0.6929 | 1.217 | 1.484 |...........| -#> | X| 288.67323 | 94.40 | 0.8092 | 7.800 | 2.271 | -#> |.....................| 0.6929 | 1.217 | 1.484 |...........| -#> calculating covariance matrix +f_nlmixr_fomc_saem <- nlmixr(f_mmkin_parent["FOMC", ], est = "saem", + control = saemControl(print = 0)) +
#> parameter labels from comments are typically ignored in non-interactive mode
#> Need to run with the source intact to parse comments
#>
#> → generate SAEM model
#> done
#> Calculating covariance matrix
#>
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → compiling EBE model...
#>
#> done
#> Calculating residuals/tables
#> done
f_nlmixr_fomc_focei <- nlmixr(f_mmkin_parent["FOMC", ], est = "focei", + control = foceiControl(print = 0)) +
#> parameter labels from comments are typically ignored in non-interactive mode
#> Need to run with the source intact to parse comments
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → calculate jacobian
#>
#> → calculate sensitivities
#>
#> → calculate ∂(f)/∂(η)
#>
#> → calculate ∂(R²)/∂(η)
#>
#> → finding duplicate expressions in inner model...
#>
#> → optimizing duplicate expressions in inner model...
#>
#> → finding duplicate expressions in EBE model...
#>
#> → optimizing duplicate expressions in EBE model...
#>
#> → compiling inner model...
#>
#> done
#> → finding duplicate expressions in FD model...
#>
#> → optimizing duplicate expressions in FD model...
#>
#> → compiling EBE model...
#>
#> done
#> → compiling events FD model...
#>
#> done
#> calculating covariance matrix #> done
#> Calculating residuals/tables
#> done
#> Warning: initial ETAs were nudged; (can control by foceiControl(etaNudge=., etaNudge2=))
#> Warning: ETAs were reset to zero during optimization; (Can control by foceiControl(resetEtaP=.))
#> Warning: last objective function was not at minimum, possible problems in optimization
#> Warning: gradient problems with initial estimate and covariance; see $scaleInfo
-f_nlmixr_dfop_saem <- nlmixr(f_mmkin_parent["DFOP", ], est = "saem") -
#> parameter labels from comments are typically ignored in non-interactive mode
#> Need to run with the source intact to parse comments
#>
#> → generate SAEM model
#> done
#> 1: 93.2375 -1.6690 -4.0126 0.0336 3.3441 0.9789 2.1220 0.5342 18.1447 -#> 2: 92.9778 -1.6369 -3.9297 0.0067 3.1769 1.2515 2.0460 0.5166 11.1022 -#> 3: 92.9382 -1.6747 -3.9496 -0.0050 3.0181 1.1889 1.9437 0.4908 9.5980 -#> 4: 93.4481 -1.8083 -3.9734 -0.0250 2.8672 1.1295 1.8797 0.4662 8.6240 -#> 5: 93.4584 -1.8288 -4.0221 0.0414 2.7238 1.0730 1.8467 0.5161 8.1404 -#> 6: 93.7533 -1.8675 -4.0215 0.0158 2.5876 1.0194 1.8017 0.4911 7.5848 -#> 7: 93.6006 -1.8542 -4.0241 -0.0026 2.4582 0.9684 1.7860 0.4916 7.0796 -#> 8: 93.6918 -1.8416 -3.9940 0.0121 2.3353 0.9200 1.7061 0.4681 6.9985 -#> 9: 93.4789 -1.8738 -3.9845 0.0318 3.1307 0.8740 1.7845 0.4553 6.8335 -#> 10: 93.6048 -1.8723 -4.0154 0.0112 3.1962 0.8303 1.7434 0.4325 7.0681 -#> 11: 93.5135 -1.8675 -3.9905 0.0295 3.2177 0.7888 1.6910 0.4619 6.9572 -#> 12: 93.4407 -1.8790 -3.9877 0.0509 3.4194 0.7493 1.6324 0.5060 6.5755 -#> 13: 93.5033 -1.9250 -4.0416 0.0734 3.2485 0.7295 1.7369 0.4807 6.3881 -#> 14: 93.4276 -1.9082 -4.0516 0.0558 3.0860 0.7281 1.7241 0.4567 5.9840 -#> 15: 93.3041 -1.9256 -4.0718 0.0854 3.4389 0.7293 1.7446 0.4524 5.8195 -#> 16: 93.2979 -1.9297 -4.0624 0.0730 3.2670 0.7239 1.7476 0.4298 5.7629 -#> 17: 93.3522 -1.9570 -4.0876 0.1304 3.3053 0.7020 1.7402 0.4083 5.6926 -#> 18: 93.3500 -1.9652 -4.0816 0.1350 3.1400 0.7130 1.7217 0.3879 5.5714 -#> 19: 93.3822 -1.9519 -4.0961 0.1322 2.9830 0.7087 1.7228 0.3745 5.4176 -#> 20: 93.2823 -1.9490 -4.0841 0.1238 2.8339 0.6988 1.7659 0.3753 5.5279 -#> 21: 93.5951 -1.9298 -4.0874 0.1345 2.6922 0.6665 1.7724 0.3645 5.4414 -#> 22: 93.5052 -1.9469 -4.0739 0.1260 3.1244 0.6776 1.7629 0.3618 5.5395 -#> 23: 93.4734 -1.9952 -4.0909 0.1472 3.0340 0.7225 1.8104 0.3437 5.5072 -#> 24: 93.8816 -1.9639 -4.0914 0.1511 2.8824 0.7215 1.8586 0.3324 5.6009 -#> 25: 93.5874 -1.9750 -4.1026 0.1296 2.7383 0.7178 1.8209 0.3680 5.6274 -#> 26: 93.4057 -1.9316 -4.0922 0.1224 3.8103 0.7331 1.7796 0.3639 5.6861 -#> 27: 93.5013 -1.9188 -4.0698 0.0758 3.7127 0.7670 1.8750 0.3457 5.6624 -#> 28: 93.5703 -1.9523 -4.0758 0.0731 4.6390 0.7489 1.8583 0.3445 5.8077 -#> 29: 93.4694 -1.9559 -4.0566 0.0444 5.1290 0.8062 1.9344 0.3273 5.8688 -#> 30: 93.2290 -1.9824 -4.0475 0.0674 4.8726 0.8702 2.0343 0.3109 5.7579 -#> 31: 93.8652 -1.9771 -4.0510 0.0679 4.6289 0.8565 2.0529 0.2954 5.5526 -#> 32: 93.5854 -1.9573 -4.0510 0.0643 5.1320 0.8417 2.0138 0.2806 5.4199 -#> 33: 93.9870 -1.9503 -4.0513 0.0542 4.8754 0.8412 2.0433 0.2666 5.6945 -#> 34: 93.6884 -1.9172 -4.0633 0.0556 4.6317 0.8847 2.0861 0.2702 5.2687 -#> 35: 94.0375 -1.9365 -4.0576 0.0753 5.2320 0.8404 2.0791 0.2582 5.2760 -#> 36: 94.1588 -1.9423 -4.0499 0.0792 4.9704 0.8221 2.1145 0.2669 5.2050 -#> 37: 93.8626 -1.9356 -4.0538 0.0591 5.2723 0.8360 2.1407 0.2536 5.3218 -#> 38: 93.7237 -1.9357 -4.0611 0.0543 5.0087 0.8361 2.0788 0.2710 5.2866 -#> 39: 93.6513 -1.9327 -4.0408 0.0712 4.7582 0.8408 2.0051 0.2899 5.4693 -#> 40: 93.4619 -1.9634 -4.0360 0.1232 4.5203 0.8317 2.0367 0.3288 5.4324 -#> 41: 93.4809 -1.9601 -4.0351 0.1261 4.2943 0.8424 2.0081 0.3306 5.4573 -#> 42: 93.5851 -1.9745 -4.0428 0.1250 4.9744 0.8003 1.9818 0.3141 5.5168 -#> 43: 93.7820 -1.9597 -4.0401 0.1305 5.9118 0.7603 2.1332 0.2984 5.4899 -#> 44: 93.7419 -1.9509 -4.0495 0.1345 5.6162 0.7743 2.0459 0.2998 5.5344 -#> 45: 93.6967 -1.9366 -4.0522 0.1215 5.3354 0.7968 2.0566 0.2848 5.7738 -#> 46: 93.3665 -1.9553 -4.0018 0.0951 5.0686 0.7583 2.1124 0.2706 5.3850 -#> 47: 93.2974 -1.9332 -4.0091 0.0869 5.2792 0.8149 2.1009 0.2597 5.6743 -#> 48: 93.3967 -1.9540 -4.0218 0.0623 5.0152 0.8006 2.1538 0.2467 5.5889 -#> 49: 93.1652 -1.9724 -4.0350 0.0506 4.7645 0.8055 2.1445 0.2344 5.3586 -#> 50: 93.1464 -1.9377 -4.0185 0.0591 5.3658 0.8149 2.1523 0.2226 5.2483 -#> 51: 93.5217 -1.9246 -4.0272 0.0423 5.8579 0.8368 2.1596 0.2115 5.2746 -#> 52: 93.5512 -1.9257 -4.0204 0.0307 7.2345 0.8463 2.1903 0.2065 5.2405 -#> 53: 93.5400 -1.9428 -4.0300 0.0572 6.8728 0.8268 2.0807 0.2139 5.4127 -#> 54: 93.9868 -1.9502 -4.0129 0.0282 9.6651 0.8468 2.0823 0.2032 5.0396 -#> 55: 94.0505 -1.9393 -4.0073 0.0390 10.0994 0.8375 2.1018 0.2016 4.9147 -#> 56: 93.8010 -1.9493 -4.0026 0.0415 10.1741 0.8816 2.1117 0.2207 5.0723 -#> 57: 93.7596 -1.9762 -4.0154 0.0651 9.6654 0.8952 2.1662 0.2096 5.2311 -#> 58: 94.3399 -1.9353 -4.0095 0.0446 9.1821 0.9498 2.2103 0.1991 5.1009 -#> 59: 94.4036 -1.9283 -4.0279 0.0475 8.7230 0.9480 2.3209 0.1892 4.9930 -#> 60: 94.6395 -1.9260 -4.0348 0.0457 8.8651 0.9006 2.2565 0.1797 5.1751 -#> 61: 94.6499 -1.9291 -4.0216 0.0297 8.4218 0.9206 2.2220 0.1843 5.1124 -#> 62: 94.3847 -1.9010 -4.0300 0.0257 9.0591 0.9331 2.2795 0.1816 5.0834 -#> 63: 94.5510 -1.9120 -4.0116 0.0179 8.6061 0.9256 2.1791 0.1736 5.1513 -#> 64: 94.2510 -1.9213 -4.0184 0.0204 8.1758 0.9124 2.2131 0.1682 5.0698 -#> 65: 94.1173 -1.9044 -4.0279 0.0286 8.6773 0.9211 2.2202 0.1598 5.1120 -#> 66: 94.2093 -1.9098 -4.0206 0.0160 8.2435 0.9230 2.2475 0.1750 5.0175 -#> 67: 94.2814 -1.9339 -4.0041 0.0146 7.8313 0.9377 2.2350 0.1709 5.1478 -#> 68: 94.3001 -1.9079 -4.0127 -0.0103 7.4397 0.9163 2.2245 0.1640 5.2529 -#> 69: 94.3820 -1.9167 -4.0176 0.0296 7.0678 0.8704 2.2236 0.1888 5.2574 -#> 70: 94.2691 -1.9037 -4.0156 0.0388 6.7144 0.8601 2.1833 0.2128 5.0230 -#> 71: 94.3827 -1.9183 -4.0056 0.0485 6.3786 0.8491 2.2147 0.2345 5.1212 -#> 72: 94.3104 -1.9291 -4.0099 0.0330 6.0597 0.9007 2.2316 0.2255 5.3748 -#> 73: 94.1778 -1.9238 -4.0054 0.0222 5.7567 0.9479 2.2969 0.2142 5.2827 -#> 74: 94.1022 -1.9149 -4.0017 0.0497 5.4689 0.9305 2.3058 0.2035 5.3117 -#> 75: 94.2343 -1.9045 -4.0141 0.0189 5.1954 0.9141 2.3227 0.1933 5.1047 -#> 76: 94.0905 -1.9019 -4.0166 0.0170 5.5411 0.8978 2.3315 0.1836 5.1233 -#> 77: 94.2772 -1.9117 -4.0053 0.0584 5.2641 0.9238 2.3678 0.1866 4.9803 -#> 78: 94.7235 -1.9141 -4.0464 0.0758 5.0735 0.9308 2.3720 0.2062 5.0544 -#> 79: 94.4674 -1.9287 -4.0494 0.0724 5.7355 0.9063 2.3680 0.1959 5.0910 -#> 80: 93.9895 -1.9271 -4.0456 0.0366 7.2150 0.8857 2.4000 0.1861 5.0612 -#> 81: 94.3190 -1.9358 -4.0402 0.0506 7.5591 0.8891 2.3317 0.1814 4.8617 -#> 82: 94.1898 -1.9126 -4.0552 0.0595 7.6462 0.9157 2.3848 0.1854 4.7335 -#> 83: 94.2044 -1.9145 -4.0359 0.0295 7.8610 0.9451 2.4305 0.1871 4.9258 -#> 84: 93.8197 -1.9058 -3.9879 -0.0409 10.4218 0.9604 2.3848 0.2177 5.0619 -#> 85: 94.0219 -1.8957 -3.9753 -0.0441 9.9007 0.9637 2.4476 0.2219 5.0532 -#> 86: 94.0737 -1.8889 -3.9753 -0.0220 9.4056 0.9675 2.4476 0.2284 5.2694 -#> 87: 93.8548 -1.8755 -3.9707 -0.0024 8.9354 1.0066 2.4895 0.2340 5.4019 -#> 88: 93.7578 -1.9046 -3.9804 -0.0042 8.4886 0.9656 2.5006 0.2271 5.3724 -#> 89: 93.6848 -1.8936 -3.9689 -0.0396 10.6813 0.9805 2.4561 0.2254 5.2615 -#> 90: 93.3617 -1.9167 -3.9801 -0.0221 10.1472 1.0147 2.3589 0.2141 5.4193 -#> 91: 93.7419 -1.8964 -3.9888 -0.0363 9.6398 1.0077 2.3748 0.2066 5.3463 -#> 92: 93.8635 -1.8994 -3.9783 -0.0625 9.1578 1.0028 2.3282 0.2239 5.3026 -#> 93: 94.0864 -1.8648 -3.9426 -0.0813 8.8693 1.0348 2.3654 0.2127 5.2637 -#> 94: 93.9789 -1.8949 -3.9840 -0.0549 10.0871 1.0752 2.4551 0.2021 5.4225 -#> 95: 93.9008 -1.9141 -4.0080 -0.0644 9.8584 1.1599 2.4184 0.1920 5.2179 -#> 96: 93.6926 -2.0270 -3.8911 -0.0777 10.3968 1.1019 3.0518 0.1824 5.3163 -#> 97: 93.2478 -2.0074 -3.9034 -0.0427 10.7200 1.0468 2.9960 0.1732 5.5172 -#> 98: 93.4556 -2.0118 -3.9034 -0.0294 10.1840 1.0007 2.9960 0.1646 5.5887 -#> 99: 93.7548 -2.0076 -3.8894 -0.0157 9.7519 0.9507 3.0357 0.1569 5.7139 -#> 100: 93.8962 -2.0112 -3.8887 -0.0406 9.2643 0.9048 3.0369 0.1491 5.6145 -#> 101: 94.0889 -2.0221 -3.8612 -0.0145 8.8011 0.8728 3.1466 0.1499 5.4224 -#> 102: 94.5428 -2.0206 -3.8489 0.0115 8.3611 0.8292 3.1577 0.1473 5.6634 -#> 103: 94.4882 -2.0447 -3.8594 0.0514 7.9430 0.8202 3.1812 0.1562 5.5136 -#> 104: 94.3185 -2.0389 -3.8584 0.0258 8.3364 0.8346 3.1801 0.1484 5.3612 -#> 105: 94.2858 -2.0345 -3.8738 -0.0001 10.6008 0.8415 3.2251 0.1410 5.3359 -#> 106: 94.1264 -2.0415 -3.8756 0.0411 10.0707 0.8554 3.2182 0.1658 5.2280 -#> 107: 93.9801 -2.0574 -3.8674 0.0403 10.0269 0.8807 3.2628 0.1744 5.0299 -#> 108: 93.6911 -2.0295 -3.8693 0.0355 9.5255 0.8683 3.2708 0.1803 5.1880 -#> 109: 94.0646 -2.0260 -3.8806 0.0506 9.0493 0.8729 3.3140 0.1759 5.1927 -#> 110: 94.4591 -2.0378 -3.8962 0.0360 8.5968 0.8890 3.3076 0.1675 4.8961 -#> 111: 94.3748 -2.0319 -3.9053 0.0397 8.1670 0.8995 3.3254 0.1591 4.8066 -#> 112: 94.2370 -2.0338 -3.9017 0.0603 7.7586 0.8545 3.2484 0.1512 4.8856 -#> 113: 94.1242 -2.0237 -3.8954 0.0795 7.3707 0.8980 3.2127 0.1530 5.1859 -#> 114: 94.1452 -2.0298 -3.9197 0.0530 7.0021 0.8771 3.0744 0.1628 5.1303 -#> 115: 94.1403 -2.0410 -3.9093 0.0476 6.9173 0.9383 3.0223 0.1621 5.2563 -#> 116: 94.1612 -2.0424 -3.9063 0.0593 7.6367 0.8914 3.0420 0.1856 5.1566 -#> 117: 94.2018 -2.0488 -3.9041 0.0539 7.2549 0.8549 3.0204 0.1796 5.2119 -#> 118: 94.1315 -2.0579 -3.9139 0.0564 6.8922 0.8121 3.0180 0.1948 5.0302 -#> 119: 93.7398 -2.0747 -3.9202 0.0570 6.7510 0.7838 3.0084 0.1906 5.0863 -#> 120: 93.5945 -2.0511 -3.9388 0.0534 6.4134 0.7885 3.0100 0.2128 5.0597 -#> 121: 93.9845 -2.0613 -3.9338 0.0568 6.0928 0.7793 2.9944 0.2022 5.3179 -#> 122: 93.7779 -2.0831 -3.9338 0.0630 5.7881 0.7778 2.9944 0.1921 5.2399 -#> 123: 93.9128 -2.0623 -3.9135 0.0493 5.4987 0.8329 2.9729 0.1825 5.0752 -#> 124: 93.5190 -2.0804 -3.9315 0.0538 5.2238 0.8581 3.0220 0.1733 4.9713 -#> 125: 93.7427 -2.0649 -3.9309 0.0499 4.9626 0.8431 3.0260 0.1882 5.0718 -#> 126: 9.3540e+01 -2.0238e+00 -3.9006e+00 -6.8989e-05 4.7145e+00 8.3548e-01 2.9498e+00 1.9993e-01 5.2080e+00 -#> 127: 93.4310 -2.0496 -3.8898 -0.0173 4.4788 0.8864 2.9614 0.2302 5.6432 -#> 128: 93.7512 -2.0285 -3.9180 -0.0096 4.2548 0.8653 3.0768 0.2312 5.3906 -#> 129: 93.6908 -2.0718 -3.9113 -0.0194 4.0421 0.9022 3.0506 0.2386 5.3278 -#> 130: 93.5805 -1.9753 -4.0480 0.0065 3.8400 1.0388 2.8980 0.2276 5.2583 -#> 131: 93.8050 -1.9501 -4.0447 0.0040 3.8738 1.0957 2.7531 0.2162 5.3026 -#> 132: 93.6470 -1.9322 -4.0411 0.0048 3.6801 1.0618 2.6155 0.2159 5.2552 -#> 133: 94.2927 -1.9445 -4.0067 -0.0040 5.6903 1.0378 2.5425 0.2094 5.2430 -#> 134: 94.2814 -1.9286 -4.0021 -0.0144 6.9123 1.1316 2.5172 0.1990 5.3877 -#> 135: 94.0440 -1.9285 -4.0415 0.0254 6.5667 1.1416 2.4394 0.1975 5.3248 -#> 136: 94.0122 -1.9256 -4.0542 0.0156 6.6147 1.1511 2.4728 0.1954 5.2109 -#> 137: 93.8613 -1.9095 -4.0629 -0.0007 6.2840 1.1789 2.5078 0.2045 5.2876 -#> 138: 93.7410 -1.9345 -4.0788 -0.0005 6.0718 1.1507 2.5026 0.2086 5.3284 -#> 139: 93.6437 -1.9499 -4.0788 0.0159 5.7682 1.0932 2.5026 0.1982 5.4211 -#> 140: 93.4066 -1.9591 -4.0720 0.0472 6.9432 1.0883 2.4756 0.1947 5.4439 -#> 141: 93.6086 -1.9625 -4.1026 0.0785 7.7204 1.1027 2.3974 0.2084 5.6595 -#> 142: 93.8693 -1.9640 -4.1003 0.0670 10.1206 1.1196 2.2775 0.1980 5.4918 -#> 143: 93.6954 -1.9890 -4.0792 0.0824 9.6146 1.0636 2.3366 0.1881 5.2818 -#> 144: 93.5119 -1.9888 -4.0603 0.0645 9.1339 1.0557 2.3380 0.1787 5.3491 -#> 145: 93.3539 -1.9874 -4.0563 0.0764 8.6772 1.0340 2.3573 0.1697 5.4214 -#> 146: 93.2812 -1.9734 -4.0620 0.0674 8.4698 1.0504 2.3604 0.1641 5.5968 -#> 147: 93.8919 -1.9657 -4.0863 0.0596 8.0463 1.0288 2.4569 0.1668 5.3476 -#> 148: 93.7841 -1.9719 -4.0688 0.0880 9.4571 1.0719 2.4020 0.1692 5.1664 -#> 149: 93.6361 -1.9912 -4.0523 0.0895 8.9842 1.0183 2.5236 0.1671 5.5060 -#> 150: 93.6402 -1.9940 -4.0365 0.0730 9.1100 0.9674 2.3974 0.1669 5.5402 -#> 151: 93.4283 -1.9861 -4.0594 0.0805 8.6545 0.9567 2.4304 0.1652 5.3571 -#> 152: 93.7431 -1.9444 -4.0833 0.0612 9.2738 0.9789 2.3602 0.1571 5.0632 -#> 153: 93.7239 -1.9307 -4.0780 0.0780 8.9915 0.9995 2.3398 0.1600 5.1077 -#> 154: 94.0115 -1.9655 -4.0978 0.0859 9.0507 0.9894 2.3313 0.1628 5.2272 -#> 155: 94.3207 -1.9792 -4.0905 0.1114 8.5756 0.9988 2.3790 0.1873 5.0916 -#> 156: 94.3160 -1.9811 -4.0894 0.0906 5.0717 0.9968 2.3662 0.2003 4.9973 -#> 157: 94.3042 -1.9641 -4.1031 0.0966 5.1875 0.9911 2.3908 0.1943 4.9993 -#> 158: 94.0102 -1.9635 -4.1047 0.1003 5.2398 0.9834 2.3905 0.1809 5.2765 -#> 159: 94.5686 -2.0012 -4.1459 0.1212 6.8800 1.0317 2.5969 0.1215 5.3943 -#> 160: 94.2433 -1.9673 -4.1420 0.1165 8.0930 1.0286 2.5827 0.1092 5.2904 -#> 161: 94.1327 -1.9644 -4.1595 0.1196 9.5810 1.0786 2.7063 0.1123 5.1723 -#> 162: 94.0779 -1.9525 -4.1608 0.1103 6.6456 1.0562 2.7111 0.1277 5.0224 -#> 163: 94.0995 -1.9687 -4.1910 0.1320 8.2582 1.0701 2.8394 0.1232 5.1593 -#> 164: 94.4575 -1.9800 -4.1936 0.1208 6.4860 1.1603 2.8332 0.1254 5.1325 -#> 165: 94.3298 -1.9968 -4.1963 0.1506 5.7592 1.1484 2.9143 0.1196 5.3059 -#> 166: 94.2531 -1.9977 -4.1748 0.1566 5.3810 1.1262 2.8044 0.1142 5.2569 -#> 167: 94.4593 -1.9985 -4.1758 0.1435 7.0082 1.1247 2.8542 0.1125 5.4332 -#> 168: 94.0868 -2.0117 -4.2259 0.1345 7.5364 1.1395 3.0314 0.1137 5.2790 -#> 169: 93.7927 -2.0072 -4.2177 0.1276 6.7023 1.1292 3.0535 0.1135 5.1357 -#> 170: 93.8094 -2.0309 -4.2244 0.1298 6.7343 1.0975 3.2542 0.1065 5.2372 -#> 171: 93.7263 -2.0349 -4.2115 0.1204 8.2555 1.0626 3.2292 0.1020 5.4467 -#> 172: 93.3380 -2.0022 -4.2262 0.1193 6.6891 1.0822 3.2762 0.0989 5.3641 -#> 173: 93.5334 -2.0224 -4.2488 0.1145 6.0685 1.0328 3.4694 0.0978 5.4780 -#> 174: 93.1805 -2.0207 -4.2344 0.1025 6.1648 1.0612 3.2079 0.0976 5.2570 -#> 175: 93.3423 -2.0255 -4.1644 0.1070 5.9418 1.0701 2.8555 0.1059 5.3415 -#> 176: 93.3387 -2.0192 -4.1473 0.0786 4.7649 1.0508 2.9102 0.1101 5.3381 -#> 177: 93.4640 -2.0177 -4.1504 0.0709 4.5672 1.0590 2.9447 0.1103 5.3245 -#> 178: 93.4930 -2.0147 -4.1568 0.0777 4.5325 1.1063 2.7902 0.1247 5.2036 -#> 179: 93.7455 -2.0101 -4.1580 0.0823 4.2094 1.1020 2.8075 0.1246 5.1184 -#> 180: 93.4838 -1.9989 -4.1631 0.0868 3.6999 1.0782 2.8790 0.1280 5.2677 -#> 181: 93.5207 -1.9975 -4.1926 0.1013 4.5693 1.0706 2.9216 0.1375 5.3783 -#> 182: 93.6695 -2.0251 -4.1717 0.0809 3.8373 1.0341 2.9954 0.1328 5.3774 -#> 183: 93.7238 -2.0095 -4.1222 0.0861 3.8354 1.0138 2.7536 0.1512 5.2600 -#> 184: 93.7106 -2.0032 -4.1244 0.0853 4.1968 1.0250 2.6849 0.1590 5.1996 -#> 185: 93.2862 -2.0028 -4.1628 0.0743 5.4347 1.0373 2.6528 0.1640 5.3269 -#> 186: 93.5567 -2.0040 -4.1438 0.0807 6.5150 1.0562 2.6486 0.1589 5.4158 -#> 187: 93.7894 -2.0023 -4.1137 0.1288 5.1401 1.0207 2.5217 0.1745 5.6484 -#> 188: 93.4911 -1.8872 -4.2405 0.1324 4.3165 0.8176 2.2483 0.1870 5.5214 -#> 189: 93.9184 -1.8982 -4.2936 0.1606 3.7995 0.8383 2.2555 0.1766 5.6320 -#> 190: 93.7487 -1.8878 -4.2872 0.1651 3.6764 0.8860 2.2088 0.1748 5.4829 -#> 191: 93.8940 -1.8715 -4.3244 0.1650 2.8119 0.9024 2.1141 0.1903 5.7768 -#> 192: 93.9378 -1.9105 -4.3010 0.1954 2.5239 0.8232 2.1331 0.1831 5.8507 -#> 193: 94.5609 -1.8766 -4.3303 0.2042 3.9595 0.8413 2.0662 0.2095 5.6119 -#> 194: 94.7465 -1.9036 -4.3363 0.2112 5.0784 0.8176 2.1071 0.2149 5.6051 -#> 195: 94.4761 -1.8852 -4.3375 0.2021 4.7026 0.7615 2.0556 0.2333 5.3997 -#> 196: 93.7678 -1.9037 -4.3676 0.2273 5.6976 0.7824 2.1487 0.2478 5.2531 -#> 197: 94.0788 -1.9208 -4.3670 0.2203 3.8352 0.7644 2.0893 0.2354 5.2196 -#> 198: 94.3424 -1.8825 -4.3288 0.2075 4.9447 0.7304 1.9525 0.2502 5.1387 -#> 199: 94.0613 -1.9911 -4.1676 0.2379 3.6248 0.6126 2.8184 0.2801 5.3421 -#> 200: 94.4814 -2.0045 -4.1782 0.2245 3.5637 0.6427 2.7132 0.3014 5.3984 -#> 201: 94.3903 -1.9973 -4.1773 0.2165 3.4686 0.6525 2.7040 0.2901 5.4178 -#> 202: 94.1840 -1.9928 -4.1742 0.2117 3.6920 0.6576 2.7046 0.2870 5.3743 -#> 203: 94.1832 -1.9865 -4.1670 0.2025 3.8180 0.6618 2.7097 0.2758 5.3389 -#> 204: 94.1550 -1.9832 -4.1631 0.1955 3.9449 0.6613 2.6998 0.2691 5.2948 -#> 205: 94.1853 -1.9824 -4.1602 0.1948 4.1753 0.6598 2.6909 0.2695 5.2556 -#> 206: 94.1775 -1.9800 -4.1564 0.1918 4.1962 0.6581 2.6778 0.2678 5.2316 -#> 207: 94.1754 -1.9736 -4.1532 0.1864 4.2107 0.6580 2.6645 0.2694 5.2553 -#> 208: 94.1591 -1.9695 -4.1498 0.1811 4.2621 0.6596 2.6537 0.2712 5.2543 -#> 209: 94.1225 -1.9675 -4.1454 0.1744 4.1977 0.6651 2.6519 0.2687 5.3075 -#> 210: 94.1047 -1.9628 -4.1424 0.1666 4.1981 0.6663 2.6570 0.2717 5.3160 -#> 211: 94.1161 -1.9587 -4.1398 0.1600 4.1858 0.6674 2.6614 0.2728 5.3307 -#> 212: 94.0976 -1.9551 -4.1379 0.1529 4.2002 0.6693 2.6737 0.2709 5.3288 -#> 213: 94.0845 -1.9511 -4.1365 0.1449 4.1381 0.6710 2.6727 0.2680 5.3322 -#> 214: 94.0582 -1.9493 -4.1351 0.1394 4.0630 0.6733 2.6729 0.2663 5.3504 -#> 215: 94.0449 -1.9493 -4.1338 0.1340 3.9607 0.6733 2.6719 0.2641 5.3681 -#> 216: 94.0030 -1.9496 -4.1321 0.1299 4.0200 0.6742 2.6727 0.2622 5.3619 -#> 217: 93.9560 -1.9514 -4.1315 0.1267 4.0642 0.6778 2.6764 0.2612 5.3584 -#> 218: 93.9485 -1.9520 -4.1297 0.1235 4.1822 0.6795 2.6745 0.2599 5.3471 -#> 219: 93.9650 -1.9523 -4.1289 0.1211 4.3244 0.6807 2.6851 0.2591 5.3531 -#> 220: 93.9961 -1.9519 -4.1284 0.1193 4.4276 0.6837 2.6936 0.2577 5.3528 -#> 221: 94.0080 -1.9517 -4.1275 0.1183 4.5303 0.6866 2.6979 0.2578 5.3538 -#> 222: 94.0143 -1.9505 -4.1272 0.1159 4.5882 0.6887 2.7039 0.2570 5.3489 -#> 223: 94.0189 -1.9491 -4.1269 0.1138 4.5674 0.6910 2.7092 0.2562 5.3424 -#> 224: 94.0136 -1.9464 -4.1270 0.1126 4.5582 0.6923 2.7161 0.2548 5.3421 -#> 225: 94.0118 -1.9444 -4.1276 0.1112 4.6000 0.6929 2.7269 0.2533 5.3525 -#> 226: 93.9884 -1.9428 -4.1260 0.1099 4.6720 0.6935 2.7428 0.2530 5.3427 -#> 227: 93.9657 -1.9416 -4.1247 0.1097 4.7197 0.6937 2.7581 0.2529 5.3455 -#> 228: 93.9586 -1.9410 -4.1234 0.1105 4.7731 0.6945 2.7801 0.2528 5.3408 -#> 229: 93.9574 -1.9409 -4.1215 0.1102 4.7898 0.6963 2.7970 0.2518 5.3366 -#> 230: 93.9495 -1.9410 -4.1201 0.1096 4.7966 0.6982 2.8117 0.2505 5.3301 -#> 231: 93.9378 -1.9416 -4.1193 0.1093 4.7947 0.6993 2.8274 0.2492 5.3270 -#> 232: 93.9362 -1.9421 -4.1184 0.1086 4.8132 0.7011 2.8411 0.2477 5.3191 -#> 233: 93.9412 -1.9424 -4.1167 0.1074 4.8188 0.7028 2.8514 0.2459 5.3134 -#> 234: 93.9436 -1.9424 -4.1152 0.1061 4.7865 0.7040 2.8618 0.2440 5.3153 -#> 235: 93.9413 -1.9425 -4.1134 0.1051 4.8017 0.7062 2.8679 0.2426 5.3137 -#> 236: 93.9480 -1.9423 -4.1119 0.1033 4.8537 0.7085 2.8730 0.2416 5.3089 -#> 237: 93.9560 -1.9408 -4.1105 0.1020 4.9091 0.7098 2.8777 0.2411 5.2970 -#> 238: 93.9610 -1.9393 -4.1091 0.1003 4.9394 0.7113 2.8824 0.2409 5.2902 -#> 239: 93.9634 -1.9378 -4.1080 0.0993 4.9304 0.7121 2.8875 0.2407 5.2868 -#> 240: 93.9727 -1.9360 -4.1063 0.0980 4.9651 0.7128 2.8918 0.2404 5.2825 -#> 241: 93.9736 -1.9348 -4.1045 0.0969 5.0080 0.7139 2.8917 0.2395 5.2751 -#> 242: 93.9779 -1.9334 -4.1030 0.0959 5.0856 0.7150 2.8923 0.2389 5.2656 -#> 243: 93.9807 -1.9322 -4.1015 0.0953 5.1490 0.7158 2.8929 0.2385 5.2560 -#> 244: 93.9858 -1.9317 -4.0998 0.0942 5.2172 0.7171 2.8922 0.2380 5.2514 -#> 245: 93.9798 -1.9309 -4.0984 0.0920 5.2903 0.7172 2.8892 0.2383 5.2502 -#> 246: 93.9782 -1.9296 -4.0971 0.0903 5.3132 0.7180 2.8866 0.2384 5.2482 -#> 247: 93.9809 -1.9290 -4.0958 0.0886 5.3342 0.7188 2.8839 0.2386 5.2466 -#> 248: 93.9731 -1.9281 -4.0944 0.0873 5.3438 0.7187 2.8812 0.2393 5.2480 -#> 249: 93.9594 -1.9273 -4.0932 0.0852 5.3449 0.7181 2.8781 0.2401 5.2489 -#> 250: 93.9508 -1.9261 -4.0919 0.0835 5.3194 0.7173 2.8752 0.2406 5.2495 -#> 251: 93.9421 -1.9248 -4.0903 0.0812 5.3051 0.7180 2.8714 0.2410 5.2480 -#> 252: 93.9291 -1.9240 -4.0888 0.0793 5.3122 0.7175 2.8681 0.2415 5.2447 -#> 253: 93.9233 -1.9232 -4.0876 0.0777 5.3289 0.7170 2.8636 0.2420 5.2423 -#> 254: 93.9189 -1.9217 -4.0863 0.0760 5.3708 0.7165 2.8593 0.2425 5.2395 -#> 255: 93.9130 -1.9205 -4.0850 0.0743 5.4093 0.7157 2.8548 0.2428 5.2393 -#> 256: 93.9031 -1.9195 -4.0837 0.0731 5.4400 0.7153 2.8501 0.2432 5.2417 -#> 257: 93.9079 -1.9183 -4.0821 0.0720 5.4612 0.7138 2.8454 0.2434 5.2469 -#> 258: 93.9117 -1.9173 -4.0807 0.0711 5.4979 0.7126 2.8412 0.2439 5.2491 -#> 259: 93.9199 -1.9164 -4.0797 0.0708 5.5145 0.7107 2.8364 0.2449 5.2481 -#> 260: 93.9300 -1.9150 -4.0782 0.0699 5.5067 0.7086 2.8316 0.2453 5.2501 -#> 261: 93.9382 -1.9140 -4.0768 0.0689 5.5191 0.7070 2.8271 0.2455 5.2518 -#> 262: 93.9467 -1.9126 -4.0755 0.0681 5.5261 0.7049 2.8227 0.2454 5.2564 -#> 263: 93.9594 -1.9110 -4.0739 0.0667 5.5365 0.7039 2.8196 0.2455 5.2613 -#> 264: 93.9697 -1.9096 -4.0718 0.0650 5.5589 0.7033 2.8174 0.2459 5.2628 -#> 265: 93.9784 -1.9080 -4.0698 0.0631 5.5668 0.7025 2.8153 0.2458 5.2627 -#> 266: 93.9865 -1.9068 -4.0686 0.0615 5.5819 0.7012 2.8114 0.2456 5.2638 -#> 267: 93.9940 -1.9055 -4.0673 0.0599 5.5887 0.7000 2.8076 0.2452 5.2644 -#> 268: 93.9991 -1.9045 -4.0660 0.0584 5.5989 0.6986 2.8039 0.2453 5.2657 -#> 269: 94.0034 -1.9036 -4.0649 0.0573 5.6276 0.6972 2.7990 0.2453 5.2648 -#> 270: 94.0104 -1.9028 -4.0639 0.0561 5.6456 0.6959 2.7945 0.2453 5.2614 -#> 271: 94.0190 -1.9022 -4.0629 0.0550 5.6409 0.6950 2.7900 0.2451 5.2606 -#> 272: 94.0244 -1.9017 -4.0623 0.0542 5.6452 0.6944 2.7863 0.2449 5.2626 -#> 273: 94.0312 -1.9010 -4.0620 0.0531 5.6581 0.6939 2.7821 0.2450 5.2620 -#> 274: 94.0387 -1.9004 -4.0615 0.0520 5.6569 0.6932 2.7774 0.2456 5.2657 -#> 275: 94.0381 -1.9000 -4.0611 0.0510 5.6525 0.6938 2.7727 0.2463 5.2662 -#> 276: 94.0426 -1.8994 -4.0606 0.0498 5.6664 0.6955 2.7682 0.2472 5.2687 -#> 277: 94.0437 -1.8988 -4.0604 0.0486 5.6705 0.6969 2.7646 0.2479 5.2699 -#> 278: 94.0470 -1.8982 -4.0606 0.0476 5.6495 0.6983 2.7620 0.2487 5.2741 -#> 279: 94.0475 -1.8980 -4.0608 0.0470 5.6561 0.6990 2.7590 0.2494 5.2749 -#> 280: 94.0485 -1.8977 -4.0609 0.0462 5.6510 0.6997 2.7565 0.2501 5.2755 -#> 281: 94.0473 -1.8975 -4.0609 0.0456 5.6493 0.6998 2.7529 0.2504 5.2764 -#> 282: 94.0448 -1.8972 -4.0608 0.0448 5.6523 0.7003 2.7495 0.2506 5.2773 -#> 283: 94.0392 -1.8975 -4.0608 0.0440 5.6543 0.7011 2.7463 0.2507 5.2772 -#> 284: 94.0315 -1.8976 -4.0609 0.0432 5.6575 0.7017 2.7431 0.2506 5.2792 -#> 285: 94.0262 -1.8980 -4.0611 0.0427 5.6632 0.7018 2.7402 0.2505 5.2805 -#> 286: 94.0255 -1.8986 -4.0615 0.0427 5.6683 0.7018 2.7371 0.2507 5.2795 -#> 287: 94.0234 -1.8992 -4.0619 0.0427 5.6533 0.7014 2.7340 0.2513 5.2803 -#> 288: 94.0227 -1.9000 -4.0631 0.0431 5.6485 0.7016 2.7352 0.2517 5.2802 -#> 289: 94.0179 -1.9008 -4.0641 0.0433 5.6553 0.7016 2.7358 0.2523 5.2808 -#> 290: 94.0135 -1.9017 -4.0650 0.0435 5.6776 0.7015 2.7363 0.2528 5.2839 -#> 291: 94.0101 -1.9025 -4.0660 0.0440 5.7028 0.7012 2.7372 0.2531 5.2883 -#> 292: 94.0066 -1.9034 -4.0672 0.0442 5.7277 0.7007 2.7369 0.2536 5.2890 -#> 293: 94.0002 -1.9042 -4.0681 0.0441 5.7462 0.7004 2.7366 0.2538 5.2906 -#> 294: 93.9917 -1.9049 -4.0690 0.0440 5.7707 0.7001 2.7363 0.2539 5.2927 -#> 295: 93.9864 -1.9055 -4.0703 0.0440 5.7816 0.7001 2.7362 0.2542 5.2950 -#> 296: 93.9807 -1.9060 -4.0716 0.0441 5.7884 0.7000 2.7362 0.2545 5.2974 -#> 297: 93.9749 -1.9063 -4.0729 0.0442 5.7926 0.7005 2.7362 0.2548 5.3032 -#> 298: 93.9700 -1.9070 -4.0735 0.0442 5.7850 0.7005 2.7323 0.2553 5.3067 -#> 299: 93.9668 -1.9075 -4.0740 0.0442 5.7688 0.7000 2.7293 0.2558 5.3100 -#> 300: 93.9654 -1.9080 -4.0742 0.0441 5.7541 0.6993 2.7260 0.2563 5.3123 -#> 301: 93.9678 -1.9082 -4.0744 0.0439 5.7383 0.6980 2.7217 0.2568 5.3165 -#> 302: 93.9687 -1.9087 -4.0747 0.0435 5.7262 0.6977 2.7175 0.2574 5.3179 -#> 303: 93.9675 -1.9090 -4.0751 0.0430 5.7050 0.6966 2.7137 0.2580 5.3197 -#> 304: 93.9641 -1.9092 -4.0755 0.0428 5.6977 0.6954 2.7097 0.2583 5.3215 -#> 305: 93.9624 -1.9095 -4.0759 0.0427 5.6986 0.6947 2.7061 0.2585 5.3200 -#> 306: 93.9623 -1.9098 -4.0763 0.0428 5.7065 0.6941 2.7025 0.2587 5.3174 -#> 307: 93.9635 -1.9105 -4.0767 0.0430 5.7229 0.6938 2.6992 0.2585 5.3153 -#> 308: 93.9658 -1.9112 -4.0778 0.0435 5.7340 0.6935 2.6992 0.2580 5.3131 -#> 309: 93.9671 -1.9119 -4.0784 0.0440 5.7510 0.6929 2.6990 0.2576 5.3113 -#> 310: 93.9669 -1.9124 -4.0791 0.0441 5.7560 0.6926 2.6988 0.2569 5.3128 -#> 311: 93.9670 -1.9129 -4.0795 0.0443 5.7557 0.6922 2.6972 0.2563 5.3134 -#> 312: 93.9689 -1.9132 -4.0799 0.0446 5.7554 0.6921 2.6959 0.2559 5.3125 -#> 313: 93.9685 -1.9136 -4.0806 0.0448 5.7489 0.6921 2.6960 0.2553 5.3110 -#> 314: 93.9673 -1.9138 -4.0812 0.0447 5.7562 0.6925 2.6964 0.2545 5.3107 -#> 315: 93.9635 -1.9139 -4.0818 0.0447 5.7392 0.6931 2.6971 0.2539 5.3127 -#> 316: 93.9581 -1.9139 -4.0823 0.0442 5.7376 0.6937 2.6974 0.2532 5.3140 -#> 317: 93.9541 -1.9140 -4.0826 0.0437 5.7426 0.6946 2.6968 0.2526 5.3155 -#> 318: 93.9521 -1.9141 -4.0829 0.0432 5.7378 0.6951 2.6970 0.2521 5.3158 -#> 319: 93.9520 -1.9139 -4.0829 0.0423 5.7366 0.6959 2.6977 0.2516 5.3138 -#> 320: 93.9538 -1.9136 -4.0828 0.0414 5.7416 0.6964 2.6980 0.2510 5.3135 -#> 321: 93.9557 -1.9132 -4.0827 0.0406 5.7539 0.6969 2.6983 0.2503 5.3141 -#> 322: 93.9568 -1.9130 -4.0825 0.0399 5.7460 0.6971 2.6988 0.2497 5.3155 -#> 323: 93.9594 -1.9125 -4.0824 0.0393 5.7274 0.6972 2.6993 0.2492 5.3166 -#> 324: 93.9608 -1.9122 -4.0823 0.0386 5.7161 0.6973 2.7006 0.2487 5.3156 -#> 325: 93.9601 -1.9120 -4.0822 0.0379 5.7036 0.6973 2.7019 0.2483 5.3161 -#> 326: 93.9602 -1.9118 -4.0822 0.0372 5.6817 0.6977 2.7023 0.2480 5.3182 -#> 327: 93.9615 -1.9115 -4.0820 0.0364 5.6682 0.6986 2.7024 0.2476 5.3203 -#> 328: 93.9601 -1.9114 -4.0814 0.0355 5.6746 0.6999 2.7012 0.2472 5.3224 -#> 329: 93.9580 -1.9112 -4.0809 0.0348 5.6670 0.7014 2.7003 0.2469 5.3229 -#> 330: 93.9577 -1.9111 -4.0808 0.0341 5.6613 0.7023 2.7007 0.2466 5.3224 -#> 331: 93.9570 -1.9109 -4.0808 0.0334 5.6607 0.7029 2.7020 0.2463 5.3223 -#> 332: 93.9599 -1.9106 -4.0806 0.0328 5.6610 0.7037 2.7023 0.2459 5.3212 -#> 333: 93.9638 -1.9102 -4.0806 0.0320 5.6751 0.7043 2.7029 0.2458 5.3187 -#> 334: 93.9672 -1.9096 -4.0805 0.0311 5.6801 0.7051 2.7033 0.2456 5.3168 -#> 335: 93.9714 -1.9093 -4.0805 0.0302 5.6855 0.7058 2.7038 0.2453 5.3156 -#> 336: 93.9755 -1.9090 -4.0804 0.0294 5.6979 0.7062 2.7040 0.2452 5.3158 -#> 337: 93.9796 -1.9088 -4.0803 0.0286 5.7025 0.7069 2.7038 0.2447 5.3159 -#> 338: 93.9845 -1.9087 -4.0803 0.0278 5.7100 0.7074 2.7042 0.2443 5.3166 -#> 339: 93.9889 -1.9084 -4.0803 0.0273 5.7123 0.7080 2.7045 0.2438 5.3165 -#> 340: 93.9916 -1.9082 -4.0801 0.0267 5.7289 0.7086 2.7045 0.2434 5.3167 -#> 341: 93.9938 -1.9080 -4.0800 0.0263 5.7602 0.7091 2.7048 0.2430 5.3173 -#> 342: 93.9971 -1.9076 -4.0799 0.0257 5.7951 0.7096 2.7046 0.2427 5.3171 -#> 343: 93.9979 -1.9073 -4.0794 0.0251 5.8156 0.7101 2.7044 0.2424 5.3157 -#> 344: 94.0015 -1.9070 -4.0792 0.0246 5.8378 0.7105 2.7047 0.2420 5.3153 -#> 345: 94.0040 -1.9067 -4.0789 0.0241 5.8559 0.7111 2.7046 0.2414 5.3149 -#> 346: 94.0073 -1.9066 -4.0787 0.0237 5.8810 0.7119 2.7045 0.2409 5.3131 -#> 347: 94.0084 -1.9066 -4.0785 0.0232 5.8815 0.7127 2.7044 0.2406 5.3125 -#> 348: 94.0084 -1.9067 -4.0785 0.0229 5.8870 0.7132 2.7051 0.2403 5.3110 -#> 349: 94.0079 -1.9068 -4.0785 0.0225 5.8882 0.7136 2.7048 0.2401 5.3127 -#> 350: 94.0075 -1.9067 -4.0785 0.0220 5.8857 0.7137 2.7045 0.2396 5.3133 -#> 351: 94.0068 -1.9068 -4.0786 0.0218 5.8849 0.7140 2.7041 0.2393 5.3135 -#> 352: 94.0059 -1.9067 -4.0788 0.0216 5.8778 0.7141 2.7039 0.2390 5.3139 -#> 353: 94.0073 -1.9067 -4.0792 0.0215 5.8709 0.7140 2.7047 0.2388 5.3129 -#> 354: 94.0078 -1.9065 -4.0795 0.0214 5.8623 0.7139 2.7054 0.2386 5.3135 -#> 355: 94.0065 -1.9064 -4.0795 0.0211 5.8637 0.7137 2.7048 0.2383 5.3122 -#> 356: 94.0080 -1.9063 -4.0796 0.0209 5.8613 0.7134 2.7041 0.2380 5.3121 -#> 357: 94.0105 -1.9061 -4.0797 0.0206 5.8613 0.7132 2.7036 0.2379 5.3119 -#> 358: 94.0114 -1.9059 -4.0798 0.0205 5.8539 0.7130 2.7029 0.2377 5.3107 -#> 359: 94.0154 -1.9058 -4.0799 0.0203 5.8559 0.7126 2.7024 0.2374 5.3112 -#> 360: 94.0165 -1.9057 -4.0800 0.0201 5.8544 0.7124 2.7020 0.2372 5.3099 -#> 361: 94.0198 -1.9056 -4.0802 0.0199 5.8511 0.7121 2.7018 0.2370 5.3089 -#> 362: 94.0224 -1.9054 -4.0811 0.0198 5.8509 0.7122 2.7071 0.2368 5.3077 -#> 363: 94.0241 -1.9053 -4.0821 0.0197 5.8582 0.7121 2.7135 0.2366 5.3073 -#> 364: 94.0254 -1.9052 -4.0824 0.0195 5.8606 0.7122 2.7147 0.2362 5.3079 -#> 365: 94.0276 -1.9052 -4.0831 0.0195 5.8668 0.7119 2.7197 0.2359 5.3081 -#> 366: 94.0276 -1.9052 -4.0836 0.0195 5.8765 0.7121 2.7217 0.2357 5.3074 -#> 367: 94.0276 -1.9051 -4.0842 0.0194 5.8627 0.7120 2.7240 0.2354 5.3083 -#> 368: 94.0292 -1.9050 -4.0847 0.0195 5.8579 0.7120 2.7254 0.2352 5.3096 -#> 369: 94.0289 -1.9049 -4.0852 0.0195 5.8590 0.7122 2.7271 0.2350 5.3095 -#> 370: 94.0300 -1.9049 -4.0855 0.0194 5.8712 0.7123 2.7284 0.2348 5.3094 -#> 371: 94.0309 -1.9050 -4.0858 0.0194 5.8766 0.7122 2.7295 0.2346 5.3095 -#> 372: 94.0306 -1.9050 -4.0860 0.0196 5.8800 0.7121 2.7306 0.2344 5.3101 -#> 373: 94.0315 -1.9051 -4.0861 0.0196 5.8840 0.7120 2.7305 0.2341 5.3091 -#> 374: 94.0323 -1.9052 -4.0862 0.0194 5.8755 0.7120 2.7301 0.2337 5.3101 -#> 375: 94.0344 -1.9055 -4.0863 0.0193 5.8744 0.7122 2.7308 0.2333 5.3121 -#> 376: 94.0341 -1.9056 -4.0865 0.0191 5.8738 0.7122 2.7311 0.2327 5.3136 -#> 377: 94.0320 -1.9055 -4.0868 0.0188 5.8703 0.7121 2.7311 0.2322 5.3161 -#> 378: 94.0291 -1.9058 -4.0869 0.0186 5.8771 0.7124 2.7311 0.2317 5.3187 -#> 379: 94.0273 -1.9062 -4.0872 0.0184 5.8829 0.7127 2.7316 0.2312 5.3206 -#> 380: 94.0259 -1.9067 -4.0875 0.0181 5.8786 0.7130 2.7321 0.2306 5.3235 -#> 381: 94.0231 -1.9068 -4.0877 0.0178 5.8716 0.7132 2.7331 0.2300 5.3231 -#> 382: 94.0210 -1.9069 -4.0879 0.0172 5.8636 0.7134 2.7340 0.2294 5.3240 -#> 383: 94.0189 -1.9070 -4.0880 0.0167 5.8596 0.7140 2.7351 0.2287 5.3246 -#> 384: 94.0171 -1.9070 -4.0882 0.0161 5.8588 0.7147 2.7365 0.2281 5.3251 -#> 385: 94.0141 -1.9070 -4.0880 0.0154 5.8659 0.7152 2.7365 0.2276 5.3263 -#> 386: 94.0116 -1.9070 -4.0879 0.0148 5.8785 0.7158 2.7364 0.2270 5.3272 -#> 387: 94.0090 -1.9070 -4.0877 0.0142 5.8874 0.7164 2.7363 0.2264 5.3286 -#> 388: 94.0068 -1.9069 -4.0875 0.0136 5.9016 0.7169 2.7364 0.2258 5.3299 -#> 389: 94.0063 -1.9067 -4.0873 0.0131 5.9114 0.7175 2.7363 0.2253 5.3332 -#> 390: 94.0074 -1.9064 -4.0872 0.0126 5.9258 0.7175 2.7362 0.2249 5.3353 -#> 391: 94.0092 -1.9061 -4.0870 0.0121 5.9426 0.7174 2.7359 0.2245 5.3370 -#> 392: 94.0112 -1.9060 -4.0870 0.0119 5.9499 0.7175 2.7358 0.2242 5.3375 -#> 393: 94.0120 -1.9058 -4.0869 0.0116 5.9514 0.7177 2.7351 0.2237 5.3364 -#> 394: 94.0137 -1.9056 -4.0867 0.0112 5.9560 0.7179 2.7342 0.2234 5.3371 -#> 395: 94.0150 -1.9054 -4.0866 0.0109 5.9566 0.7184 2.7340 0.2229 5.3376 -#> 396: 94.0175 -1.9054 -4.0866 0.0106 5.9564 0.7189 2.7341 0.2226 5.3370 -#> 397: 94.0195 -1.9055 -4.0866 0.0104 5.9447 0.7193 2.7344 0.2223 5.3378 -#> 398: 94.0201 -1.9056 -4.0867 0.0102 5.9353 0.7197 2.7348 0.2220 5.3380 -#> 399: 94.0204 -1.9056 -4.0868 0.0101 5.9282 0.7201 2.7350 0.2217 5.3387 -#> 400: 94.0198 -1.9058 -4.0867 0.0099 5.9243 0.7206 2.7348 0.2214 5.3383 -#> 401: 94.0194 -1.9059 -4.0867 0.0097 5.9225 0.7210 2.7345 0.2211 5.3379 -#> 402: 94.0176 -1.9060 -4.0868 0.0096 5.9237 0.7215 2.7342 0.2209 5.3370 -#> 403: 94.0172 -1.9061 -4.0869 0.0095 5.9259 0.7220 2.7337 0.2206 5.3371 -#> 404: 94.0147 -1.9062 -4.0870 0.0093 5.9322 0.7226 2.7330 0.2203 5.3382 -#> 405: 94.0131 -1.9065 -4.0872 0.0092 5.9354 0.7232 2.7326 0.2202 5.3385 -#> 406: 94.0117 -1.9066 -4.0872 0.0091 5.9399 0.7237 2.7318 0.2200 5.3388 -#> 407: 94.0114 -1.9069 -4.0871 0.0090 5.9495 0.7238 2.7314 0.2199 5.3397 -#> 408: 94.0133 -1.9071 -4.0870 0.0089 5.9505 0.7238 2.7310 0.2197 5.3401 -#> 409: 94.0159 -1.9074 -4.0868 0.0090 5.9523 0.7237 2.7309 0.2196 5.3417 -#> 410: 94.0171 -1.9076 -4.0864 0.0087 5.9503 0.7235 2.7307 0.2195 5.3449 -#> 411: 94.0193 -1.9078 -4.0862 0.0086 5.9528 0.7234 2.7304 0.2194 5.3476 -#> 412: 94.0193 -1.9082 -4.0860 0.0088 5.9516 0.7236 2.7303 0.2195 5.3509 -#> 413: 94.0192 -1.9085 -4.0859 0.0087 5.9491 0.7235 2.7302 0.2195 5.3517 -#> 414: 94.0175 -1.9086 -4.0860 0.0087 5.9453 0.7237 2.7297 0.2196 5.3523 -#> 415: 94.0156 -1.9088 -4.0861 0.0088 5.9408 0.7238 2.7289 0.2196 5.3528 -#> 416: 94.0145 -1.9090 -4.0861 0.0088 5.9442 0.7236 2.7281 0.2197 5.3540 -#> 417: 94.0140 -1.9093 -4.0862 0.0092 5.9459 0.7235 2.7274 0.2198 5.3549 -#> 418: 94.0144 -1.9097 -4.0864 0.0095 5.9495 0.7233 2.7269 0.2199 5.3551 -#> 419: 94.0142 -1.9102 -4.0866 0.0099 5.9425 0.7233 2.7265 0.2200 5.3555 -#> 420: 94.0134 -1.9107 -4.0867 0.0102 5.9338 0.7234 2.7260 0.2200 5.3563 -#> 421: 94.0096 -1.9113 -4.0869 0.0105 5.9272 0.7236 2.7260 0.2200 5.3571 -#> 422: 94.0069 -1.9118 -4.0872 0.0108 5.9238 0.7238 2.7261 0.2200 5.3576 -#> 423: 94.0034 -1.9124 -4.0874 0.0111 5.9217 0.7240 2.7260 0.2200 5.3579 -#> 424: 94.0009 -1.9129 -4.0876 0.0114 5.9258 0.7240 2.7259 0.2200 5.3578 -#> 425: 94.0000 -1.9134 -4.0879 0.0119 5.9330 0.7240 2.7258 0.2199 5.3572 -#> 426: 93.9991 -1.9138 -4.0881 0.0122 5.9526 0.7243 2.7256 0.2198 5.3572 -#> 427: 93.9969 -1.9140 -4.0882 0.0124 5.9692 0.7247 2.7258 0.2196 5.3587 -#> 428: 93.9940 -1.9143 -4.0883 0.0124 5.9777 0.7247 2.7259 0.2194 5.3591 -#> 429: 93.9935 -1.9145 -4.0882 0.0123 5.9781 0.7247 2.7260 0.2192 5.3601 -#> 430: 93.9925 -1.9147 -4.0881 0.0122 5.9772 0.7247 2.7260 0.2190 5.3606 -#> 431: 93.9928 -1.9150 -4.0879 0.0120 5.9824 0.7249 2.7262 0.2189 5.3616 -#> 432: 93.9930 -1.9152 -4.0879 0.0120 5.9797 0.7251 2.7267 0.2188 5.3618 -#> 433: 93.9930 -1.9154 -4.0878 0.0119 5.9785 0.7254 2.7271 0.2187 5.3626 -#> 434: 93.9930 -1.9156 -4.0878 0.0120 5.9711 0.7255 2.7273 0.2186 5.3638 -#> 435: 93.9935 -1.9157 -4.0878 0.0120 5.9659 0.7255 2.7269 0.2186 5.3643 -#> 436: 93.9951 -1.9158 -4.0876 0.0120 5.9570 0.7253 2.7263 0.2184 5.3667 -#> 437: 93.9980 -1.9158 -4.0874 0.0119 5.9492 0.7252 2.7259 0.2182 5.3680 -#> 438: 93.9999 -1.9158 -4.0872 0.0117 5.9361 0.7250 2.7255 0.2179 5.3700 -#> 439: 93.9990 -1.9159 -4.0868 0.0115 5.9312 0.7249 2.7247 0.2177 5.3700 -#> 440: 93.9986 -1.9160 -4.0865 0.0114 5.9280 0.7248 2.7235 0.2175 5.3698 -#> 441: 93.9996 -1.9160 -4.0863 0.0114 5.9248 0.7246 2.7222 0.2173 5.3696 -#> 442: 94.0001 -1.9160 -4.0861 0.0114 5.9266 0.7243 2.7213 0.2171 5.3702 -#> 443: 94.0004 -1.9159 -4.0859 0.0113 5.9228 0.7241 2.7202 0.2169 5.3707 -#> 444: 93.9989 -1.9161 -4.0858 0.0113 5.9200 0.7239 2.7194 0.2166 5.3722 -#> 445: 93.9971 -1.9162 -4.0857 0.0114 5.9257 0.7238 2.7182 0.2165 5.3736 -#> 446: 93.9970 -1.9164 -4.0858 0.0114 5.9286 0.7238 2.7177 0.2164 5.3738 -#> 447: 93.9959 -1.9163 -4.0858 0.0113 5.9407 0.7237 2.7166 0.2165 5.3731 -#> 448: 93.9947 -1.9163 -4.0856 0.0113 5.9442 0.7237 2.7159 0.2167 5.3723 -#> 449: 93.9948 -1.9164 -4.0854 0.0114 5.9386 0.7234 2.7151 0.2170 5.3730 -#> 450: 93.9937 -1.9164 -4.0853 0.0115 5.9368 0.7231 2.7142 0.2172 5.3732 -#> 451: 93.9929 -1.9164 -4.0851 0.0114 5.9312 0.7229 2.7135 0.2173 5.3735 -#> 452: 93.9923 -1.9163 -4.0850 0.0112 5.9288 0.7227 2.7121 0.2175 5.3747 -#> 453: 93.9918 -1.9162 -4.0849 0.0111 5.9339 0.7225 2.7112 0.2178 5.3759 -#> 454: 93.9912 -1.9164 -4.0849 0.0111 5.9355 0.7224 2.7103 0.2181 5.3777 -#> 455: 93.9902 -1.9164 -4.0849 0.0111 5.9412 0.7223 2.7097 0.2183 5.3784 -#> 456: 93.9894 -1.9164 -4.0848 0.0110 5.9554 0.7223 2.7076 0.2186 5.3801 -#> 457: 93.9902 -1.9161 -4.0846 0.0110 5.9675 0.7219 2.7054 0.2188 5.3807 -#> 458: 93.9907 -1.9159 -4.0845 0.0109 5.9710 0.7216 2.7032 0.2191 5.3815 -#> 459: 93.9926 -1.9157 -4.0844 0.0108 5.9751 0.7213 2.7011 0.2193 5.3817 -#> 460: 93.9930 -1.9155 -4.0845 0.0107 5.9788 0.7210 2.6985 0.2197 5.3818 -#> 461: 93.9933 -1.9153 -4.0845 0.0106 5.9809 0.7208 2.6959 0.2200 5.3822 -#> 462: 93.9941 -1.9153 -4.0845 0.0105 5.9904 0.7205 2.6935 0.2203 5.3820 -#> 463: 93.9945 -1.9152 -4.0844 0.0105 5.9971 0.7201 2.6913 0.2206 5.3817 -#> 464: 93.9942 -1.9151 -4.0844 0.0104 6.0010 0.7198 2.6892 0.2209 5.3818 -#> 465: 93.9931 -1.9152 -4.0843 0.0103 6.0113 0.7193 2.6872 0.2212 5.3823 -#> 466: 93.9937 -1.9152 -4.0840 0.0101 6.0145 0.7188 2.6853 0.2215 5.3828 -#> 467: 93.9939 -1.9152 -4.0838 0.0099 6.0189 0.7182 2.6835 0.2218 5.3832 -#> 468: 93.9933 -1.9153 -4.0835 0.0097 6.0247 0.7177 2.6818 0.2221 5.3830 -#> 469: 93.9933 -1.9153 -4.0832 0.0095 6.0251 0.7173 2.6801 0.2224 5.3822 -#> 470: 93.9914 -1.9153 -4.0829 0.0092 6.0332 0.7169 2.6785 0.2226 5.3823 -#> 471: 93.9894 -1.9153 -4.0826 0.0089 6.0455 0.7165 2.6769 0.2230 5.3822 -#> 472: 93.9869 -1.9152 -4.0824 0.0086 6.0454 0.7161 2.6754 0.2232 5.3836 -#> 473: 93.9852 -1.9152 -4.0822 0.0084 6.0501 0.7159 2.6740 0.2234 5.3832 -#> 474: 93.9829 -1.9152 -4.0821 0.0082 6.0579 0.7155 2.6725 0.2235 5.3831 -#> 475: 93.9826 -1.9152 -4.0819 0.0082 6.0661 0.7150 2.6711 0.2238 5.3829 -#> 476: 93.9837 -1.9152 -4.0819 0.0082 6.0774 0.7147 2.6696 0.2241 5.3824 -#> 477: 93.9852 -1.9151 -4.0819 0.0081 6.0890 0.7145 2.6681 0.2244 5.3817 -#> 478: 93.9851 -1.9151 -4.0820 0.0080 6.0957 0.7144 2.6665 0.2246 5.3827 -#> 479: 93.9857 -1.9150 -4.0820 0.0079 6.0981 0.7144 2.6651 0.2250 5.3838 -#> 480: 93.9856 -1.9151 -4.0821 0.0080 6.0944 0.7144 2.6638 0.2255 5.3854 -#> 481: 93.9864 -1.9152 -4.0823 0.0081 6.0912 0.7144 2.6624 0.2258 5.3865 -#> 482: 93.9870 -1.9153 -4.0825 0.0081 6.0954 0.7142 2.6613 0.2262 5.3864 -#> 483: 93.9888 -1.9153 -4.0826 0.0081 6.0888 0.7141 2.6602 0.2267 5.3870 -#> 484: 93.9903 -1.9154 -4.0828 0.0082 6.0848 0.7139 2.6592 0.2272 5.3861 -#> 485: 93.9914 -1.9154 -4.0831 0.0085 6.0851 0.7138 2.6586 0.2275 5.3858 -#> 486: 93.9909 -1.9154 -4.0834 0.0088 6.0824 0.7137 2.6581 0.2278 5.3850 -#> 487: 93.9899 -1.9155 -4.0838 0.0091 6.0870 0.7137 2.6577 0.2281 5.3838 -#> 488: 93.9882 -1.9156 -4.0842 0.0095 6.0877 0.7135 2.6574 0.2284 5.3835 -#> 489: 93.9865 -1.9163 -4.0841 0.0099 6.0839 0.7139 2.6581 0.2287 5.3835 -#> 490: 93.9859 -1.9170 -4.0841 0.0104 6.0783 0.7143 2.6587 0.2290 5.3830 -#> 491: 93.9847 -1.9177 -4.0838 0.0108 6.0773 0.7148 2.6596 0.2293 5.3824 -#> 492: 93.9840 -1.9183 -4.0836 0.0110 6.0833 0.7152 2.6606 0.2295 5.3817 -#> 493: 93.9832 -1.9188 -4.0834 0.0113 6.0832 0.7157 2.6613 0.2297 5.3814 -#> 494: 93.9824 -1.9195 -4.0832 0.0115 6.0859 0.7163 2.6620 0.2299 5.3819 -#> 495: 93.9813 -1.9200 -4.0830 0.0117 6.0878 0.7169 2.6633 0.2300 5.3820 -#> 496: 93.9798 -1.9206 -4.0827 0.0118 6.0871 0.7173 2.6644 0.2302 5.3825 -#> 497: 93.9787 -1.9213 -4.0824 0.0120 6.0856 0.7178 2.6653 0.2304 5.3834 -#> 498: 93.9771 -1.9220 -4.0822 0.0123 6.0759 0.7181 2.6660 0.2308 5.3850 -#> 499: 93.9744 -1.9225 -4.0819 0.0125 6.0692 0.7183 2.6666 0.2311 5.3868 -#> 500: 93.9728 -1.9229 -4.0816 0.0129 6.0609 0.7184 2.6675 0.2314 5.3884
#> Calculating covariance matrix
#>
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → compiling EBE model...
#>
#> done
#> Calculating residuals/tables
#> done
f_nlmixr_dfop_focei <- nlmixr(f_mmkin_parent["DFOP", ], est = "focei") -
#> parameter labels from comments are typically ignored in non-interactive mode
#> Need to run with the source intact to parse comments
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → calculate jacobian
#>
#> → calculate sensitivities
#>
#> → calculate ∂(f)/∂(η)
#>
#> → calculate ∂(R²)/∂(η)
#>
#> → finding duplicate expressions in inner model...
#>
#> → optimizing duplicate expressions in inner model...
#>
#> → finding duplicate expressions in EBE model...
#>
#> → optimizing duplicate expressions in EBE model...
#>
#> → compiling inner model...
#>
#> done
#> → finding duplicate expressions in FD model...
#>
#> → optimizing duplicate expressions in FD model...
#>
#> → compiling EBE model...
#>
#> done
#> → compiling events FD model...
#>
#> done
#> Key: U: Unscaled Parameters; X: Back-transformed parameters; G: Gill difference gradient approximation -#> F: Forward difference gradient approximation -#> C: Central difference gradient approximation -#> M: Mixed forward and central difference gradient approximation -#> Unscaled parameters for Omegas=chol(solve(omega)); -#> Diagonals are transformed, as specified by foceiControl(diagXform=) -#> |-----+---------------+-----------+-----------+-----------+-----------| -#> | #| Objective Fun | parent_0 | log_k1 | log_k2 | g_qlogis | -#> |.....................| sigma | o1 | o2 | o3 | -#> |.....................| o4 |...........|...........|...........| -#> | 1| 319.20504 | 1.000 | -0.9516 | -1.000 | -0.9121 | -#> |.....................| -0.8747 | -0.8993 | -0.8937 | -0.8958 | -#> |.....................| -0.8908 |...........|...........|...........| -#> | U| 319.20504 | 94.08 | -1.834 | -4.211 | 0.1100 | -#> |.....................| 1.947 | 0.7373 | 1.015 | 0.9087 | -#> |.....................| 1.155 |...........|...........|...........| -#> | X| 319.20504 | 94.08 | 0.1597 | 0.01483 | 0.5275 | -#> |.....................| 1.947 | 0.7373 | 1.015 | 0.9087 | -#> |.....................| 1.155 |...........|...........|...........| -#> | G| Gill Diff. | 17.25 | -0.06517 | -0.2231 | 0.05323 | -#> |.....................| -31.06 | 10.54 | -5.521 | 3.149 | -#> |.....................| -10.19 |...........|...........|...........| -#> | 2| 930.59637 | 0.5572 | -0.9500 | -0.9943 | -0.9135 | -#> |.....................| -0.07749 | -1.170 | -0.7520 | -0.9767 | -#> |.....................| -0.6292 |...........|...........|...........| -#> | U| 930.59637 | 52.42 | -1.832 | -4.205 | 0.1099 | -#> |.....................| 2.723 | 0.5378 | 1.159 | 0.8352 | -#> |.....................| 1.457 |...........|...........|...........| -#> | X| 930.59637 | 52.42 | 0.1600 | 0.01492 | 0.5274 | -#> |.....................| 2.723 | 0.5378 | 1.159 | 0.8352 | -#> |.....................| 1.457 |...........|...........|...........| -#> | 3| 366.81009 | 0.9557 | -0.9515 | -0.9994 | -0.9122 | -#> |.....................| -0.7950 | -0.9264 | -0.8795 | -0.9039 | -#> |.....................| -0.8647 |...........|...........|...........| -#> | U| 366.81009 | 89.92 | -1.834 | -4.210 | 0.1100 | -#> |.....................| 2.024 | 0.7174 | 1.030 | 0.9013 | -#> |.....................| 1.185 |...........|...........|...........| -#> | X| 366.81009 | 89.92 | 0.1598 | 0.01484 | 0.5275 | -#> |.....................| 2.024 | 0.7174 | 1.030 | 0.9013 | -#> |.....................| 1.185 |...........|...........|...........| -#> | 4| 354.05577 | 0.9956 | -0.9516 | -0.9999 | -0.9121 | -#> |.....................| -0.8667 | -0.9020 | -0.8922 | -0.8966 | -#> |.....................| -0.8882 |...........|...........|...........| -#> | U| 354.05577 | 93.67 | -1.834 | -4.211 | 0.1100 | -#> |.....................| 1.954 | 0.7353 | 1.017 | 0.9079 | -#> |.....................| 1.158 |...........|...........|...........| -#> | X| 354.05577 | 93.67 | 0.1597 | 0.01484 | 0.5275 | -#> |.....................| 1.954 | 0.7353 | 1.017 | 0.9079 | -#> |.....................| 1.158 |...........|...........|...........| -#> | 5| 354.18966 | 0.9996 | -0.9516 | -1.000 | -0.9121 | -#> |.....................| -0.8739 | -0.8996 | -0.8935 | -0.8959 | -#> |.....................| -0.8906 |...........|...........|...........| -#> | U| 354.18966 | 94.04 | -1.834 | -4.211 | 0.1100 | -#> |.....................| 1.947 | 0.7371 | 1.015 | 0.9086 | -#> |.....................| 1.155 |...........|...........|...........| -#> | X| 354.18966 | 94.04 | 0.1597 | 0.01483 | 0.5275 | -#> |.....................| 1.947 | 0.7371 | 1.015 | 0.9086 | -#> |.....................| 1.155 |...........|...........|...........| -#> | 6| 354.21855 | 1.000 | -0.9516 | -1.000 | -0.9121 | -#> |.....................| -0.8746 | -0.8993 | -0.8937 | -0.8958 | -#> |.....................| -0.8908 |...........|...........|...........| -#> | U| 354.21855 | 94.08 | -1.834 | -4.211 | 0.1100 | -#> |.....................| 1.947 | 0.7373 | 1.015 | 0.9087 | -#> |.....................| 1.155 |...........|...........|...........| -#> | X| 354.21855 | 94.08 | 0.1597 | 0.01483 | 0.5275 | -#> |.....................| 1.947 | 0.7373 | 1.015 | 0.9087 | -#> |.....................| 1.155 |...........|...........|...........| -#> | 7| 354.22159 | 1.000 | -0.9516 | -1.000 | -0.9121 | -#> |.....................| -0.8747 | -0.8993 | -0.8937 | -0.8958 | -#> |.....................| -0.8908 |...........|...........|...........| -#> | U| 354.22159 | 94.08 | -1.834 | -4.211 | 0.1100 | -#> |.....................| 1.947 | 0.7373 | 1.015 | 0.9087 | -#> |.....................| 1.155 |...........|...........|...........| -#> | X| 354.22159 | 94.08 | 0.1597 | 0.01483 | 0.5275 | -#> |.....................| 1.947 | 0.7373 | 1.015 | 0.9087 | -#> |.....................| 1.155 |...........|...........|...........| -#> | 8| 354.22201 | 1.000 | -0.9516 | -1.000 | -0.9121 | -#> |.....................| -0.8747 | -0.8993 | -0.8937 | -0.8958 | -#> |.....................| -0.8908 |...........|...........|...........| -#> | U| 354.22201 | 94.08 | -1.834 | -4.211 | 0.1100 | -#> |.....................| 1.947 | 0.7373 | 1.015 | 0.9087 | -#> |.....................| 1.155 |...........|...........|...........| -#> | X| 354.22201 | 94.08 | 0.1597 | 0.01483 | 0.5275 | -#> |.....................| 1.947 | 0.7373 | 1.015 | 0.9087 | -#> |.....................| 1.155 |...........|...........|...........| -#> | 9| 354.22204 | 1.000 | -0.9516 | -1.000 | -0.9121 | -#> |.....................| -0.8747 | -0.8993 | -0.8937 | -0.8958 | -#> |.....................| -0.8908 |...........|...........|...........| -#> | U| 354.22204 | 94.08 | -1.834 | -4.211 | 0.1100 | -#> |.....................| 1.947 | 0.7373 | 1.015 | 0.9087 | -#> |.....................| 1.155 |...........|...........|...........| -#> | X| 354.22204 | 94.08 | 0.1597 | 0.01483 | 0.5275 | -#> |.....................| 1.947 | 0.7373 | 1.015 | 0.9087 | -#> |.....................| 1.155 |...........|...........|...........| -#> | 10| 354.22204 | 1.000 | -0.9516 | -1.000 | -0.9121 | -#> |.....................| -0.8747 | -0.8993 | -0.8937 | -0.8958 | -#> |.....................| -0.8908 |...........|...........|...........| -#> | U| 354.22204 | 94.08 | -1.834 | -4.211 | 0.1100 | -#> |.....................| 1.947 | 0.7373 | 1.015 | 0.9087 | -#> |.....................| 1.155 |...........|...........|...........| -#> | X| 354.22204 | 94.08 | 0.1597 | 0.01483 | 0.5275 | -#> |.....................| 1.947 | 0.7373 | 1.015 | 0.9087 | -#> |.....................| 1.155 |...........|...........|...........| -#> | 11| 354.22204 | 1.000 | -0.9516 | -1.000 | -0.9121 | -#> |.....................| -0.8747 | -0.8993 | -0.8937 | -0.8958 | -#> |.....................| -0.8908 |...........|...........|...........| -#> | U| 354.22204 | 94.08 | -1.834 | -4.211 | 0.1100 | -#> |.....................| 1.947 | 0.7373 | 1.015 | 0.9087 | -#> |.....................| 1.155 |...........|...........|...........| -#> | X| 354.22204 | 94.08 | 0.1597 | 0.01483 | 0.5275 | -#> |.....................| 1.947 | 0.7373 | 1.015 | 0.9087 | -#> |.....................| 1.155 |...........|...........|...........| -#> | 12| 354.22204 | 1.000 | -0.9516 | -1.000 | -0.9121 | -#> |.....................| -0.8747 | -0.8993 | -0.8937 | -0.8958 | -#> |.....................| -0.8908 |...........|...........|...........| -#> | U| 354.22204 | 94.08 | -1.834 | -4.211 | 0.1100 | -#> |.....................| 1.947 | 0.7373 | 1.015 | 0.9087 | -#> |.....................| 1.155 |...........|...........|...........| -#> | X| 354.22204 | 94.08 | 0.1597 | 0.01483 | 0.5275 | -#> |.....................| 1.947 | 0.7373 | 1.015 | 0.9087 | -#> |.....................| 1.155 |...........|...........|...........| -#> | 13| 354.22204 | 1.000 | -0.9516 | -1.000 | -0.9121 | -#> |.....................| -0.8747 | -0.8993 | -0.8937 | -0.8958 | -#> |.....................| -0.8908 |...........|...........|...........| -#> | U| 354.22204 | 94.08 | -1.834 | -4.211 | 0.1100 | -#> |.....................| 1.947 | 0.7373 | 1.015 | 0.9087 | -#> |.....................| 1.155 |...........|...........|...........| -#> | X| 354.22204 | 94.08 | 0.1597 | 0.01483 | 0.5275 | -#> |.....................| 1.947 | 0.7373 | 1.015 | 0.9087 | -#> |.....................| 1.155 |...........|...........|...........| -#> | 14| 354.22204 | 1.000 | -0.9516 | -1.000 | -0.9121 | -#> |.....................| -0.8747 | -0.8993 | -0.8937 | -0.8958 | -#> |.....................| -0.8908 |...........|...........|...........| -#> | U| 354.22204 | 94.08 | -1.834 | -4.211 | 0.1100 | -#> |.....................| 1.947 | 0.7373 | 1.015 | 0.9087 | -#> |.....................| 1.155 |...........|...........|...........| -#> | X| 354.22204 | 94.08 | 0.1597 | 0.01483 | 0.5275 | -#> |.....................| 1.947 | 0.7373 | 1.015 | 0.9087 | -#> |.....................| 1.155 |...........|...........|...........| -#> | 15| 354.22200 | 1.000 | -0.9516 | -1.000 | -0.9121 | -#> |.....................| -0.8747 | -0.8993 | -0.8937 | -0.8958 | -#> |.....................| -0.8908 |...........|...........|...........| -#> | U| 354.222 | 94.08 | -1.834 | -4.211 | 0.1100 | -#> |.....................| 1.947 | 0.7373 | 1.015 | 0.9087 | -#> |.....................| 1.155 |...........|...........|...........| -#> | X| 354.222 | 94.08 | 0.1597 | 0.01483 | 0.5275 | -#> |.....................| 1.947 | 0.7373 | 1.015 | 0.9087 | -#> |.....................| 1.155 |...........|...........|...........| -#> | 16| 354.22200 | 1.000 | -0.9516 | -1.000 | -0.9121 | -#> |.....................| -0.8747 | -0.8993 | -0.8937 | -0.8958 | -#> |.....................| -0.8908 |...........|...........|...........| -#> | U| 354.222 | 94.08 | -1.834 | -4.211 | 0.1100 | -#> |.....................| 1.947 | 0.7373 | 1.015 | 0.9087 | -#> |.....................| 1.155 |...........|...........|...........| -#> | X| 354.222 | 94.08 | 0.1597 | 0.01483 | 0.5275 | -#> |.....................| 1.947 | 0.7373 | 1.015 | 0.9087 | -#> |.....................| 1.155 |...........|...........|...........| -#> | 17| 354.22200 | 1.000 | -0.9516 | -1.000 | -0.9121 | -#> |.....................| -0.8747 | -0.8993 | -0.8937 | -0.8958 | -#> |.....................| -0.8908 |...........|...........|...........| -#> | U| 354.222 | 94.08 | -1.834 | -4.211 | 0.1100 | -#> |.....................| 1.947 | 0.7373 | 1.015 | 0.9087 | -#> |.....................| 1.155 |...........|...........|...........| -#> | X| 354.222 | 94.08 | 0.1597 | 0.01483 | 0.5275 | -#> |.....................| 1.947 | 0.7373 | 1.015 | 0.9087 | -#> |.....................| 1.155 |...........|...........|...........| -#> calculating covariance matrix +f_nlmixr_dfop_saem <- nlmixr(f_mmkin_parent["DFOP", ], est = "saem", + control = saemControl(print = 0)) +
#> parameter labels from comments are typically ignored in non-interactive mode
#> Need to run with the source intact to parse comments
#>
#> → generate SAEM model
#> done
#> Calculating covariance matrix
#>
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → compiling EBE model...
#>
#> done
#> Calculating residuals/tables
#> done
f_nlmixr_dfop_focei <- nlmixr(f_mmkin_parent["DFOP", ], est = "focei", + control = foceiControl(print = 0)) +
#> parameter labels from comments are typically ignored in non-interactive mode
#> Need to run with the source intact to parse comments
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → calculate jacobian
#>
#> → calculate sensitivities
#>
#> → calculate ∂(f)/∂(η)
#>
#> → calculate ∂(R²)/∂(η)
#>
#> → finding duplicate expressions in inner model...
#>
#> → optimizing duplicate expressions in inner model...
#>
#> → finding duplicate expressions in EBE model...
#>
#> → optimizing duplicate expressions in EBE model...
#>
#> → compiling inner model...
#>
#> done
#> → finding duplicate expressions in FD model...
#>
#> → optimizing duplicate expressions in FD model...
#>
#> → compiling EBE model...
#>
#> done
#> → compiling events FD model...
#>
#> done
#> calculating covariance matrix #> done
#> Calculating residuals/tables
#> done
#> Warning: initial ETAs were nudged; (can control by foceiControl(etaNudge=., etaNudge2=))
#> Warning: last objective function was not at minimum, possible problems in optimization
#> Warning: gradient problems with initial estimate and covariance; see $scaleInfo
-f_nlmixr_hs_saem <- nlmixr(f_mmkin_parent["HS", ], est = "saem") -
#> parameter labels from comments are typically ignored in non-interactive mode
#> Need to run with the source intact to parse comments
#>
#> → generate SAEM model
#> done
#> 1: 93.5894 -2.4029 -3.9815 2.0318 3.0448 0.8581 1.0844 0.3182 21.0327 -#> 2: 93.5363 -2.3652 -3.9374 1.9473 2.8925 0.8152 1.0302 0.3023 14.7642 -#> 3: 93.3061 -2.3950 -3.8630 1.9537 2.7479 0.7744 1.0729 0.2872 12.2332 -#> 4: 93.4757 -2.3967 -3.8509 1.9504 2.6105 0.7357 1.1580 0.2729 11.6140 -#> 5: 93.6045 -2.3957 -3.8593 1.9732 2.4800 0.6989 1.1001 0.2592 11.0776 -#> 6: 93.6138 -2.4089 -3.9577 1.9557 2.8119 0.6640 1.0451 0.2463 11.5001 -#> 7: 93.4125 -2.3879 -3.8924 1.9950 3.1015 0.6308 1.0649 0.2339 10.6133 -#> 8: 93.5798 -2.3850 -3.9314 1.9888 3.0019 0.5992 1.0116 0.2222 10.4278 -#> 9: 93.1493 -2.3918 -3.9011 2.0040 4.3802 0.5693 1.0723 0.2111 10.2172 -#> 10: 93.5411 -2.3906 -3.8778 1.9664 4.5606 0.5408 1.0616 0.2006 10.1244 -#> 11: 93.3749 -2.4011 -3.8586 1.9682 4.3326 0.5138 1.0696 0.1905 10.1145 -#> 12: 93.0136 -2.3943 -3.8530 1.9633 4.1160 0.4881 1.0606 0.1810 10.0091 -#> 13: 93.1809 -2.4059 -3.9088 1.9821 3.9102 0.5448 1.0076 0.1720 9.8058 -#> 14: 93.3891 -2.4107 -3.9285 1.9894 3.7147 0.5504 0.9810 0.1634 10.2784 -#> 15: 93.4041 -2.4114 -3.9711 2.0216 4.4250 0.6070 0.9495 0.1552 9.4036 -#> 16: 93.4244 -2.4191 -4.0366 2.0511 4.2037 0.6035 0.9020 0.1474 10.0835 -#> 17: 93.6295 -2.4103 -4.0143 2.0509 4.0926 0.5997 0.8599 0.1401 9.7686 -#> 18: 93.6653 -2.4165 -3.9724 2.0405 3.8880 0.5979 0.9046 0.1331 9.6299 -#> 19: 93.6510 -2.4088 -3.9969 2.0328 3.6936 0.5934 0.9181 0.1264 9.3236 -#> 20: 93.6048 -2.4117 -3.9552 2.0268 3.9084 0.5879 1.0078 0.1201 9.6618 -#> 21: 94.0961 -2.4193 -3.9812 2.0552 3.7456 0.5743 0.9574 0.1141 9.6510 -#> 22: 93.9157 -2.4202 -3.9102 2.0263 5.0447 0.6198 0.9742 0.1294 9.6463 -#> 23: 94.1580 -2.4286 -3.9223 2.0441 4.7925 0.5981 0.9312 0.1230 9.8346 -#> 24: 94.4405 -2.4141 -3.9564 2.0383 4.5529 0.5925 0.9173 0.1168 10.6161 -#> 25: 93.8846 -2.3958 -4.0122 2.0053 4.9956 0.5677 0.8715 0.1173 10.3823 -#> 26: 93.6815 -2.3835 -3.9801 1.9872 5.6625 0.5514 0.8368 0.1114 9.8283 -#> 27: 93.6463 -2.3779 -3.9731 1.9833 5.3794 0.5566 0.8650 0.1059 9.5439 -#> 28: 93.7974 -2.3980 -3.9583 1.9657 6.4804 0.5366 0.8756 0.1006 9.7998 -#> 29: 93.6921 -2.4221 -3.8982 1.9701 6.1564 0.6070 0.9713 0.0955 9.2988 -#> 30: 93.3112 -2.4200 -3.8916 1.9702 6.6968 0.6110 0.9538 0.0908 9.1812 -#> 31: 93.9900 -2.4282 -3.9448 2.0257 6.3620 0.6071 0.9061 0.0862 9.4865 -#> 32: 93.8014 -2.4241 -3.9364 2.0053 6.8497 0.6173 0.8608 0.0819 9.5589 -#> 33: 94.0330 -2.4215 -3.9888 2.0034 6.5072 0.6142 0.8178 0.0778 10.2023 -#> 34: 93.5811 -2.4215 -3.9917 2.0170 6.1819 0.5907 0.8314 0.0842 10.2204 -#> 35: 93.9308 -2.4210 -3.8798 2.0046 6.7593 0.5877 1.1132 0.0800 9.2384 -#> 36: 94.0000 -2.4325 -3.8970 2.0457 6.4213 0.5886 1.0731 0.0835 8.8987 -#> 37: 93.4010 -2.4325 -3.9306 2.0550 7.2268 0.5886 1.0220 0.0969 9.1261 -#> 38: 93.3896 -2.4291 -3.9250 2.0148 6.8655 0.5885 0.9709 0.1039 9.2989 -#> 39: 93.3821 -2.4349 -3.9148 2.0368 6.5222 0.6059 0.9647 0.1095 9.2864 -#> 40: 93.1382 -2.4685 -3.9384 2.1083 8.6249 0.6287 1.0265 0.1066 9.6411 -#> 41: 92.7963 -2.4643 -3.8992 2.0585 8.1937 0.6376 1.1117 0.1234 9.4738 -#> 42: 92.7160 -2.4545 -3.9652 2.0680 7.7840 0.6068 1.0561 0.1173 9.4776 -#> 43: 93.0070 -2.4360 -4.0223 2.0624 7.9556 0.5840 1.0033 0.1114 9.7197 -#> 44: 93.3836 -2.4207 -4.0739 2.0872 7.5578 0.5788 0.9531 0.1058 10.3515 -#> 45: 93.3240 -2.4382 -4.0210 2.1103 7.1799 0.6211 0.9055 0.1165 10.5050 -#> 46: 93.1921 -2.4438 -4.0330 2.0842 7.3884 0.6159 0.8602 0.1107 10.7251 -#> 47: 92.9710 -2.4351 -4.0155 2.1117 7.0189 0.5998 0.8519 0.1091 10.2972 -#> 48: 93.0129 -2.4395 -3.9677 2.0986 6.6680 0.5804 0.8775 0.1058 10.8515 -#> 49: 92.6562 -2.4474 -4.0295 2.0877 6.3346 0.6338 0.8723 0.1155 10.0641 -#> 50: 92.5101 -2.4612 -4.0295 2.0845 6.0179 0.6197 0.8742 0.1097 9.9048 -#> 51: 92.9446 -2.4615 -3.9927 2.1199 5.7170 0.6165 0.9311 0.1042 9.8383 -#> 52: 92.8362 -2.4525 -3.9682 2.0787 5.4311 0.6329 0.9647 0.0990 9.0726 -#> 53: 92.8579 -2.4598 -3.9324 2.0529 5.1596 0.6057 0.9192 0.0940 9.5677 -#> 54: 92.8667 -2.4858 -3.9104 2.0454 5.0661 0.6304 1.0025 0.0893 9.0977 -#> 55: 93.2327 -2.4650 -3.8323 2.0628 6.8188 0.6499 1.1366 0.0852 8.5677 -#> 56: 92.9319 -2.4794 -3.8376 2.0490 6.4778 0.6635 1.1141 0.1064 9.0723 -#> 57: 93.1126 -2.5128 -3.8223 2.0834 6.1539 0.6637 1.1361 0.1010 9.2678 -#> 58: 93.5085 -2.4894 -3.8723 2.0650 5.8462 0.6745 1.0793 0.0960 9.0367 -#> 59: 93.7882 -2.4614 -3.9241 2.0707 5.5539 0.6898 1.0254 0.0912 8.7466 -#> 60: 94.1492 -2.4386 -3.9415 2.0599 5.2762 0.6711 0.9741 0.0932 8.4466 -#> 61: 94.4215 -2.4272 -3.9647 2.0482 5.0124 0.6549 0.9254 0.0911 8.7870 -#> 62: 94.3607 -2.4053 -3.9633 1.9966 4.7618 0.6534 0.8878 0.1221 9.0404 -#> 63: 94.3958 -2.4179 -3.9386 2.0041 4.5237 0.6462 0.9360 0.1245 9.0491 -#> 64: 94.5204 -2.4175 -3.9411 2.0106 4.2975 0.6532 0.9657 0.1183 8.9115 -#> 65: 94.5674 -2.4117 -3.9701 2.0546 4.0826 0.6438 0.9238 0.1247 8.7293 -#> 66: 94.2199 -2.4337 -3.9298 2.0287 4.7686 0.6582 0.9262 0.1185 9.0519 -#> 67: 94.2756 -2.4305 -3.9706 2.0782 4.5301 0.6512 0.8799 0.1126 9.1397 -#> 68: 94.4195 -2.4193 -4.0049 2.0643 4.3036 0.6804 0.8359 0.1220 9.5306 -#> 69: 94.5255 -2.4183 -4.0119 2.0733 4.0884 0.6784 0.8577 0.1297 9.4535 -#> 70: 94.5668 -2.4117 -3.9662 2.0762 4.2149 0.6511 0.9325 0.1475 9.1637 -#> 71: 94.7464 -2.4147 -3.9937 2.0942 4.2418 0.6571 0.9524 0.1540 9.6576 -#> 72: 94.4869 -2.4160 -4.0050 2.1075 4.8520 0.6687 1.0119 0.1488 9.4234 -#> 73: 94.3747 -2.4423 -4.0072 2.1484 6.4364 0.6948 1.0011 0.1438 9.1490 -#> 74: 94.3997 -2.4464 -4.0147 2.1965 6.1146 0.7030 1.0566 0.1521 9.0697 -#> 75: 94.4187 -2.4566 -3.9611 2.1337 5.8089 0.6866 1.1666 0.1656 8.9436 -#> 76: 94.4381 -2.4502 -3.9816 2.1209 5.6488 0.7266 1.1449 0.1573 8.9289 -#> 77: 94.6421 -2.4446 -3.9603 2.1544 5.3663 0.6968 1.2087 0.1662 8.5186 -#> 78: 94.8397 -2.4420 -3.9690 2.1380 5.0980 0.6969 1.1833 0.1578 8.9071 -#> 79: 94.4296 -2.4547 -3.9576 2.1569 6.3095 0.6829 1.1850 0.1544 9.1345 -#> 80: 93.9628 -2.4530 -3.9312 2.0956 8.5844 0.6880 1.2548 0.1835 8.6936 -#> 81: 94.2900 -2.4687 -3.8570 2.0779 9.0596 0.6993 1.2012 0.1743 8.9092 -#> 82: 93.9652 -2.4742 -3.9261 2.0913 8.6066 0.6970 1.1667 0.1656 8.4359 -#> 83: 94.0828 -2.4739 -3.8603 2.0587 8.1763 0.7123 1.2575 0.1638 8.5431 -#> 84: 93.5926 -2.4645 -3.8993 2.0391 9.8721 0.7178 1.1947 0.1556 8.5623 -#> 85: 93.7052 -2.4692 -3.8411 2.0448 9.3785 0.7251 1.1349 0.1478 8.5558 -#> 86: 93.8043 -2.4726 -3.9028 2.0745 8.9096 0.7064 1.0782 0.1404 9.1308 -#> 87: 93.5704 -2.4836 -3.8694 2.0999 12.3224 0.7284 1.0922 0.1334 8.8645 -#> 88: 93.5715 -2.4827 -3.9202 2.0861 11.7063 0.7541 1.0376 0.1267 9.2433 -#> 89: 93.6894 -2.4720 -3.8964 2.1093 12.4610 0.7727 1.0218 0.1325 9.0321 -#> 90: 93.2881 -2.4787 -3.9464 2.1137 11.8380 0.7850 0.9707 0.1258 8.8265 -#> 91: 93.8454 -2.4626 -3.9566 2.1181 11.2461 0.7620 0.9579 0.1396 8.8279 -#> 92: 93.8268 -2.4639 -3.8951 2.0936 10.6838 0.7618 1.1083 0.1553 8.4609 -#> 93: 94.0622 -2.4853 -3.8531 2.0740 10.1496 0.7493 1.1237 0.1596 8.2057 -#> 94: 93.6190 -2.4843 -3.8857 2.0625 9.6421 0.7596 1.1104 0.1686 8.3522 -#> 95: 93.6352 -2.4725 -3.9243 2.0582 9.1600 0.7732 1.0549 0.1694 8.3993 -#> 96: 93.5291 -2.4707 -3.9318 2.0612 8.7020 0.7853 1.0639 0.1609 8.2908 -#> 97: 93.0626 -2.4639 -3.9255 2.0887 8.4092 0.7717 1.1477 0.1685 8.2710 -#> 98: 93.3712 -2.4677 -3.9642 2.1350 7.9888 0.7703 1.0903 0.1921 8.5468 -#> 99: 93.7108 -2.4848 -3.9775 2.1733 7.5893 0.7490 1.0367 0.1825 8.5629 -#> 100: 94.1114 -2.4867 -4.0111 2.1705 7.2099 0.7446 0.9849 0.1832 8.6964 -#> 101: 93.7547 -2.4897 -3.9793 2.1817 7.1755 0.7513 0.9899 0.1774 8.5077 -#> 102: 93.8818 -2.5029 -3.9929 2.2028 6.8167 0.7137 1.0045 0.1685 8.3706 -#> 103: 94.0026 -2.5094 -3.9680 2.2059 6.4759 0.7073 1.0498 0.1601 8.3087 -#> 104: 93.5946 -2.5260 -3.9640 2.2209 6.2674 0.7688 1.0548 0.1531 8.3444 -#> 105: 93.3863 -2.5431 -4.0087 2.2211 7.1040 0.7987 1.0020 0.1454 8.2210 -#> 106: 93.1536 -2.5365 -4.0243 2.2457 6.7488 0.7909 0.9519 0.1389 8.0950 -#> 107: 93.2220 -2.5446 -4.0016 2.2508 6.4114 0.8108 0.9483 0.1364 8.5629 -#> 108: 93.0778 -2.5470 -3.9678 2.2329 6.4774 0.8077 1.0081 0.1850 9.2740 -#> 109: 93.8925 -2.5453 -3.9560 2.2193 6.1535 0.8079 1.0608 0.2111 9.2651 -#> 110: 94.3171 -2.5179 -4.0040 2.2145 5.8458 0.7874 1.0520 0.2135 8.9788 -#> 111: 94.0655 -2.5069 -3.9752 2.2009 5.5536 0.8056 1.1206 0.2192 8.9410 -#> 112: 93.8552 -2.4994 -3.9791 2.1597 5.2759 0.8012 1.0646 0.2365 8.9570 -#> 113: 93.5190 -2.5053 -3.9760 2.1727 5.0121 0.8326 1.0114 0.2246 9.2154 -#> 114: 93.5531 -2.5083 -3.9569 2.1636 4.7615 0.8255 0.9879 0.2134 9.1197 -#> 115: 93.4780 -2.5217 -3.9467 2.1529 4.5234 0.8314 1.0392 0.2027 8.7850 -#> 116: 93.5707 -2.5216 -3.9098 2.1667 4.2972 0.8261 1.1213 0.1926 9.2991 -#> 117: 93.6610 -2.5445 -3.8775 2.1473 4.0824 0.8122 1.1232 0.1830 9.2054 -#> 118: 93.4315 -2.5251 -3.9166 2.1365 4.6012 0.7933 1.0690 0.1738 8.8061 -#> 119: 93.2491 -2.5265 -3.9236 2.1671 5.0672 0.8046 1.0711 0.1709 8.2293 -#> 120: 93.2605 -2.5327 -3.9714 2.1984 4.8138 0.8025 1.0176 0.1623 7.9088 -#> 121: 93.5831 -2.5448 -3.9669 2.2195 4.5731 0.8079 0.9921 0.1542 8.2211 -#> 122: 93.3408 -2.5460 -3.9710 2.2235 4.6838 0.8053 1.0377 0.1658 8.2934 -#> 123: 93.4581 -2.5395 -3.9487 2.2279 4.4496 0.8298 1.0338 0.1732 8.2859 -#> 124: 93.0562 -2.5565 -3.9587 2.2299 4.2272 0.8590 1.0531 0.1964 8.1244 -#> 125: 93.0576 -2.5660 -3.9434 2.2457 4.0158 0.8564 1.0768 0.1866 8.3730 -#> 126: 92.8366 -2.5571 -3.9463 2.2096 3.8150 0.8551 1.0476 0.1773 8.3820 -#> 127: 92.9607 -2.5595 -3.9773 2.2325 3.6243 0.8497 0.9952 0.1684 9.2276 -#> 128: 93.0655 -2.5463 -3.9731 2.1901 3.4430 0.8903 0.9454 0.1600 8.8096 -#> 129: 93.0669 -2.5467 -3.9713 2.2204 3.2709 0.8905 0.9234 0.1520 8.8686 -#> 130: 93.2036 -2.5524 -3.9702 2.2070 3.1073 0.8719 0.9514 0.1578 8.8433 -#> 131: 93.3565 -2.5544 -3.9809 2.1654 2.9520 0.8777 0.9117 0.1764 8.9770 -#> 132: 93.0371 -2.5364 -3.9250 2.1761 2.8044 0.8338 1.0518 0.1731 8.5405 -#> 133: 93.5727 -2.5388 -3.8759 2.1580 3.6769 0.8616 1.0981 0.1858 8.5303 -#> 134: 93.4962 -2.5341 -3.9006 2.1394 4.3695 0.8904 1.0432 0.1765 8.7067 -#> 135: 93.3219 -2.5413 -3.8922 2.1888 4.1510 0.8971 1.0435 0.1857 8.4977 -#> 136: 93.3582 -2.5477 -3.8412 2.1957 3.9435 0.8816 1.1954 0.2102 8.1330 -#> 137: 93.2791 -2.5313 -3.8936 2.1570 3.7463 0.8875 1.1356 0.1997 8.3094 -#> 138: 93.0890 -2.5428 -3.8910 2.1414 3.5590 0.8826 1.1008 0.2120 8.2653 -#> 139: 93.2404 -2.5407 -3.8926 2.1727 3.3810 0.8829 1.1068 0.2014 8.3739 -#> 140: 93.0870 -2.5514 -3.9131 2.2182 3.2120 0.8712 1.0870 0.1914 8.6179 -#> 141: 93.2715 -2.5499 -3.9460 2.2216 3.4383 0.8470 1.0662 0.1900 8.4034 -#> 142: 93.1915 -2.5583 -3.9990 2.2475 5.2653 0.8607 1.0129 0.2061 7.9891 -#> 143: 93.3709 -2.5650 -3.9422 2.2369 5.0020 0.8748 1.2043 0.2248 8.0084 -#> 144: 93.2092 -2.5706 -3.9016 2.1930 4.7519 0.8667 1.1977 0.2179 8.2733 -#> 145: 92.6640 -2.5733 -3.9225 2.1859 4.5143 0.8636 1.1695 0.2070 8.6212 -#> 146: 92.7581 -2.5695 -3.9055 2.1801 5.4209 0.8589 1.1678 0.1967 8.9378 -#> 147: 93.1089 -2.5707 -3.9825 2.2113 7.6640 0.8710 1.1094 0.1934 9.0543 -#> 148: 93.0803 -2.5672 -3.9461 2.2066 9.9043 0.8648 1.1043 0.1863 8.6209 -#> 149: 92.6332 -2.5468 -3.9425 2.1881 9.4091 0.8278 1.1313 0.1769 8.4652 -#> 150: 92.9068 -2.5440 -3.9531 2.2005 8.9386 0.8189 1.1104 0.1681 8.4196 -#> 151: 92.7324 -2.5497 -3.9648 2.2387 8.4917 0.8205 1.1421 0.1597 8.4228 -#> 152: 93.0394 -2.5282 -3.9916 2.2251 3.9029 0.8190 1.0320 0.1612 8.3453 -#> 153: 93.3137 -2.5268 -3.9993 2.2294 3.7951 0.8187 1.0311 0.1780 8.4258 -#> 154: 93.6677 -2.5264 -3.9756 2.2615 4.8704 0.8177 1.1355 0.1799 8.7204 -#> 155: 94.0822 -2.5409 -4.0456 2.2507 5.1202 0.8032 0.9930 0.1613 8.8844 -#> 156: 93.6289 -2.5388 -4.1150 2.2777 4.6367 0.8080 0.8336 0.1817 8.4370 -#> 157: 93.9171 -2.5327 -4.0218 2.2696 3.1121 0.8069 1.0394 0.1800 8.5006 -#> 158: 94.0010 -2.5357 -4.0036 2.2695 3.1485 0.8087 1.1132 0.2048 8.7160 -#> 159: 94.1277 -2.5541 -3.9717 2.2773 5.1432 0.8088 1.0732 0.1980 8.5378 -#> 160: 94.0075 -2.5436 -3.9550 2.2796 4.7826 0.8286 1.0820 0.1953 8.3885 -#> 161: 93.6793 -2.5471 -3.9675 2.2713 3.9366 0.8603 1.0682 0.1972 8.3026 -#> 162: 93.2649 -2.5429 -3.9564 2.2406 2.7349 0.8469 1.0889 0.1929 8.3765 -#> 163: 93.2072 -2.5519 -3.9786 2.2535 3.1500 0.8361 1.1240 0.1997 8.4527 -#> 164: 93.4059 -2.5471 -4.0398 2.2257 2.8708 0.8284 1.0541 0.2105 8.4984 -#> 165: 93.2579 -2.5407 -3.9665 2.2305 2.7397 0.8251 1.1355 0.2302 7.9794 -#> 166: 93.4900 -2.5465 -3.9565 2.2316 1.9775 0.8359 1.0939 0.2243 8.1279 -#> 167: 93.3825 -2.5567 -3.9784 2.2276 2.3737 0.8251 1.0894 0.2254 8.6657 -#> 168: 93.2568 -2.5681 -3.9993 2.2818 2.6721 0.8237 1.1398 0.2207 8.4894 -#> 169: 93.0484 -2.5468 -3.9693 2.2586 1.9105 0.8518 1.1911 0.1917 8.5627 -#> 170: 93.2703 -2.5730 -3.9059 2.2512 2.1481 0.8068 1.3267 0.2198 8.2260 -#> 171: 93.2041 -2.5720 -3.8992 2.2227 2.7790 0.8045 1.2387 0.2059 8.1401 -#> 172: 92.7596 -2.5722 -3.8802 2.2537 2.9977 0.8049 1.2807 0.1831 8.3375 -#> 173: 92.7734 -2.5716 -3.8811 2.1987 3.0176 0.8063 1.3070 0.2285 8.5061 -#> 174: 92.5561 -2.5700 -3.9236 2.2351 3.0286 0.8250 1.2000 0.2200 8.0725 -#> 175: 92.5072 -2.5724 -3.9968 2.2479 2.4287 0.8333 1.0169 0.2235 8.2600 -#> 176: 92.3531 -2.5787 -3.9977 2.2407 2.9999 0.8167 0.9813 0.2451 8.7505 -#> 177: 92.4672 -2.5746 -4.0095 2.2733 2.8040 0.8361 0.9794 0.2363 8.5176 -#> 178: 92.5747 -2.5981 -3.9921 2.2835 1.8203 0.8411 0.9795 0.2112 8.8034 -#> 179: 92.7101 -2.5766 -3.9697 2.2337 1.7808 0.8348 1.0402 0.2247 8.3952 -#> 180: 92.5348 -2.5714 -3.9595 2.2236 1.2661 0.8361 1.0107 0.2375 8.7156 -#> 181: 92.7241 -2.5730 -3.9205 2.2162 1.1047 0.8321 1.1192 0.2147 8.8821 -#> 182: 92.9177 -2.5864 -3.9351 2.2280 1.2069 0.8108 1.1022 0.2163 8.5703 -#> 183: 92.8646 -2.5704 -3.9755 2.2192 1.5680 0.8232 0.9400 0.1848 8.6586 -#> 184: 92.8081 -2.5759 -3.9981 2.2411 1.7739 0.8394 0.8711 0.1788 8.6327 -#> 185: 92.6830 -2.5700 -4.0110 2.2360 1.5375 0.8093 0.9114 0.1782 8.6703 -#> 186: 92.7691 -2.5764 -3.9671 2.2148 1.8813 0.8117 0.9794 0.1901 8.4813 -#> 187: 92.7540 -2.5659 -3.9695 2.2543 1.3755 0.8130 1.0332 0.1960 8.5371 -#> 188: 92.5722 -2.5650 -3.9527 2.2552 1.4000 0.8142 1.1013 0.1881 8.2025 -#> 189: 92.9404 -2.5644 -3.9446 2.2579 1.3589 0.8157 1.1262 0.1741 8.2347 -#> 190: 92.8142 -2.5628 -3.9397 2.2549 1.1871 0.8241 1.1571 0.1728 8.1590 -#> 191: 92.7352 -2.5682 -3.9476 2.2502 0.8302 0.7954 1.1448 0.1859 8.6148 -#> 192: 92.7380 -2.5574 -3.9273 2.2318 0.6692 0.8185 1.1124 0.1932 8.5279 -#> 193: 92.9199 -2.5652 -3.9586 2.2184 0.9877 0.8097 1.1689 0.1709 8.7071 -#> 194: 93.0042 -2.5651 -3.9699 2.2302 1.3311 0.8135 1.1202 0.1832 8.8051 -#> 195: 92.8090 -2.5890 -3.9799 2.2360 0.9251 0.8313 1.0192 0.1806 9.3110 -#> 196: 92.5114 -2.5894 -3.9883 2.2553 0.8504 0.8299 1.0665 0.1855 8.9668 -#> 197: 92.6704 -2.5845 -3.9577 2.2490 0.3567 0.8365 1.0893 0.1896 8.5856 -#> 198: 92.7249 -2.5753 -3.9775 2.2327 0.4282 0.8506 1.0736 0.2003 8.7110 -#> 199: 92.5538 -2.5696 -3.9550 2.2382 0.3177 0.8550 1.1060 0.2132 8.5431 -#> 200: 92.6352 -2.5716 -3.9921 2.2372 0.2500 0.8592 1.0083 0.2057 8.5811 -#> 201: 92.6440 -2.5663 -3.9931 2.2219 0.2611 0.8647 1.0130 0.1931 8.6428 -#> 202: 92.6090 -2.5633 -3.9837 2.2198 0.2389 0.8680 1.0373 0.1958 8.6818 -#> 203: 92.6180 -2.5627 -3.9823 2.2185 0.2315 0.8627 1.0398 0.1939 8.6310 -#> 204: 92.6140 -2.5628 -3.9783 2.2176 0.2289 0.8588 1.0462 0.1923 8.5391 -#> 205: 92.6337 -2.5619 -3.9802 2.2190 0.2227 0.8579 1.0407 0.1965 8.5514 -#> 206: 92.6373 -2.5615 -3.9835 2.2175 0.2313 0.8580 1.0330 0.2006 8.5635 -#> 207: 92.6403 -2.5594 -3.9836 2.2189 0.2365 0.8608 1.0282 0.2017 8.5721 -#> 208: 92.6415 -2.5587 -3.9862 2.2192 0.2480 0.8615 1.0221 0.2001 8.5738 -#> 209: 92.6303 -2.5586 -3.9872 2.2180 0.2544 0.8608 1.0127 0.1966 8.6159 -#> 210: 92.6278 -2.5584 -3.9829 2.2178 0.2577 0.8576 1.0149 0.1932 8.6336 -#> 211: 92.6320 -2.5580 -3.9844 2.2163 0.2614 0.8544 1.0057 0.1902 8.6594 -#> 212: 92.6266 -2.5576 -3.9802 2.2140 0.2554 0.8515 1.0125 0.1891 8.6549 -#> 213: 92.6226 -2.5570 -3.9771 2.2114 0.2491 0.8468 1.0201 0.1879 8.6612 -#> 214: 92.6217 -2.5570 -3.9759 2.2119 0.2430 0.8429 1.0289 0.1859 8.6700 -#> 215: 92.6212 -2.5573 -3.9743 2.2121 0.2354 0.8394 1.0383 0.1853 8.6796 -#> 216: 92.6151 -2.5566 -3.9736 2.2125 0.2329 0.8378 1.0446 0.1850 8.7036 -#> 217: 92.6073 -2.5558 -3.9759 2.2133 0.2311 0.8373 1.0459 0.1854 8.7185 -#> 218: 92.6090 -2.5556 -3.9771 2.2142 0.2312 0.8373 1.0499 0.1866 8.7181 -#> 219: 92.6166 -2.5553 -3.9764 2.2142 0.2358 0.8376 1.0624 0.1882 8.7228 -#> 220: 92.6268 -2.5549 -3.9770 2.2150 0.2404 0.8395 1.0671 0.1899 8.7325 -#> 221: 92.6337 -2.5548 -3.9765 2.2172 0.2460 0.8412 1.0713 0.1900 8.7409 -#> 222: 92.6383 -2.5563 -3.9796 2.2211 0.2499 0.8412 1.0667 0.1898 8.7456 -#> 223: 92.6399 -2.5575 -3.9806 2.2259 0.2494 0.8406 1.0665 0.1898 8.7564 -#> 224: 92.6424 -2.5589 -3.9840 2.2296 0.2451 0.8412 1.0624 0.1894 8.7571 -#> 225: 92.6431 -2.5599 -3.9883 2.2336 0.2427 0.8423 1.0555 0.1885 8.7754 -#> 226: 92.6393 -2.5612 -3.9919 2.2371 0.2384 0.8431 1.0488 0.1886 8.7904 -#> 227: 92.6354 -2.5630 -3.9918 2.2406 0.2361 0.8432 1.0501 0.1892 8.8070 -#> 228: 92.6328 -2.5650 -3.9926 2.2437 0.2336 0.8434 1.0524 0.1908 8.8133 -#> 229: 92.6328 -2.5672 -3.9913 2.2462 0.2318 0.8439 1.0578 0.1926 8.8314 -#> 230: 92.6322 -2.5684 -3.9911 2.2482 0.2269 0.8426 1.0621 0.1952 8.8464 -#> 231: 92.6263 -2.5698 -3.9910 2.2500 0.2240 0.8418 1.0628 0.1963 8.8734 -#> 232: 92.6228 -2.5710 -3.9908 2.2515 0.2218 0.8411 1.0644 0.1977 8.9056 -#> 233: 92.6235 -2.5721 -3.9919 2.2545 0.2192 0.8409 1.0649 0.1983 8.9192 -#> 234: 92.6232 -2.5727 -3.9927 2.2551 0.2171 0.8397 1.0649 0.1981 8.9294 -#> 235: 92.6219 -2.5733 -3.9924 2.2562 0.2155 0.8390 1.0646 0.1978 8.9242 -#> 236: 92.6212 -2.5737 -3.9924 2.2574 0.2145 0.8384 1.0639 0.1975 8.9292 -#> 237: 92.6211 -2.5738 -3.9938 2.2588 0.2142 0.8379 1.0607 0.1970 8.9400 -#> 238: 92.6194 -2.5735 -3.9931 2.2589 0.2155 0.8373 1.0630 0.1969 8.9371 -#> 239: 92.6175 -2.5734 -3.9928 2.2593 0.2155 0.8371 1.0648 0.1967 8.9315 -#> 240: 92.6175 -2.5729 -3.9923 2.2593 0.2143 0.8367 1.0673 0.1963 8.9180 -#> 241: 92.6155 -2.5728 -3.9917 2.2591 0.2133 0.8372 1.0695 0.1960 8.9139 -#> 242: 92.6135 -2.5726 -3.9923 2.2588 0.2136 0.8375 1.0681 0.1965 8.9191 -#> 243: 92.6115 -2.5726 -3.9930 2.2592 0.2127 0.8375 1.0683 0.1969 8.9117 -#> 244: 92.6106 -2.5726 -3.9925 2.2588 0.2123 0.8381 1.0704 0.1975 8.9124 -#> 245: 92.6065 -2.5730 -3.9930 2.2586 0.2127 0.8388 1.0691 0.1982 8.9140 -#> 246: 92.6046 -2.5734 -3.9931 2.2588 0.2109 0.8397 1.0701 0.1986 8.9132 -#> 247: 92.6048 -2.5737 -3.9938 2.2597 0.2081 0.8404 1.0708 0.1989 8.9224 -#> 248: 92.6029 -2.5739 -3.9932 2.2599 0.2056 0.8410 1.0718 0.1993 8.9198 -#> 249: 92.6006 -2.5743 -3.9934 2.2598 0.2052 0.8419 1.0705 0.1996 8.9244 -#> 250: 92.5984 -2.5740 -3.9930 2.2595 0.2037 0.8417 1.0709 0.1997 8.9208 -#> 251: 92.5967 -2.5739 -3.9932 2.2595 0.2018 0.8418 1.0700 0.1996 8.9143 -#> 252: 92.5943 -2.5737 -3.9920 2.2594 0.2009 0.8412 1.0734 0.1992 8.9090 -#> 253: 92.5944 -2.5736 -3.9904 2.2588 0.1997 0.8405 1.0769 0.1995 8.9035 -#> 254: 92.5941 -2.5732 -3.9896 2.2582 0.1987 0.8394 1.0788 0.1993 8.8940 -#> 255: 92.5916 -2.5728 -3.9892 2.2571 0.1983 0.8387 1.0794 0.1988 8.8894 -#> 256: 92.5889 -2.5724 -3.9880 2.2562 0.1988 0.8382 1.0813 0.1992 8.8834 -#> 257: 92.5889 -2.5719 -3.9872 2.2557 0.2003 0.8378 1.0831 0.1995 8.8806 -#> 258: 92.5889 -2.5717 -3.9866 2.2556 0.2021 0.8377 1.0858 0.1995 8.8792 -#> 259: 92.5898 -2.5715 -3.9867 2.2556 0.2033 0.8373 1.0884 0.1999 8.8785 -#> 260: 92.5924 -2.5709 -3.9868 2.2556 0.2033 0.8367 1.0891 0.2006 8.8743 -#> 261: 92.5956 -2.5703 -3.9866 2.2552 0.2045 0.8360 1.0908 0.2014 8.8635 -#> 262: 92.5985 -2.5698 -3.9859 2.2546 0.2054 0.8354 1.0940 0.2022 8.8551 -#> 263: 92.6014 -2.5694 -3.9857 2.2544 0.2067 0.8347 1.0964 0.2028 8.8479 -#> 264: 92.6041 -2.5690 -3.9858 2.2543 0.2069 0.8338 1.0977 0.2028 8.8421 -#> 265: 92.6063 -2.5687 -3.9861 2.2541 0.2079 0.8327 1.0976 0.2029 8.8394 -#> 266: 92.6087 -2.5684 -3.9867 2.2540 0.2107 0.8318 1.0968 0.2027 8.8351 -#> 267: 92.6108 -2.5682 -3.9863 2.2534 0.2118 0.8314 1.0970 0.2032 8.8283 -#> 268: 92.6130 -2.5680 -3.9860 2.2530 0.2131 0.8309 1.0970 0.2034 8.8263 -#> 269: 92.6139 -2.5678 -3.9851 2.2526 0.2155 0.8306 1.0979 0.2040 8.8240 -#> 270: 92.6144 -2.5676 -3.9851 2.2521 0.2176 0.8303 1.0972 0.2044 8.8283 -#> 271: 92.6153 -2.5675 -3.9855 2.2518 0.2190 0.8305 1.0961 0.2049 8.8310 -#> 272: 92.6163 -2.5674 -3.9859 2.2521 0.2196 0.8305 1.0965 0.2051 8.8378 -#> 273: 92.6178 -2.5672 -3.9862 2.2520 0.2198 0.8302 1.0959 0.2051 8.8421 -#> 274: 92.6193 -2.5670 -3.9870 2.2524 0.2195 0.8299 1.0955 0.2051 8.8441 -#> 275: 92.6197 -2.5669 -3.9874 2.2526 0.2194 0.8295 1.0947 0.2052 8.8477 -#> 276: 92.6215 -2.5665 -3.9875 2.2523 0.2206 0.8288 1.0956 0.2058 8.8462 -#> 277: 92.6225 -2.5660 -3.9878 2.2522 0.2231 0.8282 1.0974 0.2064 8.8450 -#> 278: 92.6237 -2.5655 -3.9883 2.2522 0.2240 0.8277 1.0988 0.2074 8.8501 -#> 279: 92.6249 -2.5651 -3.9888 2.2524 0.2244 0.8274 1.0994 0.2083 8.8504 -#> 280: 92.6259 -2.5647 -3.9891 2.2523 0.2235 0.8270 1.0992 0.2087 8.8514 -#> 281: 92.6264 -2.5643 -3.9889 2.2522 0.2225 0.8262 1.1001 0.2090 8.8559 -#> 282: 92.6270 -2.5639 -3.9889 2.2516 0.2223 0.8255 1.0997 0.2090 8.8593 -#> 283: 92.6280 -2.5633 -3.9885 2.2503 0.2214 0.8248 1.0999 0.2101 8.8586 -#> 284: 92.6281 -2.5627 -3.9883 2.2491 0.2212 0.8241 1.0993 0.2110 8.8580 -#> 285: 92.6283 -2.5621 -3.9881 2.2481 0.2213 0.8235 1.0986 0.2118 8.8590 -#> 286: 92.6288 -2.5615 -3.9886 2.2475 0.2219 0.8231 1.0973 0.2123 8.8602 -#> 287: 92.6291 -2.5611 -3.9890 2.2470 0.2217 0.8230 1.0961 0.2133 8.8577 -#> 288: 92.6292 -2.5607 -3.9893 2.2468 0.2202 0.8229 1.0960 0.2142 8.8570 -#> 289: 92.6275 -2.5602 -3.9895 2.2464 0.2192 0.8226 1.0964 0.2151 8.8554 -#> 290: 92.6262 -2.5598 -3.9892 2.2457 0.2189 0.8223 1.0977 0.2161 8.8578 -#> 291: 92.6246 -2.5596 -3.9890 2.2454 0.2183 0.8218 1.0999 0.2165 8.8596 -#> 292: 92.6223 -2.5593 -3.9892 2.2451 0.2183 0.8213 1.1003 0.2173 8.8575 -#> 293: 92.6201 -2.5590 -3.9896 2.2447 0.2193 0.8209 1.1003 0.2175 8.8569 -#> 294: 92.6169 -2.5587 -3.9902 2.2445 0.2202 0.8204 1.0998 0.2176 8.8568 -#> 295: 92.6144 -2.5584 -3.9906 2.2442 0.2217 0.8197 1.0994 0.2176 8.8565 -#> 296: 92.6126 -2.5581 -3.9913 2.2441 0.2223 0.8188 1.0983 0.2175 8.8585 -#> 297: 92.6112 -2.5576 -3.9920 2.2439 0.2235 0.8182 1.0969 0.2175 8.8600 -#> 298: 92.6108 -2.5572 -3.9921 2.2433 0.2250 0.8174 1.0964 0.2177 8.8612 -#> 299: 92.6101 -2.5567 -3.9919 2.2425 0.2254 0.8169 1.0960 0.2178 8.8626 -#> 300: 92.6097 -2.5562 -3.9913 2.2415 0.2257 0.8163 1.0974 0.2182 8.8632 -#> 301: 92.6102 -2.5556 -3.9913 2.2407 0.2255 0.8156 1.0972 0.2183 8.8600 -#> 302: 92.6102 -2.5551 -3.9916 2.2400 0.2252 0.8156 1.0966 0.2186 8.8586 -#> 303: 92.6099 -2.5546 -3.9915 2.2391 0.2250 0.8152 1.0978 0.2189 8.8589 -#> 304: 92.6096 -2.5541 -3.9913 2.2387 0.2242 0.8149 1.0987 0.2194 8.8570 -#> 305: 92.6100 -2.5538 -3.9914 2.2383 0.2247 0.8144 1.0995 0.2202 8.8553 -#> 306: 92.6109 -2.5533 -3.9915 2.2378 0.2255 0.8144 1.1001 0.2212 8.8531 -#> 307: 92.6119 -2.5529 -3.9913 2.2371 0.2252 0.8143 1.1007 0.2217 8.8498 -#> 308: 92.6128 -2.5525 -3.9912 2.2366 0.2249 0.8142 1.1012 0.2219 8.8490 -#> 309: 92.6143 -2.5519 -3.9905 2.2357 0.2251 0.8138 1.1018 0.2224 8.8449 -#> 310: 92.6160 -2.5513 -3.9900 2.2346 0.2255 0.8136 1.1020 0.2230 8.8403 -#> 311: 92.6177 -2.5506 -3.9891 2.2333 0.2258 0.8132 1.1031 0.2236 8.8392 -#> 312: 92.6190 -2.5499 -3.9881 2.2319 0.2267 0.8130 1.1047 0.2242 8.8382 -#> 313: 92.6192 -2.5493 -3.9872 2.2305 0.2273 0.8127 1.1057 0.2249 8.8350 -#> 314: 92.6196 -2.5490 -3.9864 2.2300 0.2279 0.8129 1.1067 0.2257 8.8315 -#> 315: 92.6197 -2.5488 -3.9858 2.2295 0.2277 0.8132 1.1072 0.2266 8.8285 -#> 316: 92.6192 -2.5485 -3.9850 2.2284 0.2276 0.8133 1.1087 0.2275 8.8278 -#> 317: 92.6190 -2.5482 -3.9840 2.2275 0.2278 0.8135 1.1105 0.2282 8.8296 -#> 318: 92.6193 -2.5480 -3.9833 2.2266 0.2274 0.8133 1.1120 0.2289 8.8313 -#> 319: 92.6200 -2.5476 -3.9827 2.2257 0.2265 0.8129 1.1133 0.2297 8.8326 -#> 320: 92.6211 -2.5472 -3.9820 2.2250 0.2260 0.8124 1.1150 0.2302 8.8359 -#> 321: 92.6226 -2.5468 -3.9816 2.2246 0.2254 0.8118 1.1158 0.2308 8.8396 -#> 322: 92.6238 -2.5464 -3.9808 2.2238 0.2249 0.8114 1.1169 0.2316 8.8424 -#> 323: 92.6248 -2.5461 -3.9805 2.2231 0.2241 0.8109 1.1173 0.2320 8.8458 -#> 324: 92.6252 -2.5458 -3.9801 2.2224 0.2233 0.8103 1.1182 0.2324 8.8474 -#> 325: 92.6248 -2.5455 -3.9799 2.2216 0.2225 0.8096 1.1192 0.2328 8.8507 -#> 326: 92.6247 -2.5451 -3.9802 2.2209 0.2216 0.8091 1.1186 0.2331 8.8519 -#> 327: 92.6248 -2.5446 -3.9806 2.2203 0.2203 0.8088 1.1179 0.2335 8.8535 -#> 328: 92.6242 -2.5442 -3.9808 2.2198 0.2196 0.8084 1.1175 0.2339 8.8533 -#> 329: 92.6234 -2.5437 -3.9809 2.2192 0.2188 0.8081 1.1176 0.2342 8.8550 -#> 330: 92.6229 -2.5433 -3.9806 2.2187 0.2182 0.8078 1.1187 0.2346 8.8574 -#> 331: 92.6220 -2.5429 -3.9801 2.2181 0.2183 0.8075 1.1210 0.2352 8.8599 -#> 332: 92.6214 -2.5425 -3.9796 2.2175 0.2185 0.8072 1.1235 0.2360 8.8612 -#> 333: 92.6215 -2.5421 -3.9794 2.2170 0.2184 0.8068 1.1248 0.2365 8.8660 -#> 334: 92.6218 -2.5417 -3.9795 2.2168 0.2180 0.8065 1.1257 0.2369 8.8675 -#> 335: 92.6220 -2.5413 -3.9793 2.2164 0.2177 0.8062 1.1269 0.2374 8.8683 -#> 336: 92.6228 -2.5410 -3.9792 2.2159 0.2173 0.8059 1.1275 0.2378 8.8707 -#> 337: 92.6244 -2.5405 -3.9792 2.2153 0.2175 0.8057 1.1278 0.2387 8.8734 -#> 338: 92.6266 -2.5401 -3.9792 2.2146 0.2184 0.8057 1.1283 0.2396 8.8757 -#> 339: 92.6290 -2.5398 -3.9790 2.2144 0.2191 0.8060 1.1294 0.2403 8.8770 -#> 340: 92.6309 -2.5396 -3.9790 2.2142 0.2200 0.8061 1.1295 0.2405 8.8766 -#> 341: 92.6328 -2.5394 -3.9788 2.2142 0.2211 0.8061 1.1300 0.2406 8.8752 -#> 342: 92.6347 -2.5392 -3.9788 2.2140 0.2223 0.8062 1.1291 0.2405 8.8744 -#> 343: 92.6365 -2.5390 -3.9787 2.2139 0.2233 0.8063 1.1288 0.2405 8.8732 -#> 344: 92.6383 -2.5388 -3.9785 2.2136 0.2242 0.8060 1.1295 0.2404 8.8730 -#> 345: 92.6392 -2.5386 -3.9781 2.2133 0.2248 0.8055 1.1303 0.2401 8.8737 -#> 346: 92.6401 -2.5384 -3.9780 2.2129 0.2249 0.8051 1.1302 0.2399 8.8739 -#> 347: 92.6411 -2.5381 -3.9777 2.2124 0.2248 0.8049 1.1302 0.2399 8.8794 -#> 348: 92.6427 -2.5380 -3.9777 2.2122 0.2251 0.8047 1.1306 0.2398 8.8814 -#> 349: 92.6444 -2.5378 -3.9777 2.2119 0.2252 0.8047 1.1304 0.2397 8.8834 -#> 350: 92.6462 -2.5376 -3.9776 2.2115 0.2260 0.8043 1.1300 0.2395 8.8859 -#> 351: 92.6470 -2.5375 -3.9772 2.2110 0.2265 0.8041 1.1303 0.2392 8.8883 -#> 352: 92.6478 -2.5373 -3.9772 2.2106 0.2266 0.8037 1.1293 0.2386 8.8926 -#> 353: 92.6493 -2.5373 -3.9772 2.2103 0.2268 0.8032 1.1285 0.2381 8.8928 -#> 354: 92.6504 -2.5372 -3.9772 2.2100 0.2264 0.8028 1.1274 0.2376 8.8946 -#> 355: 92.6512 -2.5370 -3.9771 2.2096 0.2267 0.8023 1.1273 0.2373 8.8951 -#> 356: 92.6522 -2.5367 -3.9767 2.2089 0.2275 0.8018 1.1272 0.2370 8.8947 -#> 357: 92.6534 -2.5364 -3.9765 2.2080 0.2290 0.8015 1.1268 0.2369 8.8932 -#> 358: 92.6545 -2.5362 -3.9761 2.2072 0.2301 0.8011 1.1270 0.2368 8.8919 -#> 359: 92.6566 -2.5360 -3.9757 2.2064 0.2310 0.8008 1.1269 0.2369 8.8928 -#> 360: 92.6584 -2.5358 -3.9751 2.2059 0.2311 0.8005 1.1272 0.2368 8.8924 -#> 361: 92.6611 -2.5356 -3.9744 2.2051 0.2317 0.8004 1.1280 0.2369 8.8932 -#> 362: 92.6639 -2.5353 -3.9740 2.2043 0.2321 0.8003 1.1284 0.2370 8.8914 -#> 363: 92.6662 -2.5349 -3.9733 2.2033 0.2328 0.8001 1.1289 0.2371 8.8902 -#> 364: 92.6679 -2.5345 -3.9729 2.2025 0.2325 0.7998 1.1292 0.2372 8.8883 -#> 365: 92.6695 -2.5341 -3.9725 2.2019 0.2321 0.7994 1.1297 0.2373 8.8865 -#> 366: 92.6709 -2.5337 -3.9722 2.2011 0.2321 0.7990 1.1297 0.2373 8.8860 -#> 367: 92.6724 -2.5334 -3.9720 2.2005 0.2317 0.7987 1.1295 0.2372 8.8848 -#> 368: 92.6736 -2.5330 -3.9719 2.1999 0.2314 0.7985 1.1288 0.2371 8.8844 -#> 369: 92.6745 -2.5326 -3.9717 2.1994 0.2310 0.7982 1.1283 0.2371 8.8840 -#> 370: 92.6758 -2.5323 -3.9714 2.1990 0.2312 0.7980 1.1283 0.2370 8.8854 -#> 371: 92.6776 -2.5321 -3.9708 2.1984 0.2313 0.7977 1.1286 0.2369 8.8852 -#> 372: 92.6791 -2.5317 -3.9704 2.1978 0.2311 0.7973 1.1282 0.2367 8.8865 -#> 373: 92.6804 -2.5312 -3.9701 2.1969 0.2308 0.7969 1.1280 0.2366 8.8884 -#> 374: 92.6814 -2.5308 -3.9699 2.1962 0.2305 0.7965 1.1279 0.2364 8.8898 -#> 375: 92.6827 -2.5304 -3.9698 2.1954 0.2305 0.7961 1.1271 0.2360 8.8938 -#> 376: 92.6832 -2.5301 -3.9695 2.1947 0.2301 0.7957 1.1268 0.2359 8.8930 -#> 377: 92.6835 -2.5298 -3.9692 2.1941 0.2300 0.7953 1.1269 0.2357 8.8933 -#> 378: 92.6831 -2.5295 -3.9693 2.1935 0.2303 0.7950 1.1266 0.2357 8.8990 -#> 379: 92.6827 -2.5293 -3.9694 2.1933 0.2307 0.7948 1.1265 0.2356 8.9027 -#> 380: 92.6826 -2.5291 -3.9695 2.1931 0.2307 0.7947 1.1262 0.2356 8.9045 -#> 381: 92.6822 -2.5290 -3.9695 2.1929 0.2307 0.7945 1.1259 0.2355 8.9040 -#> 382: 92.6817 -2.5289 -3.9694 2.1925 0.2305 0.7943 1.1258 0.2357 8.9033 -#> 383: 92.6812 -2.5288 -3.9695 2.1922 0.2305 0.7942 1.1255 0.2358 8.9045 -#> 384: 92.6810 -2.5288 -3.9695 2.1920 0.2302 0.7940 1.1253 0.2360 8.9058 -#> 385: 92.6806 -2.5287 -3.9694 2.1918 0.2301 0.7938 1.1254 0.2361 8.9052 -#> 386: 92.6801 -2.5286 -3.9692 2.1914 0.2298 0.7936 1.1256 0.2362 8.9039 -#> 387: 92.6800 -2.5285 -3.9687 2.1914 0.2294 0.7934 1.1261 0.2361 8.9032 -#> 388: 92.6801 -2.5284 -3.9683 2.1913 0.2293 0.7931 1.1267 0.2360 8.9027 -#> 389: 92.6802 -2.5283 -3.9684 2.1912 0.2288 0.7928 1.1261 0.2360 8.9028 -#> 390: 92.6805 -2.5281 -3.9684 2.1910 0.2283 0.7925 1.1258 0.2360 8.9044 -#> 391: 92.6806 -2.5280 -3.9685 2.1908 0.2285 0.7921 1.1254 0.2360 8.9047 -#> 392: 92.6810 -2.5278 -3.9682 2.1907 0.2288 0.7918 1.1257 0.2360 8.9057 -#> 393: 92.6810 -2.5275 -3.9681 2.1906 0.2290 0.7916 1.1257 0.2360 8.9049 -#> 394: 92.6811 -2.5272 -3.9682 2.1904 0.2292 0.7913 1.1253 0.2360 8.9056 -#> 395: 92.6812 -2.5269 -3.9682 2.1900 0.2295 0.7911 1.1251 0.2362 8.9044 -#> 396: 92.6817 -2.5269 -3.9683 2.1901 0.2292 0.7911 1.1251 0.2361 8.9031 -#> 397: 92.6824 -2.5269 -3.9686 2.1903 0.2292 0.7911 1.1250 0.2361 8.9043 -#> 398: 92.6828 -2.5270 -3.9688 2.1907 0.2291 0.7913 1.1248 0.2359 8.9035 -#> 399: 92.6829 -2.5271 -3.9689 2.1909 0.2292 0.7916 1.1248 0.2358 8.9043 -#> 400: 92.6829 -2.5273 -3.9688 2.1909 0.2295 0.7919 1.1250 0.2356 8.9037 -#> 401: 92.6827 -2.5274 -3.9687 2.1910 0.2299 0.7922 1.1249 0.2356 8.9035 -#> 402: 92.6822 -2.5276 -3.9687 2.1911 0.2303 0.7926 1.1248 0.2355 8.9033 -#> 403: 92.6821 -2.5277 -3.9686 2.1913 0.2307 0.7929 1.1250 0.2354 8.9009 -#> 404: 92.6817 -2.5279 -3.9684 2.1914 0.2314 0.7930 1.1249 0.2352 8.9012 -#> 405: 92.6813 -2.5281 -3.9683 2.1915 0.2318 0.7930 1.1252 0.2349 8.9015 -#> 406: 92.6811 -2.5283 -3.9680 2.1916 0.2321 0.7930 1.1255 0.2345 8.9019 -#> 407: 92.6817 -2.5285 -3.9677 2.1918 0.2329 0.7930 1.1255 0.2343 8.9014 -#> 408: 92.6824 -2.5287 -3.9675 2.1919 0.2330 0.7930 1.1253 0.2341 8.9019 -#> 409: 92.6833 -2.5289 -3.9674 2.1922 0.2331 0.7931 1.1249 0.2338 8.9031 -#> 410: 92.6840 -2.5291 -3.9673 2.1924 0.2331 0.7930 1.1245 0.2335 8.9054 -#> 411: 92.6848 -2.5292 -3.9672 2.1926 0.2333 0.7929 1.1243 0.2333 8.9083 -#> 412: 92.6852 -2.5293 -3.9671 2.1928 0.2333 0.7931 1.1243 0.2333 8.9107 -#> 413: 92.6858 -2.5293 -3.9671 2.1929 0.2332 0.7932 1.1246 0.2332 8.9119 -#> 414: 92.6863 -2.5293 -3.9671 2.1928 0.2332 0.7934 1.1252 0.2333 8.9112 -#> 415: 92.6868 -2.5293 -3.9671 2.1928 0.2330 0.7935 1.1253 0.2332 8.9109 -#> 416: 92.6872 -2.5293 -3.9672 2.1928 0.2327 0.7935 1.1247 0.2330 8.9101 -#> 417: 92.6875 -2.5293 -3.9674 2.1929 0.2324 0.7934 1.1241 0.2330 8.9126 -#> 418: 92.6881 -2.5294 -3.9675 2.1929 0.2322 0.7935 1.1238 0.2332 8.9148 -#> 419: 92.6885 -2.5295 -3.9674 2.1929 0.2322 0.7936 1.1236 0.2331 8.9179 -#> 420: 92.6890 -2.5297 -3.9674 2.1929 0.2322 0.7936 1.1235 0.2331 8.9194 -#> 421: 92.6891 -2.5299 -3.9672 2.1930 0.2318 0.7937 1.1236 0.2330 8.9192 -#> 422: 92.6894 -2.5301 -3.9670 2.1930 0.2318 0.7937 1.1239 0.2329 8.9183 -#> 423: 92.6898 -2.5302 -3.9667 2.1931 0.2318 0.7937 1.1242 0.2327 8.9190 -#> 424: 92.6905 -2.5304 -3.9667 2.1931 0.2316 0.7937 1.1243 0.2326 8.9190 -#> 425: 92.6910 -2.5305 -3.9667 2.1932 0.2316 0.7936 1.1240 0.2327 8.9203 -#> 426: 92.6917 -2.5306 -3.9668 2.1935 0.2318 0.7937 1.1237 0.2326 8.9200 -#> 427: 92.6918 -2.5308 -3.9671 2.1939 0.2322 0.7938 1.1227 0.2326 8.9224 -#> 428: 92.6912 -2.5310 -3.9670 2.1941 0.2319 0.7939 1.1225 0.2325 8.9268 -#> 429: 92.6912 -2.5312 -3.9670 2.1944 0.2316 0.7939 1.1225 0.2324 8.9301 -#> 430: 92.6910 -2.5314 -3.9674 2.1948 0.2314 0.7940 1.1217 0.2322 8.9314 -#> 431: 92.6911 -2.5315 -3.9675 2.1950 0.2314 0.7942 1.1210 0.2320 8.9320 -#> 432: 92.6911 -2.5316 -3.9677 2.1953 0.2312 0.7944 1.1204 0.2320 8.9327 -#> 433: 92.6910 -2.5317 -3.9681 2.1955 0.2309 0.7946 1.1196 0.2320 8.9336 -#> 434: 92.6910 -2.5318 -3.9683 2.1957 0.2306 0.7949 1.1188 0.2320 8.9337 -#> 435: 92.6912 -2.5319 -3.9687 2.1960 0.2302 0.7951 1.1178 0.2319 8.9343 -#> 436: 92.6914 -2.5320 -3.9688 2.1961 0.2300 0.7953 1.1173 0.2319 8.9345 -#> 437: 92.6919 -2.5321 -3.9688 2.1962 0.2299 0.7955 1.1168 0.2318 8.9335 -#> 438: 92.6920 -2.5323 -3.9688 2.1964 0.2296 0.7957 1.1164 0.2318 8.9334 -#> 439: 92.6917 -2.5324 -3.9689 2.1965 0.2292 0.7959 1.1165 0.2317 8.9322 -#> 440: 92.6910 -2.5326 -3.9688 2.1969 0.2289 0.7960 1.1170 0.2316 8.9319 -#> 441: 92.6907 -2.5328 -3.9688 2.1973 0.2283 0.7961 1.1175 0.2316 8.9317 -#> 442: 92.6909 -2.5330 -3.9689 2.1976 0.2280 0.7962 1.1174 0.2315 8.9326 -#> 443: 92.6911 -2.5332 -3.9689 2.1980 0.2277 0.7963 1.1180 0.2315 8.9338 -#> 444: 92.6906 -2.5332 -3.9690 2.1981 0.2275 0.7963 1.1181 0.2315 8.9354 -#> 445: 92.6897 -2.5333 -3.9691 2.1982 0.2276 0.7962 1.1181 0.2315 8.9364 -#> 446: 92.6896 -2.5333 -3.9692 2.1982 0.2272 0.7962 1.1176 0.2314 8.9363 -#> 447: 92.6893 -2.5334 -3.9693 2.1982 0.2272 0.7961 1.1173 0.2313 8.9365 -#> 448: 92.6890 -2.5334 -3.9693 2.1982 0.2271 0.7961 1.1173 0.2313 8.9364 -#> 449: 92.6888 -2.5335 -3.9693 2.1982 0.2267 0.7961 1.1170 0.2313 8.9372 -#> 450: 92.6884 -2.5335 -3.9693 2.1982 0.2262 0.7959 1.1166 0.2312 8.9364 -#> 451: 92.6885 -2.5335 -3.9691 2.1981 0.2261 0.7958 1.1167 0.2312 8.9350 -#> 452: 92.6887 -2.5335 -3.9691 2.1980 0.2260 0.7957 1.1164 0.2311 8.9349 -#> 453: 92.6888 -2.5335 -3.9691 2.1979 0.2258 0.7957 1.1163 0.2310 8.9375 -#> 454: 92.6890 -2.5335 -3.9689 2.1977 0.2258 0.7957 1.1160 0.2308 8.9385 -#> 455: 92.6894 -2.5334 -3.9687 2.1975 0.2259 0.7956 1.1158 0.2307 8.9382 -#> 456: 92.6898 -2.5334 -3.9685 2.1974 0.2261 0.7957 1.1154 0.2306 8.9380 -#> 457: 92.6904 -2.5334 -3.9685 2.1975 0.2265 0.7956 1.1146 0.2304 8.9391 -#> 458: 92.6908 -2.5334 -3.9687 2.1975 0.2266 0.7956 1.1137 0.2303 8.9418 -#> 459: 92.6911 -2.5335 -3.9689 2.1975 0.2270 0.7956 1.1129 0.2303 8.9442 -#> 460: 92.6912 -2.5335 -3.9687 2.1976 0.2274 0.7957 1.1126 0.2301 8.9461 -#> 461: 92.6913 -2.5336 -3.9687 2.1975 0.2276 0.7958 1.1125 0.2300 8.9463 -#> 462: 92.6914 -2.5336 -3.9686 2.1974 0.2280 0.7959 1.1126 0.2299 8.9456 -#> 463: 92.6917 -2.5336 -3.9684 2.1973 0.2280 0.7960 1.1127 0.2297 8.9452 -#> 464: 92.6918 -2.5336 -3.9683 2.1970 0.2280 0.7961 1.1127 0.2295 8.9444 -#> 465: 92.6921 -2.5336 -3.9682 2.1967 0.2277 0.7962 1.1127 0.2294 8.9447 -#> 466: 92.6924 -2.5336 -3.9679 2.1967 0.2275 0.7964 1.1127 0.2291 8.9454 -#> 467: 92.6930 -2.5336 -3.9677 2.1966 0.2273 0.7967 1.1128 0.2290 8.9453 -#> 468: 92.6935 -2.5337 -3.9675 2.1966 0.2275 0.7970 1.1128 0.2289 8.9458 -#> 469: 92.6937 -2.5338 -3.9676 2.1967 0.2278 0.7972 1.1123 0.2287 8.9455 -#> 470: 92.6938 -2.5338 -3.9677 2.1967 0.2283 0.7974 1.1122 0.2285 8.9451 -#> 471: 92.6940 -2.5339 -3.9676 2.1969 0.2290 0.7976 1.1124 0.2283 8.9448 -#> 472: 92.6938 -2.5339 -3.9676 2.1972 0.2293 0.7977 1.1125 0.2281 8.9460 -#> 473: 92.6937 -2.5340 -3.9676 2.1972 0.2298 0.7978 1.1121 0.2278 8.9461 -#> 474: 92.6934 -2.5341 -3.9677 2.1974 0.2308 0.7978 1.1118 0.2276 8.9470 -#> 475: 92.6936 -2.5342 -3.9677 2.1978 0.2316 0.7979 1.1113 0.2273 8.9486 -#> 476: 92.6940 -2.5345 -3.9679 2.1983 0.2324 0.7981 1.1106 0.2271 8.9491 -#> 477: 92.6945 -2.5347 -3.9681 2.1989 0.2332 0.7983 1.1099 0.2269 8.9502 -#> 478: 92.6951 -2.5349 -3.9682 2.1992 0.2344 0.7986 1.1093 0.2267 8.9502 -#> 479: 92.6958 -2.5352 -3.9683 2.1995 0.2357 0.7987 1.1088 0.2266 8.9521 -#> 480: 92.6967 -2.5354 -3.9684 2.1998 0.2370 0.7988 1.1083 0.2265 8.9524 -#> 481: 92.6977 -2.5355 -3.9685 2.2001 0.2383 0.7990 1.1079 0.2263 8.9521 -#> 482: 92.6985 -2.5357 -3.9687 2.2004 0.2395 0.7992 1.1073 0.2262 8.9518 -#> 483: 92.6992 -2.5359 -3.9690 2.2008 0.2403 0.7995 1.1066 0.2262 8.9524 -#> 484: 92.7000 -2.5361 -3.9691 2.2010 0.2406 0.7998 1.1061 0.2260 8.9516 -#> 485: 92.7009 -2.5362 -3.9693 2.2015 0.2410 0.8001 1.1057 0.2261 8.9508 -#> 486: 92.7010 -2.5363 -3.9695 2.2019 0.2412 0.8004 1.1051 0.2261 8.9502 -#> 487: 92.7008 -2.5365 -3.9698 2.2023 0.2413 0.8009 1.1048 0.2260 8.9502 -#> 488: 92.7006 -2.5366 -3.9700 2.2026 0.2411 0.8012 1.1044 0.2260 8.9501 -#> 489: 92.7006 -2.5367 -3.9701 2.2029 0.2410 0.8015 1.1041 0.2261 8.9504 -#> 490: 92.7006 -2.5368 -3.9702 2.2031 0.2407 0.8015 1.1043 0.2260 8.9498 -#> 491: 92.7007 -2.5369 -3.9701 2.2034 0.2405 0.8016 1.1047 0.2261 8.9484 -#> 492: 92.7008 -2.5370 -3.9702 2.2035 0.2406 0.8017 1.1046 0.2261 8.9473 -#> 493: 92.7010 -2.5370 -3.9704 2.2037 0.2406 0.8018 1.1044 0.2261 8.9469 -#> 494: 92.7015 -2.5371 -3.9707 2.2038 0.2408 0.8019 1.1040 0.2261 8.9453 -#> 495: 92.7017 -2.5371 -3.9708 2.2039 0.2407 0.8021 1.1042 0.2262 8.9447 -#> 496: 92.7016 -2.5371 -3.9708 2.2039 0.2407 0.8022 1.1042 0.2262 8.9433 -#> 497: 92.7015 -2.5371 -3.9709 2.2039 0.2408 0.8023 1.1044 0.2262 8.9431 -#> 498: 92.7013 -2.5371 -3.9709 2.2040 0.2409 0.8024 1.1047 0.2262 8.9452 -#> 499: 92.7011 -2.5371 -3.9710 2.2039 0.2409 0.8023 1.1049 0.2261 8.9481 -#> 500: 92.7010 -2.5371 -3.9712 2.2040 0.2412 0.8022 1.1049 0.2260 8.9498
#> Calculating covariance matrix
#>
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → compiling EBE model...
#>
#> done
#> Calculating residuals/tables
#> done
f_nlmixr_hs_focei <- nlmixr(f_mmkin_parent["HS", ], est = "focei") -
#> parameter labels from comments are typically ignored in non-interactive mode
#> Need to run with the source intact to parse comments
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → calculate jacobian
#>
#> → calculate sensitivities
#>
#> → calculate ∂(f)/∂(η)
#>
#> → calculate ∂(R²)/∂(η)
#>
#> → finding duplicate expressions in inner model...
#>
#> → optimizing duplicate expressions in inner model...
#>
#> → finding duplicate expressions in EBE model...
#>
#> → optimizing duplicate expressions in EBE model...
#>
#> → compiling inner model...
#>
#> done
#> → finding duplicate expressions in FD model...
#>
#> → optimizing duplicate expressions in FD model...
#>
#> → compiling EBE model...
#>
#> done
#> → compiling events FD model...
#>
#> done
#> Key: U: Unscaled Parameters; X: Back-transformed parameters; G: Gill difference gradient approximation -#> F: Forward difference gradient approximation -#> C: Central difference gradient approximation -#> M: Mixed forward and central difference gradient approximation -#> Unscaled parameters for Omegas=chol(solve(omega)); -#> Diagonals are transformed, as specified by foceiControl(diagXform=) -#> |-----+---------------+-----------+-----------+-----------+-----------| -#> | #| Objective Fun | parent_0 | log_k1 | log_k2 | log_tb | -#> |.....................| sigma | o1 | o2 | o3 | -#> |.....................| o4 |...........|...........|...........| -#> | 1| 360.27275 | 1.000 | -0.9661 | -1.000 | -0.8790 | -#> |.....................| -0.8669 | -0.9051 | -0.8997 | -0.9009 | -#> |.....................| -0.8938 |...........|...........|...........| -#> | U| 360.27275 | 94.06 | -2.229 | -3.887 | 2.039 | -#> |.....................| 2.632 | 0.7629 | 1.026 | 0.9675 | -#> |.....................| 1.314 |...........|...........|...........| -#> | X| 360.27275 | 94.06 | 0.1077 | 0.02051 | 7.683 | -#> |.....................| 2.632 | 0.7629 | 1.026 | 0.9675 | -#> |.....................| 1.314 |...........|...........|...........| -#> | G| Gill Diff. | 106.2 | 0.7918 | 0.06750 | 10.50 | -#> |.....................| -26.04 | 2.358 | -5.196 | -2.491 | -#> |.....................| -12.13 |...........|...........|...........| -#> | 2| 7055.7467 | 0.04059 | -0.9733 | -1.001 | -0.9739 | -#> |.....................| -0.6317 | -0.9263 | -0.8528 | -0.8784 | -#> |.....................| -0.7843 |...........|...........|...........| -#> | U| 7055.7467 | 3.818 | -2.236 | -3.887 | 1.944 | -#> |.....................| 2.941 | 0.7466 | 1.074 | 0.9892 | -#> |.....................| 1.458 |...........|...........|...........| -#> | X| 7055.7467 | 3.818 | 0.1069 | 0.02050 | 6.988 | -#> |.....................| 2.941 | 0.7466 | 1.074 | 0.9892 | -#> |.....................| 1.458 |...........|...........|...........| -#> | 3| 499.76989 | 0.9041 | -0.9669 | -1.000 | -0.8885 | -#> |.....................| -0.8434 | -0.9072 | -0.8950 | -0.8986 | -#> |.....................| -0.8828 |...........|...........|...........| -#> | U| 499.76989 | 85.03 | -2.229 | -3.887 | 2.030 | -#> |.....................| 2.663 | 0.7612 | 1.031 | 0.9696 | -#> |.....................| 1.329 |...........|...........|...........| -#> | X| 499.76989 | 85.03 | 0.1076 | 0.02051 | 7.611 | -#> |.....................| 2.663 | 0.7612 | 1.031 | 0.9696 | -#> |.....................| 1.329 |...........|...........|...........| -#> | 4| 360.48011 | 0.9904 | -0.9662 | -1.000 | -0.8799 | -#> |.....................| -0.8645 | -0.9053 | -0.8992 | -0.9007 | -#> |.....................| -0.8927 |...........|...........|...........| -#> | U| 360.48011 | 93.15 | -2.229 | -3.887 | 2.038 | -#> |.....................| 2.635 | 0.7627 | 1.026 | 0.9677 | -#> |.....................| 1.316 |...........|...........|...........| -#> | X| 360.48011 | 93.15 | 0.1077 | 0.02051 | 7.676 | -#> |.....................| 2.635 | 0.7627 | 1.026 | 0.9677 | -#> |.....................| 1.316 |...........|...........|...........| -#> | 5| 360.80998 | 0.9960 | -0.9662 | -1.000 | -0.8794 | -#> |.....................| -0.8659 | -0.9051 | -0.8995 | -0.9008 | -#> |.....................| -0.8933 |...........|...........|...........| -#> | U| 360.80998 | 93.68 | -2.229 | -3.887 | 2.039 | -#> |.....................| 2.633 | 0.7628 | 1.026 | 0.9676 | -#> |.....................| 1.315 |...........|...........|...........| -#> | X| 360.80998 | 93.68 | 0.1077 | 0.02051 | 7.680 | -#> |.....................| 2.633 | 0.7628 | 1.026 | 0.9676 | -#> |.....................| 1.315 |...........|...........|...........| -#> | 6| 361.20154 | 0.9991 | -0.9661 | -1.000 | -0.8791 | -#> |.....................| -0.8667 | -0.9051 | -0.8996 | -0.9009 | -#> |.....................| -0.8937 |...........|...........|...........| -#> | U| 361.20154 | 93.97 | -2.229 | -3.887 | 2.039 | -#> |.....................| 2.632 | 0.7629 | 1.026 | 0.9675 | -#> |.....................| 1.315 |...........|...........|...........| -#> | X| 361.20154 | 93.97 | 0.1077 | 0.02051 | 7.683 | -#> |.....................| 2.632 | 0.7629 | 1.026 | 0.9675 | -#> |.....................| 1.315 |...........|...........|...........| -#> | 7| 361.33469 | 0.9999 | -0.9661 | -1.000 | -0.8790 | -#> |.....................| -0.8669 | -0.9051 | -0.8997 | -0.9009 | -#> |.....................| -0.8938 |...........|...........|...........| -#> | U| 361.33469 | 94.05 | -2.229 | -3.887 | 2.039 | -#> |.....................| 2.632 | 0.7629 | 1.026 | 0.9675 | -#> |.....................| 1.314 |...........|...........|...........| -#> | X| 361.33469 | 94.05 | 0.1077 | 0.02051 | 7.683 | -#> |.....................| 2.632 | 0.7629 | 1.026 | 0.9675 | -#> |.....................| 1.314 |...........|...........|...........| -#> | 8| 361.34878 | 1.000 | -0.9661 | -1.000 | -0.8790 | -#> |.....................| -0.8669 | -0.9051 | -0.8997 | -0.9009 | -#> |.....................| -0.8938 |...........|...........|...........| -#> | U| 361.34878 | 94.06 | -2.229 | -3.887 | 2.039 | -#> |.....................| 2.632 | 0.7629 | 1.026 | 0.9675 | -#> |.....................| 1.314 |...........|...........|...........| -#> | X| 361.34878 | 94.06 | 0.1077 | 0.02051 | 7.683 | -#> |.....................| 2.632 | 0.7629 | 1.026 | 0.9675 | -#> |.....................| 1.314 |...........|...........|...........| -#> | 9| 361.35091 | 1.000 | -0.9661 | -1.000 | -0.8790 | -#> |.....................| -0.8669 | -0.9051 | -0.8997 | -0.9009 | -#> |.....................| -0.8938 |...........|...........|...........| -#> | U| 361.35091 | 94.06 | -2.229 | -3.887 | 2.039 | -#> |.....................| 2.632 | 0.7629 | 1.026 | 0.9675 | -#> |.....................| 1.314 |...........|...........|...........| -#> | X| 361.35091 | 94.06 | 0.1077 | 0.02051 | 7.683 | -#> |.....................| 2.632 | 0.7629 | 1.026 | 0.9675 | -#> |.....................| 1.314 |...........|...........|...........| -#> | 10| 361.35004 | 1.000 | -0.9661 | -1.000 | -0.8790 | -#> |.....................| -0.8669 | -0.9051 | -0.8997 | -0.9009 | -#> |.....................| -0.8938 |...........|...........|...........| -#> | U| 361.35004 | 94.06 | -2.229 | -3.887 | 2.039 | -#> |.....................| 2.632 | 0.7629 | 1.026 | 0.9675 | -#> |.....................| 1.314 |...........|...........|...........| -#> | X| 361.35004 | 94.06 | 0.1077 | 0.02051 | 7.683 | -#> |.....................| 2.632 | 0.7629 | 1.026 | 0.9675 | -#> |.....................| 1.314 |...........|...........|...........| -#> | 11| 361.35006 | 1.000 | -0.9661 | -1.000 | -0.8790 | -#> |.....................| -0.8669 | -0.9051 | -0.8997 | -0.9009 | -#> |.....................| -0.8938 |...........|...........|...........| -#> | U| 361.35006 | 94.06 | -2.229 | -3.887 | 2.039 | -#> |.....................| 2.632 | 0.7629 | 1.026 | 0.9675 | -#> |.....................| 1.314 |...........|...........|...........| -#> | X| 361.35006 | 94.06 | 0.1077 | 0.02051 | 7.683 | -#> |.....................| 2.632 | 0.7629 | 1.026 | 0.9675 | -#> |.....................| 1.314 |...........|...........|...........| -#> | 12| 361.35006 | 1.000 | -0.9661 | -1.000 | -0.8790 | -#> |.....................| -0.8669 | -0.9051 | -0.8997 | -0.9009 | -#> |.....................| -0.8938 |...........|...........|...........| -#> | U| 361.35006 | 94.06 | -2.229 | -3.887 | 2.039 | -#> |.....................| 2.632 | 0.7629 | 1.026 | 0.9675 | -#> |.....................| 1.314 |...........|...........|...........| -#> | X| 361.35006 | 94.06 | 0.1077 | 0.02051 | 7.683 | -#> |.....................| 2.632 | 0.7629 | 1.026 | 0.9675 | -#> |.....................| 1.314 |...........|...........|...........| -#> | 13| 361.35006 | 1.000 | -0.9661 | -1.000 | -0.8790 | -#> |.....................| -0.8669 | -0.9051 | -0.8997 | -0.9009 | -#> |.....................| -0.8938 |...........|...........|...........| -#> | U| 361.35006 | 94.06 | -2.229 | -3.887 | 2.039 | -#> |.....................| 2.632 | 0.7629 | 1.026 | 0.9675 | -#> |.....................| 1.314 |...........|...........|...........| -#> | X| 361.35006 | 94.06 | 0.1077 | 0.02051 | 7.683 | -#> |.....................| 2.632 | 0.7629 | 1.026 | 0.9675 | -#> |.....................| 1.314 |...........|...........|...........| -#> | 14| 361.35006 | 1.000 | -0.9661 | -1.000 | -0.8790 | -#> |.....................| -0.8669 | -0.9051 | -0.8997 | -0.9009 | -#> |.....................| -0.8938 |...........|...........|...........| -#> | U| 361.35006 | 94.06 | -2.229 | -3.887 | 2.039 | -#> |.....................| 2.632 | 0.7629 | 1.026 | 0.9675 | -#> |.....................| 1.314 |...........|...........|...........| -#> | X| 361.35006 | 94.06 | 0.1077 | 0.02051 | 7.683 | -#> |.....................| 2.632 | 0.7629 | 1.026 | 0.9675 | -#> |.....................| 1.314 |...........|...........|...........| -#> | 15| 361.35006 | 1.000 | -0.9661 | -1.000 | -0.8790 | -#> |.....................| -0.8669 | -0.9051 | -0.8997 | -0.9009 | -#> |.....................| -0.8938 |...........|...........|...........| -#> | U| 361.35006 | 94.06 | -2.229 | -3.887 | 2.039 | -#> |.....................| 2.632 | 0.7629 | 1.026 | 0.9675 | -#> |.....................| 1.314 |...........|...........|...........| -#> | X| 361.35006 | 94.06 | 0.1077 | 0.02051 | 7.683 | -#> |.....................| 2.632 | 0.7629 | 1.026 | 0.9675 | -#> |.....................| 1.314 |...........|...........|...........| -#> | 16| 361.35006 | 1.000 | -0.9661 | -1.000 | -0.8790 | -#> |.....................| -0.8669 | -0.9051 | -0.8997 | -0.9009 | -#> |.....................| -0.8938 |...........|...........|...........| -#> | U| 361.35006 | 94.06 | -2.229 | -3.887 | 2.039 | -#> |.....................| 2.632 | 0.7629 | 1.026 | 0.9675 | -#> |.....................| 1.314 |...........|...........|...........| -#> | X| 361.35006 | 94.06 | 0.1077 | 0.02051 | 7.683 | -#> |.....................| 2.632 | 0.7629 | 1.026 | 0.9675 | -#> |.....................| 1.314 |...........|...........|...........| -#> | 17| 361.35006 | 1.000 | -0.9661 | -1.000 | -0.8790 | -#> |.....................| -0.8669 | -0.9051 | -0.8997 | -0.9009 | -#> |.....................| -0.8938 |...........|...........|...........| -#> | U| 361.35006 | 94.06 | -2.229 | -3.887 | 2.039 | -#> |.....................| 2.632 | 0.7629 | 1.026 | 0.9675 | -#> |.....................| 1.314 |...........|...........|...........| -#> | X| 361.35006 | 94.06 | 0.1077 | 0.02051 | 7.683 | -#> |.....................| 2.632 | 0.7629 | 1.026 | 0.9675 | -#> |.....................| 1.314 |...........|...........|...........| -#> | 18| 361.35006 | 1.000 | -0.9661 | -1.000 | -0.8790 | -#> |.....................| -0.8669 | -0.9051 | -0.8997 | -0.9009 | -#> |.....................| -0.8938 |...........|...........|...........| -#> | U| 361.35006 | 94.06 | -2.229 | -3.887 | 2.039 | -#> |.....................| 2.632 | 0.7629 | 1.026 | 0.9675 | -#> |.....................| 1.314 |...........|...........|...........| -#> | X| 361.35006 | 94.06 | 0.1077 | 0.02051 | 7.683 | -#> |.....................| 2.632 | 0.7629 | 1.026 | 0.9675 | -#> |.....................| 1.314 |...........|...........|...........| -#> calculating covariance matrix +f_nlmixr_hs_saem <- nlmixr(f_mmkin_parent["HS", ], est = "saem", + control = saemControl(print = 0)) +
#> parameter labels from comments are typically ignored in non-interactive mode
#> Need to run with the source intact to parse comments
#>
#> → generate SAEM model
#> done
#> Calculating covariance matrix
#>
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → compiling EBE model...
#>
#> done
#> Calculating residuals/tables
#> done
f_nlmixr_hs_focei <- nlmixr(f_mmkin_parent["HS", ], est = "focei", + control = foceiControl(print = 0)) +
#> parameter labels from comments are typically ignored in non-interactive mode
#> Need to run with the source intact to parse comments
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → calculate jacobian
#>
#> → calculate sensitivities
#>
#> → calculate ∂(f)/∂(η)
#>
#> → calculate ∂(R²)/∂(η)
#>
#> → finding duplicate expressions in inner model...
#>
#> → optimizing duplicate expressions in inner model...
#>
#> → finding duplicate expressions in EBE model...
#>
#> → optimizing duplicate expressions in EBE model...
#>
#> → compiling inner model...
#>
#> done
#> → finding duplicate expressions in FD model...
#>
#> → optimizing duplicate expressions in FD model...
#>
#> → compiling EBE model...
#>
#> done
#> → compiling events FD model...
#>
#> done
#> calculating covariance matrix #> done
#> Calculating residuals/tables
#> done
#> Warning: initial ETAs were nudged; (can control by foceiControl(etaNudge=., etaNudge2=))
#> Warning: last objective function was not at minimum, possible problems in optimization
#> Warning: gradient problems with initial estimate and covariance; see $scaleInfo
-f_nlmixr_fomc_saem_tc <- nlmixr(f_mmkin_parent_tc["FOMC", ], est = "saem") -
#> parameter labels from comments are typically ignored in non-interactive mode
#> Need to run with the source intact to parse comments
#>
#> 1: 92.2167 0.0936 1.9256 3.3974 0.7958 0.7197 11.8539 0.0004 -#> 2: 92.5446 0.0892 2.4952 3.3516 0.8528 0.6837 4.5197 0.0001 -#> 3: 9.2720e+01 1.3849e-01 2.5917e+00 3.9204e+00 9.5883e-01 6.4953e-01 4.0268e+00 5.9554e-05 -#> 4: 92.6098 0.1052 2.5494 5.0533 1.0968 0.6171 3.2396 0.0200 -#> 5: 92.6795 0.0406 2.4151 5.6729 1.0420 0.5862 3.1558 0.0183 -#> 6: 92.6580 0.0258 2.3640 5.7014 0.9899 0.5569 3.0212 0.0140 -#> 7: 93.0532 -0.0754 2.2262 7.3582 0.9404 0.5291 2.5591 0.0180 -#> 8: 92.8372 -0.0760 2.2080 6.9903 0.8934 0.5026 2.5653 0.0187 -#> 9: 93.0757 -0.1322 2.1663 6.6408 0.8487 0.4775 2.4943 0.0182 -#> 10: 93.0704 -0.1520 2.1410 6.3087 0.8063 0.4536 2.4004 0.0225 -#> 11: 93.1611 -0.1366 2.1740 5.9933 0.7659 0.4309 2.4242 0.0199 -#> 12: 92.7195 -0.0787 2.2947 5.6936 0.7277 0.4094 2.4532 0.0205 -#> 13: 92.6573 -0.1543 2.1929 5.4089 0.6913 0.3889 2.3750 0.0244 -#> 14: 93.1138 -0.1547 2.1924 5.1385 0.6567 0.3695 2.3590 0.0187 -#> 15: 93.5083 -0.1625 2.1831 4.8816 0.6239 0.3510 2.4420 0.0125 -#> 16: 93.2086 -0.1667 2.1516 4.6375 0.5927 0.3334 2.4527 0.0004 -#> 17: 93.3988 -0.1766 2.1521 4.4056 0.5630 0.3168 2.4527 0.0004 -#> 18: 93.4526 -0.1748 2.1461 4.1853 0.5349 0.3009 2.3775 0.0116 -#> 19: 93.5953 -0.1963 2.1167 3.9761 0.5081 0.2859 2.4693 0.0031 -#> 20: 9.3404e+01 -2.4408e-01 2.0453e+00 3.7773e+00 4.8274e-01 2.7158e-01 2.4789e+00 2.0760e-05 -#> 21: 9.3624e+01 -2.4691e-01 2.0524e+00 3.5884e+00 4.5860e-01 2.5800e-01 2.4789e+00 2.0760e-05 -#> 22: 9.3821e+01 -2.5932e-01 2.0021e+00 3.4090e+00 4.3567e-01 2.8670e-01 2.4182e+00 9.3297e-06 -#> 23: 9.3572e+01 -2.3703e-01 2.0725e+00 3.2385e+00 4.4889e-01 2.7237e-01 2.4525e+00 1.5592e-06 -#> 24: 9.3496e+01 -2.2704e-01 2.0746e+00 3.0766e+00 4.3674e-01 2.5875e-01 2.4569e+00 6.1365e-05 -#> 25: 9.3772e+01 -2.2211e-01 2.0762e+00 2.9228e+00 4.4843e-01 2.6194e-01 2.4015e+00 8.3288e-05 -#> 26: 9.3266e+01 -1.9408e-01 2.1345e+00 2.7766e+00 4.6952e-01 2.4885e-01 2.3827e+00 2.9029e-05 -#> 27: 9.3472e+01 -1.9793e-01 2.1141e+00 3.5922e+00 4.7687e-01 2.3640e-01 2.3827e+00 2.9029e-05 -#> 28: 9.3411e+01 -1.7721e-01 2.1334e+00 3.4125e+00 4.8209e-01 2.2458e-01 2.3864e+00 6.5503e-06 -#> 29: 93.6868 -0.1863 2.1258 4.5379 0.4744 0.2134 2.3001 0.0045 -#> 30: 9.4054e+01 -1.8122e-01 2.1287e+00 4.9729e+00 4.7945e-01 2.0269e-01 2.2979e+00 5.8327e-05 -#> 31: 9.3955e+01 -1.9131e-01 2.1202e+00 5.6375e+00 4.7965e-01 1.9255e-01 2.2671e+00 1.6931e-05 -#> 32: 9.4376e+01 -1.6810e-01 2.1287e+00 5.3556e+00 4.7567e-01 1.8972e-01 2.2483e+00 1.1778e-05 -#> 33: 9.4067e+01 -1.5819e-01 2.1656e+00 5.0878e+00 4.5710e-01 1.9389e-01 2.2696e+00 2.4282e-05 -#> 34: 9.4526e+01 -1.6367e-01 2.1473e+00 4.8334e+00 4.7085e-01 1.8419e-01 2.2919e+00 8.8644e-06 -#> 35: 9.4972e+01 -1.6784e-01 2.1353e+00 4.5917e+00 4.7510e-01 1.7498e-01 2.3129e+00 2.2851e-05 -#> 36: 9.4744e+01 -1.5973e-01 2.1281e+00 5.2356e+00 4.5695e-01 1.8499e-01 2.2896e+00 6.8824e-05 -#> 37: 9.4721e+01 -1.6756e-01 2.1168e+00 5.1111e+00 4.6804e-01 1.8407e-01 2.3035e+00 1.5534e-06 -#> 38: 9.4613e+01 -1.5952e-01 2.1385e+00 4.8555e+00 4.6107e-01 1.7720e-01 2.2650e+00 1.2489e-05 -#> 39: 9.4787e+01 -1.6113e-01 2.1458e+00 4.6128e+00 4.6317e-01 1.8378e-01 2.2831e+00 1.3668e-05 -#> 40: 94.5315 -0.1765 2.1186 4.3821 0.4428 0.1902 2.3132 0.0001 -#> 41: 9.4336e+01 -1.8333e-01 2.1285e+00 4.1630e+00 4.4521e-01 1.9913e-01 2.3092e+00 1.3482e-05 -#> 42: 94.0780 -0.2031 2.0724 3.9549 0.4405 0.1892 2.2704 0.0056 -#> 43: 93.9276 -0.1896 2.1191 3.7571 0.4590 0.1797 2.2396 0.0080 -#> 44: 94.2491 -0.1896 2.1006 3.8473 0.4590 0.1764 2.2774 0.0083 -#> 45: 94.4073 -0.1811 2.1156 3.6550 0.4519 0.1676 2.2682 0.0078 -#> 46: 93.9736 -0.1882 2.1196 3.4722 0.4545 0.1633 2.2775 0.0035 -#> 47: 94.1930 -0.1965 2.1102 3.2986 0.4599 0.1664 2.3243 0.0005 -#> 48: 9.4147e+01 -1.9494e-01 2.1118e+00 3.3188e+00 4.7005e-01 1.7181e-01 2.3345e+00 1.1669e-05 -#> 49: 9.4139e+01 -1.7920e-01 2.1199e+00 3.1528e+00 4.7417e-01 1.6322e-01 2.2794e+00 3.5582e-05 -#> 50: 9.4031e+01 -1.9074e-01 2.1098e+00 2.9952e+00 4.7498e-01 1.6695e-01 2.2574e+00 2.7302e-06 -#> 51: 9.3982e+01 -1.9369e-01 2.1058e+00 2.8848e+00 4.8158e-01 1.8408e-01 2.2447e+00 1.8188e-05 -#> 52: 9.3924e+01 -2.0726e-01 2.0809e+00 3.6064e+00 4.7008e-01 2.0029e-01 2.2319e+00 6.8301e-06 -#> 53: 9.4094e+01 -1.9609e-01 2.0780e+00 4.4341e+00 4.7556e-01 1.9742e-01 2.2701e+00 2.1343e-06 -#> 54: 9.4351e+01 -1.9839e-01 2.0746e+00 4.2124e+00 4.7456e-01 1.8866e-01 2.2778e+00 4.8058e-06 -#> 55: 93.9450 -0.1876 2.1059 4.0017 0.4892 0.1792 2.2720 0.0001 -#> 56: 9.3741e+01 -1.8208e-01 2.1172e+00 3.8017e+00 4.7696e-01 1.7027e-01 2.2332e+00 2.1237e-05 -#> 57: 9.3668e+01 -1.8580e-01 2.1181e+00 3.9224e+00 4.7704e-01 1.7425e-01 2.2512e+00 2.2766e-05 -#> 58: 9.3811e+01 -1.8324e-01 2.1178e+00 3.7263e+00 4.7945e-01 1.7939e-01 2.2512e+00 2.2766e-05 -#> 59: 9.3800e+01 -1.6691e-01 2.1250e+00 3.8213e+00 4.9353e-01 1.8464e-01 2.2763e+00 4.6129e-06 -#> 60: 9.3997e+01 -1.5920e-01 2.1489e+00 3.6303e+00 5.0788e-01 1.7541e-01 2.2466e+00 4.1975e-06 -#> 61: 9.4215e+01 -1.6445e-01 2.1482e+00 3.9303e+00 5.1966e-01 1.6664e-01 2.3053e+00 5.8982e-07 -#> 62: 9.3936e+01 -1.6721e-01 2.1376e+00 4.0316e+00 5.3719e-01 1.7228e-01 2.2841e+00 7.8603e-05 -#> 63: 9.3832e+01 -1.6209e-01 2.1334e+00 3.8698e+00 5.4370e-01 1.7064e-01 2.3046e+00 6.4415e-07 -#> 64: 93.9042 -0.1617 2.1563 5.5384 0.5430 0.1622 2.2988 0.0002 -#> 65: 93.8613 -0.1723 2.1239 6.2143 0.5304 0.1541 2.2949 0.0001 -#> 66: 9.4113e+01 -1.9168e-01 2.1019e+00 7.3588e+00 5.1287e-01 1.4641e-01 2.3164e+00 1.2580e-05 -#> 67: 9.3954e+01 -1.8141e-01 2.1199e+00 6.9909e+00 5.0278e-01 1.4993e-01 2.2676e+00 1.1126e-05 -#> 68: 93.8741 -0.1852 2.1343 6.6414 0.4997 0.1493 2.2706 0.0001 -#> 69: 9.3657e+01 -1.8345e-01 2.1375e+00 6.3093e+00 5.0292e-01 1.6326e-01 2.2809e+00 1.7299e-07 -#> 70: 9.3762e+01 -1.7493e-01 2.1512e+00 5.9938e+00 5.1042e-01 1.5509e-01 2.2837e+00 4.5745e-05 -#> 71: 9.4060e+01 -1.6516e-01 2.1440e+00 5.6941e+00 5.1615e-01 1.4734e-01 2.3001e+00 3.9993e-07 -#> 72: 9.3927e+01 -1.7365e-01 2.1347e+00 5.4094e+00 5.2582e-01 1.3997e-01 2.3075e+00 6.3748e-06 -#> 73: 9.4049e+01 -1.8080e-01 2.1254e+00 5.1390e+00 5.1154e-01 1.3297e-01 2.3042e+00 9.5858e-06 -#> 74: 9.3917e+01 -1.9083e-01 2.1051e+00 4.8820e+00 5.0104e-01 1.4605e-01 2.2733e+00 7.4923e-05 -#> 75: 9.4271e+01 -1.8281e-01 2.1059e+00 5.0872e+00 5.0773e-01 1.5322e-01 2.2387e+00 1.4240e-05 -#> 76: 9.4205e+01 -1.8352e-01 2.1160e+00 4.8328e+00 5.0684e-01 1.5669e-01 2.2708e+00 3.6346e-05 -#> 77: 9.4480e+01 -1.8352e-01 2.0942e+00 4.9009e+00 5.0684e-01 1.4885e-01 2.3098e+00 1.8186e-06 -#> 78: 9.4699e+01 -1.9686e-01 2.0671e+00 4.6559e+00 4.9182e-01 1.4503e-01 2.2806e+00 7.9443e-08 -#> 79: 9.4785e+01 -2.0649e-01 2.0500e+00 6.0608e+00 4.6723e-01 1.6185e-01 2.2607e+00 2.1557e-07 -#> 80: 9.4782e+01 -2.0045e-01 2.0680e+00 5.7578e+00 4.5759e-01 1.5747e-01 2.2926e+00 8.6381e-06 -#> 81: 9.4339e+01 -2.0435e-01 2.0885e+00 6.9051e+00 4.5054e-01 1.7410e-01 2.2796e+00 1.5517e-05 -#> 82: 9.4805e+01 -2.1032e-01 2.0658e+00 7.1580e+00 4.7091e-01 1.6539e-01 2.3013e+00 1.3893e-05 -#> 83: 9.4650e+01 -2.0507e-01 2.0485e+00 6.8001e+00 4.7624e-01 1.5938e-01 2.3104e+00 6.6569e-06 -#> 84: 9.4766e+01 -1.9959e-01 2.0667e+00 6.4601e+00 4.7322e-01 1.5619e-01 2.3359e+00 1.8890e-09 -#> 85: 9.4714e+01 -1.9959e-01 2.0756e+00 6.1371e+00 4.7322e-01 1.6894e-01 2.2738e+00 4.9578e-06 -#> 86: 9.4466e+01 -2.0544e-01 2.0626e+00 5.8302e+00 4.6340e-01 1.6050e-01 2.2773e+00 3.6221e-07 -#> 87: 9.4786e+01 -1.9292e-01 2.0703e+00 5.5387e+00 4.6881e-01 1.5641e-01 2.2746e+00 2.3326e-05 -#> 88: 9.4573e+01 -1.9488e-01 2.0597e+00 5.2618e+00 4.6538e-01 1.5079e-01 2.3225e+00 4.7054e-05 -#> 89: 94.8466 -0.2040 2.0603 4.9987 0.4620 0.1456 2.2807 0.0002 -#> 90: 9.4839e+01 -2.0359e-01 2.0673e+00 4.7488e+00 4.5379e-01 1.4729e-01 2.3099e+00 2.7922e-05 -#> 91: 9.4897e+01 -2.0635e-01 2.0496e+00 4.5113e+00 4.4018e-01 1.3993e-01 2.2924e+00 1.7074e-05 -#> 92: 9.4740e+01 -2.0567e-01 2.0518e+00 4.2858e+00 4.6190e-01 1.3293e-01 2.3396e+00 9.0471e-05 -#> 93: 94.9558 -0.2033 2.0824 4.0715 0.4877 0.1263 2.3785 0.0082 -#> 94: 95.1673 -0.1801 2.0900 3.8679 0.5150 0.1200 2.4128 0.0106 -#> 95: 95.3129 -0.1686 2.1057 3.6745 0.4892 0.1140 2.4135 0.0147 -#> 96: 9.5235e+01 -1.6834e-01 2.1069e+00 3.4908e+00 4.9584e-01 1.0827e-01 2.4408e+00 2.5829e-06 -#> 97: 9.4892e+01 -1.5911e-01 2.1277e+00 3.3162e+00 4.7518e-01 1.0286e-01 2.4658e+00 1.8589e-05 -#> 98: 9.4749e+01 -1.6133e-01 2.1204e+00 4.5926e+00 4.6435e-01 1.0192e-01 2.4716e+00 5.8808e-09 -#> 99: 9.4546e+01 -1.5627e-01 2.1358e+00 5.5648e+00 4.8843e-01 1.0047e-01 2.5033e+00 2.5865e-05 -#> 100: 9.4544e+01 -1.6341e-01 2.1317e+00 5.2974e+00 4.7076e-01 1.1065e-01 2.4711e+00 4.4438e-05 -#> 101: 94.2461 -0.1640 2.1458 5.0325 0.4750 0.1107 2.5297 0.0002 -#> 102: 9.4039e+01 -1.6946e-01 2.1490e+00 4.9929e+00 4.7265e-01 1.2109e-01 2.3907e+00 2.3093e-05 -#> 103: 9.4132e+01 -1.6840e-01 2.1250e+00 5.3879e+00 4.7062e-01 1.2389e-01 2.3401e+00 5.4840e-07 -#> 104: 9.4376e+01 -1.6842e-01 2.1239e+00 7.9826e+00 4.7053e-01 1.1769e-01 2.3663e+00 1.9617e-05 -#> 105: 9.4370e+01 -1.7024e-01 2.1187e+00 7.5834e+00 4.6738e-01 1.1683e-01 2.3471e+00 1.4035e-05 -#> 106: 9.4462e+01 -1.6562e-01 2.1406e+00 7.5466e+00 4.6364e-01 1.2640e-01 2.3140e+00 4.7933e-05 -#> 107: 9.4541e+01 -1.6582e-01 2.1308e+00 7.1692e+00 4.6457e-01 1.2964e-01 2.3395e+00 1.8489e-05 -#> 108: 9.4709e+01 -1.6157e-01 2.1484e+00 6.8108e+00 4.5925e-01 1.3393e-01 2.3340e+00 1.5230e-06 -#> 109: 9.4450e+01 -1.8900e-01 2.0799e+00 6.4702e+00 4.4801e-01 1.4728e-01 2.3847e+00 3.2613e-05 -#> 110: 9.4180e+01 -1.9104e-01 2.1172e+00 6.1467e+00 4.5389e-01 1.4273e-01 2.3775e+00 6.0285e-05 -#> 111: 9.4366e+01 -1.8908e-01 2.1031e+00 5.8394e+00 4.4875e-01 1.4983e-01 2.3898e+00 7.2653e-05 -#> 112: 9.4008e+01 -1.8144e-01 2.1008e+00 5.5474e+00 4.6433e-01 1.4234e-01 2.3705e+00 9.9395e-06 -#> 113: 9.4372e+01 -1.8885e-01 2.1154e+00 5.2700e+00 4.7983e-01 1.3522e-01 2.3641e+00 1.8643e-05 -#> 114: 94.1292 -0.1872 2.1134 5.0065 0.4824 0.1285 2.3163 0.0001 -#> 115: 9.4510e+01 -1.7805e-01 2.1185e+00 4.7562e+00 4.8451e-01 1.2204e-01 2.3568e+00 1.6277e-07 -#> 116: 9.4234e+01 -1.8613e-01 2.1214e+00 4.5184e+00 4.7967e-01 1.2275e-01 2.3388e+00 3.4361e-05 -#> 117: 9.4438e+01 -1.7276e-01 2.1218e+00 4.2925e+00 4.6200e-01 1.1662e-01 2.3686e+00 5.6594e-06 -#> 118: 9.4498e+01 -1.7628e-01 2.1143e+00 6.2395e+00 4.5445e-01 1.2378e-01 2.3303e+00 6.5645e-05 -#> 119: 9.4303e+01 -1.8107e-01 2.1120e+00 7.5774e+00 4.6102e-01 1.2829e-01 2.3595e+00 9.4057e-06 -#> 120: 9.4022e+01 -1.7626e-01 2.1258e+00 9.9044e+00 4.6505e-01 1.5188e-01 2.3582e+00 3.6907e-05 -#> 121: 9.4103e+01 -1.5976e-01 2.1354e+00 9.4091e+00 4.7792e-01 1.5429e-01 2.3729e+00 4.6749e-05 -#> 122: 9.4727e+01 -1.9092e-01 2.0956e+00 8.9387e+00 4.5402e-01 1.6371e-01 2.3118e+00 6.8573e-06 -#> 123: 9.4447e+01 -1.9139e-01 2.0898e+00 8.4918e+00 4.3317e-01 1.7569e-01 2.3083e+00 4.4068e-05 -#> 124: 9.4422e+01 -1.9130e-01 2.0920e+00 8.0672e+00 4.3952e-01 1.7160e-01 2.3003e+00 1.7162e-05 -#> 125: 9.4608e+01 -1.7777e-01 2.1007e+00 7.6638e+00 4.8253e-01 1.6302e-01 2.3244e+00 1.9896e-05 -#> 126: 9.4512e+01 -1.6596e-01 2.1139e+00 7.2806e+00 4.7648e-01 1.7588e-01 2.2913e+00 4.9747e-05 -#> 127: 9.4983e+01 -1.6562e-01 2.1290e+00 6.9166e+00 4.7028e-01 1.6709e-01 2.3141e+00 3.3357e-05 -#> 128: 94.3910 -0.1728 2.1159 6.5708 0.4914 0.1850 2.3173 0.0001 -#> 129: 9.4578e+01 -1.7211e-01 2.1177e+00 6.2422e+00 4.8295e-01 1.7709e-01 2.2815e+00 4.8158e-05 -#> 130: 9.4646e+01 -1.6785e-01 2.1333e+00 5.9301e+00 4.6360e-01 1.6823e-01 2.3140e+00 2.1204e-05 -#> 131: 9.4670e+01 -1.4897e-01 2.1480e+00 5.6336e+00 4.8826e-01 1.5982e-01 2.3436e+00 1.3221e-05 -#> 132: 9.4625e+01 -1.6160e-01 2.1599e+00 5.3519e+00 4.6385e-01 1.6125e-01 2.2830e+00 9.6815e-06 -#> 133: 9.3985e+01 -1.7636e-01 2.1299e+00 5.8178e+00 4.4885e-01 1.5389e-01 2.2810e+00 6.7789e-06 -#> 134: 9.4105e+01 -1.7389e-01 2.1199e+00 5.5269e+00 4.5848e-01 1.4628e-01 2.2992e+00 7.6542e-06 -#> 135: 9.4387e+01 -1.5936e-01 2.1418e+00 5.2506e+00 4.5002e-01 1.6349e-01 2.3403e+00 7.6250e-05 -#> 136: 94.3595 -0.1696 2.1493 4.9880 0.4407 0.1722 2.3121 0.0001 -#> 137: 9.4056e+01 -1.6030e-01 2.1720e+00 5.5600e+00 4.4954e-01 1.8233e-01 2.3099e+00 2.1195e-05 -#> 138: 9.4043e+01 -1.4848e-01 2.1876e+00 5.2820e+00 4.5696e-01 1.8542e-01 2.2876e+00 8.7271e-06 -#> 139: 94.3020 -0.1374 2.1965 5.6428 0.4668 0.1927 2.3341 0.0001 -#> 140: 9.4260e+01 -1.3603e-01 2.2014e+00 5.7727e+00 4.6823e-01 1.8302e-01 2.3248e+00 1.4731e-06 -#> 141: 9.4302e+01 -1.2134e-01 2.1992e+00 5.4841e+00 4.8967e-01 1.7947e-01 2.3212e+00 1.6339e-05 -#> 142: 94.0970 -0.1143 2.2570 5.4173 0.4766 0.1726 2.3581 0.0077 -#> 143: 94.2078 -0.1162 2.2460 5.1464 0.4745 0.1874 2.3551 0.0152 -#> 144: 94.2085 -0.0953 2.2685 4.8891 0.5010 0.1780 2.3881 0.0095 -#> 145: 94.1483 -0.0906 2.2751 5.0705 0.4959 0.1770 2.3103 0.0143 -#> 146: 94.4257 -0.0859 2.2735 5.0201 0.5331 0.2050 2.3104 0.0160 -#> 147: 93.8072 -0.0887 2.2766 4.7691 0.5253 0.2200 2.2903 0.0180 -#> 148: 94.4354 -0.0901 2.2770 4.5306 0.5237 0.2147 2.3108 0.0150 -#> 149: 94.1171 -0.1126 2.2342 4.3041 0.5412 0.2300 2.3454 0.0126 -#> 150: 94.0704 -0.1267 2.2071 4.0889 0.5324 0.2185 2.3673 0.0097 -#> 151: 93.9860 -0.1480 2.1852 3.8844 0.5101 0.2529 2.3280 0.0056 -#> 152: 93.9500 -0.1419 2.1940 4.4687 0.5066 0.2371 2.3617 0.0002 -#> 153: 93.8058 -0.1368 2.1917 4.2493 0.5068 0.2057 2.3481 0.0002 -#> 154: 9.4043e+01 -1.3331e-01 2.1972e+00 4.3921e+00 4.7605e-01 1.9689e-01 2.3952e+00 9.5657e-05 -#> 155: 94.2500 -0.1223 2.2260 5.7786 0.4848 0.1829 2.3361 0.0075 -#> 156: 94.5035 -0.1223 2.2091 6.1344 0.4848 0.1558 2.3951 0.0048 -#> 157: 9.4448e+01 -1.3268e-01 2.1797e+00 6.4746e+00 4.6934e-01 1.6035e-01 2.3496e+00 5.2771e-05 -#> 158: 94.7438 -0.1401 2.1904 6.0162 0.4589 0.1692 2.3444 0.0001 -#> 159: 94.2681 -0.1430 2.1852 4.6165 0.4774 0.1617 2.3601 0.0001 -#> 160: 9.3911e+01 -1.1659e-01 2.2267e+00 4.9756e+00 4.9349e-01 1.7150e-01 2.3500e+00 9.0374e-06 -#> 161: 9.3914e+01 -1.1938e-01 2.2233e+00 4.8238e+00 4.9674e-01 1.8358e-01 2.3536e+00 1.1877e-06 -#> 162: 93.9974 -0.1188 2.2349 5.1092 0.4967 0.1714 2.3237 0.0041 -#> 163: 9.3939e+01 -1.2170e-01 2.2147e+00 4.8315e+00 5.0622e-01 1.8195e-01 2.3823e+00 2.4030e-05 -#> 164: 93.8015 -0.1362 2.2166 3.9112 0.4958 0.1684 2.3488 0.0072 -#> 165: 93.4082 -0.1398 2.2132 3.2992 0.5087 0.1734 2.2861 0.0125 -#> 166: 93.4680 -0.1421 2.2077 3.3232 0.5075 0.1643 2.2792 0.0149 -#> 167: 93.5455 -0.1443 2.2080 3.7465 0.4972 0.1685 2.2194 0.0191 -#> 168: 93.5603 -0.1711 2.1421 3.2407 0.5201 0.1940 2.3029 0.0198 -#> 169: 93.7281 -0.1578 2.1553 2.5110 0.4988 0.1836 2.3343 0.0134 -#> 170: 93.9675 -0.1564 2.1532 2.2507 0.5049 0.1753 2.3089 0.0110 -#> 171: 93.8255 -0.1543 2.1647 2.7302 0.5114 0.1691 2.2959 0.0113 -#> 172: 93.8071 -0.1536 2.1689 2.5849 0.5069 0.1751 2.3047 0.0099 -#> 173: 93.7137 -0.1403 2.2096 1.5160 0.5204 0.1622 2.3452 0.0155 -#> 174: 93.7182 -0.1376 2.1975 1.3366 0.5222 0.1700 2.3311 0.0149 -#> 175: 93.5957 -0.1587 2.1613 1.3539 0.5321 0.1470 2.3893 0.0156 -#> 176: 93.6058 -0.1587 2.1602 1.4588 0.5321 0.1412 2.4323 0.0116 -#> 177: 93.4496 -0.1858 2.1323 1.2423 0.4987 0.1460 2.3491 0.0167 -#> 178: 93.5894 -0.1935 2.1217 1.7812 0.4776 0.1643 2.3046 0.0168 -#> 179: 93.6386 -0.1887 2.1445 2.8813 0.4808 0.1585 2.2689 0.0192 -#> 180: 93.9288 -0.1950 2.1015 2.0905 0.4681 0.1557 2.2783 0.0170 -#> 181: 93.8165 -0.1950 2.0840 2.6302 0.4681 0.1592 2.3643 0.0173 -#> 182: 94.2132 -0.1936 2.0866 3.0185 0.5131 0.1712 2.3164 0.0147 -#> 183: 94.0929 -0.1896 2.0782 3.0716 0.5288 0.1644 2.5169 0.0066 -#> 184: 93.8694 -0.1968 2.0946 2.4734 0.5121 0.1709 2.3795 0.0071 -#> 185: 93.8138 -0.1970 2.0987 2.9707 0.4957 0.1500 2.3995 0.0034 -#> 186: 9.4047e+01 -2.1045e-01 2.0791e+00 3.6686e+00 4.8764e-01 1.4347e-01 2.3654e+00 3.8127e-05 -#> 187: 9.4498e+01 -1.9649e-01 2.0949e+00 2.0912e+00 4.7479e-01 1.6122e-01 2.3873e+00 4.7739e-06 -#> 188: 9.4650e+01 -1.8508e-01 2.1132e+00 2.1529e+00 4.6244e-01 1.4403e-01 2.3367e+00 3.5345e-06 -#> 189: 9.4301e+01 -1.8137e-01 2.1132e+00 2.6433e+00 4.4894e-01 1.3537e-01 2.3145e+00 9.6836e-06 -#> 190: 9.4501e+01 -1.8209e-01 2.0962e+00 3.1460e+00 4.4908e-01 1.2006e-01 2.3563e+00 3.3387e-05 -#> 191: 9.4156e+01 -2.0214e-01 2.0803e+00 3.2334e+00 4.7635e-01 1.1917e-01 2.3782e+00 6.6641e-06 -#> 192: 9.3981e+01 -2.1562e-01 2.0492e+00 3.0526e+00 5.0505e-01 1.3669e-01 2.3412e+00 7.3871e-05 -#> 193: 9.4085e+01 -2.2693e-01 2.0318e+00 2.9855e+00 4.9563e-01 1.4371e-01 2.3727e+00 8.6443e-05 -#> 194: 9.3922e+01 -2.3089e-01 2.0323e+00 2.9709e+00 4.9151e-01 1.4470e-01 2.3667e+00 3.5941e-05 -#> 195: 9.4180e+01 -2.2865e-01 2.0284e+00 2.2426e+00 4.8793e-01 1.5283e-01 2.3442e+00 1.8882e-05 -#> 196: 9.4259e+01 -2.0053e-01 2.0541e+00 1.5155e+00 5.1571e-01 1.5596e-01 2.3638e+00 2.9015e-05 -#> 197: 9.4225e+01 -2.0144e-01 2.0551e+00 1.6032e+00 5.0920e-01 1.6454e-01 2.3564e+00 2.7823e-05 -#> 198: 9.4166e+01 -1.9411e-01 2.0602e+00 1.8793e+00 5.5190e-01 1.8338e-01 2.3611e+00 1.6669e-05 -#> 199: 9.4230e+01 -1.9621e-01 2.0737e+00 1.8847e+00 5.4082e-01 1.7340e-01 2.3488e+00 5.8282e-07 -#> 200: 9.4215e+01 -1.9629e-01 2.0888e+00 1.9185e+00 5.4293e-01 1.7502e-01 2.3563e+00 5.7303e-06 -#> 201: 94.0654 -0.1931 2.0901 1.8074 0.5373 0.1886 2.3869 0.0025 -#> 202: 93.9801 -0.1898 2.0990 1.6823 0.5318 0.1841 2.4043 0.0016 -#> 203: 94.0246 -0.1893 2.1004 1.6503 0.5286 0.1855 2.3971 0.0012 -#> 204: 93.9893 -0.1870 2.1014 1.6166 0.5276 0.1846 2.3900 0.0010 -#> 205: 94.0154 -0.1854 2.1006 1.5294 0.5286 0.1828 2.3939 0.0009 -#> 206: 94.0468 -0.1833 2.1024 1.5102 0.5295 0.1807 2.3967 0.0007 -#> 207: 94.0641 -0.1810 2.1049 1.5136 0.5289 0.1798 2.4037 0.0008 -#> 208: 94.0794 -0.1790 2.1062 1.5078 0.5286 0.1790 2.4139 0.0007 -#> 209: 94.0892 -0.1799 2.1049 1.4549 0.5261 0.1793 2.4144 0.0006 -#> 210: 94.0911 -0.1817 2.1042 1.4537 0.5217 0.1810 2.4069 0.0012 -#> 211: 94.1011 -0.1828 2.1016 1.4582 0.5235 0.1825 2.4049 0.0011 -#> 212: 94.1081 -0.1839 2.0989 1.4657 0.5255 0.1838 2.4031 0.0010 -#> 213: 94.1264 -0.1842 2.0973 1.4527 0.5263 0.1851 2.4026 0.0010 -#> 214: 94.1287 -0.1844 2.0974 1.4405 0.5270 0.1869 2.4006 0.0009 -#> 215: 94.1440 -0.1850 2.0973 1.4556 0.5269 0.1876 2.3985 0.0009 -#> 216: 94.1352 -0.1863 2.0970 1.4698 0.5258 0.1885 2.3977 0.0008 -#> 217: 94.1261 -0.1868 2.0962 1.4850 0.5244 0.1897 2.3946 0.0008 -#> 218: 94.1100 -0.1858 2.0987 1.4673 0.5230 0.1934 2.3924 0.0007 -#> 219: 94.1073 -0.1845 2.1013 1.4630 0.5218 0.1993 2.3890 0.0011 -#> 220: 94.1026 -0.1836 2.1030 1.4705 0.5205 0.2028 2.3904 0.0010 -#> 221: 94.0972 -0.1824 2.1046 1.4732 0.5198 0.2065 2.3907 0.0010 -#> 222: 94.0898 -0.1824 2.1052 1.4952 0.5180 0.2083 2.3892 0.0010 -#> 223: 94.0975 -0.1830 2.1050 1.5035 0.5161 0.2107 2.3888 0.0011 -#> 224: 94.1027 -0.1831 2.1050 1.5196 0.5148 0.2124 2.3878 0.0011 -#> 225: 94.0977 -0.1828 2.1065 1.5153 0.5142 0.2141 2.3856 0.0013 -#> 226: 94.0907 -0.1831 2.1066 1.5287 0.5130 0.2151 2.3828 0.0014 -#> 227: 94.0831 -0.1833 2.1065 1.5535 0.5119 0.2159 2.3814 0.0014 -#> 228: 94.0834 -0.1832 2.1072 1.5713 0.5114 0.2174 2.3813 0.0014 -#> 229: 94.0793 -0.1832 2.1076 1.6041 0.5111 0.2184 2.3811 0.0015 -#> 230: 94.0701 -0.1843 2.1064 1.6177 0.5096 0.2181 2.3803 0.0017 -#> 231: 94.0598 -0.1853 2.1052 1.6254 0.5085 0.2180 2.3818 0.0016 -#> 232: 94.0539 -0.1862 2.1045 1.6254 0.5074 0.2175 2.3824 0.0017 -#> 233: 94.0498 -0.1869 2.1034 1.6380 0.5065 0.2169 2.3826 0.0017 -#> 234: 94.0514 -0.1872 2.1035 1.6300 0.5050 0.2160 2.3829 0.0017 -#> 235: 94.0521 -0.1876 2.1026 1.6263 0.5041 0.2148 2.3825 0.0018 -#> 236: 94.0587 -0.1876 2.1024 1.6277 0.5023 0.2134 2.3834 0.0020 -#> 237: 94.0741 -0.1873 2.1025 1.6349 0.5013 0.2120 2.3828 0.0019 -#> 238: 94.0898 -0.1876 2.1022 1.6509 0.4997 0.2107 2.3837 0.0019 -#> 239: 94.1055 -0.1880 2.1016 1.6596 0.4979 0.2098 2.3836 0.0018 -#> 240: 94.1209 -0.1885 2.1007 1.6627 0.4958 0.2092 2.3831 0.0018 -#> 241: 94.1322 -0.1893 2.0992 1.6563 0.4945 0.2085 2.3825 0.0017 -#> 242: 94.1404 -0.1904 2.0976 1.6574 0.4930 0.2082 2.3814 0.0017 -#> 243: 94.1428 -0.1914 2.0961 1.6412 0.4918 0.2078 2.3800 0.0017 -#> 244: 94.1477 -0.1923 2.0945 1.6287 0.4907 0.2071 2.3795 0.0016 -#> 245: 94.1525 -0.1931 2.0933 1.6225 0.4897 0.2064 2.3791 0.0016 -#> 246: 94.1557 -0.1938 2.0927 1.6243 0.4890 0.2048 2.3780 0.0016 -#> 247: 94.1576 -0.1943 2.0919 1.6333 0.4881 0.2034 2.3777 0.0015 -#> 248: 94.1603 -0.1951 2.0909 1.6328 0.4863 0.2026 2.3775 0.0015 -#> 249: 94.1648 -0.1957 2.0898 1.6427 0.4847 0.2018 2.3774 0.0015 -#> 250: 94.1766 -0.1963 2.0889 1.6482 0.4829 0.2012 2.3770 0.0015 -#> 251: 94.1854 -0.1971 2.0875 1.6536 0.4806 0.2011 2.3769 0.0016 -#> 252: 94.1906 -0.1980 2.0861 1.6527 0.4785 0.2013 2.3763 0.0017 -#> 253: 94.1913 -0.1982 2.0857 1.6459 0.4772 0.2014 2.3751 0.0019 -#> 254: 94.1945 -0.1985 2.0852 1.6413 0.4759 0.2019 2.3755 0.0019 -#> 255: 94.1972 -0.1989 2.0837 1.6451 0.4754 0.2027 2.3753 0.0018 -#> 256: 94.1994 -0.1989 2.0833 1.6548 0.4758 0.2024 2.3752 0.0018 -#> 257: 94.2014 -0.1987 2.0833 1.6708 0.4765 0.2024 2.3752 0.0018 -#> 258: 94.2081 -0.1984 2.0836 1.6903 0.4768 0.2023 2.3749 0.0017 -#> 259: 94.2151 -0.1982 2.0839 1.7169 0.4767 0.2023 2.3737 0.0017 -#> 260: 94.2212 -0.1980 2.0838 1.7426 0.4766 0.2031 2.3725 0.0017 -#> 261: 94.2229 -0.1981 2.0835 1.7696 0.4764 0.2038 2.3714 0.0017 -#> 262: 94.2213 -0.1983 2.0832 1.7977 0.4762 0.2045 2.3704 0.0016 -#> 263: 94.2220 -0.1984 2.0830 1.8277 0.4764 0.2051 2.3700 0.0016 -#> 264: 94.2230 -0.1983 2.0830 1.8430 0.4766 0.2057 2.3690 0.0016 -#> 265: 94.2235 -0.1983 2.0832 1.8679 0.4768 0.2060 2.3674 0.0016 -#> 266: 94.2242 -0.1982 2.0833 1.8705 0.4769 0.2064 2.3658 0.0015 -#> 267: 94.2267 -0.1982 2.0832 1.8715 0.4769 0.2070 2.3643 0.0015 -#> 268: 94.2312 -0.1980 2.0834 1.8824 0.4769 0.2074 2.3631 0.0015 -#> 269: 94.2329 -0.1981 2.0829 1.8843 0.4766 0.2084 2.3628 0.0015 -#> 270: 94.2321 -0.1982 2.0825 1.8904 0.4770 0.2093 2.3629 0.0015 -#> 271: 94.2349 -0.1985 2.0820 1.8942 0.4769 0.2101 2.3633 0.0016 -#> 272: 94.2388 -0.1989 2.0818 1.9099 0.4767 0.2110 2.3634 0.0018 -#> 273: 94.2420 -0.1992 2.0816 1.9259 0.4765 0.2118 2.3632 0.0018 -#> 274: 94.2454 -0.1994 2.0813 1.9330 0.4763 0.2128 2.3629 0.0017 -#> 275: 94.2456 -0.1997 2.0810 1.9316 0.4761 0.2138 2.3624 0.0018 -#> 276: 94.2472 -0.1999 2.0807 1.9306 0.4758 0.2146 2.3624 0.0019 -#> 277: 94.2492 -0.2001 2.0808 1.9326 0.4756 0.2153 2.3623 0.0020 -#> 278: 94.2493 -0.2003 2.0807 1.9225 0.4752 0.2163 2.3628 0.0020 -#> 279: 94.2481 -0.2002 2.0808 1.9206 0.4750 0.2168 2.3628 0.0019 -#> 280: 94.2433 -0.2002 2.0810 1.9257 0.4749 0.2173 2.3626 0.0019 -#> 281: 94.2358 -0.2004 2.0809 1.9217 0.4748 0.2173 2.3620 0.0019 -#> 282: 94.2307 -0.2005 2.0807 1.9209 0.4748 0.2172 2.3617 0.0019 -#> 283: 94.2302 -0.2008 2.0803 1.9131 0.4748 0.2172 2.3615 0.0019 -#> 284: 94.2309 -0.2009 2.0802 1.9085 0.4749 0.2171 2.3610 0.0018 -#> 285: 94.2344 -0.2010 2.0799 1.9135 0.4749 0.2170 2.3603 0.0018 -#> 286: 94.2381 -0.2013 2.0794 1.9099 0.4749 0.2167 2.3596 0.0018 -#> 287: 94.2420 -0.2016 2.0786 1.9105 0.4749 0.2164 2.3596 0.0018 -#> 288: 94.2425 -0.2020 2.0778 1.9081 0.4749 0.2161 2.3590 0.0019 -#> 289: 94.2386 -0.2023 2.0773 1.9136 0.4749 0.2158 2.3586 0.0019 -#> 290: 94.2357 -0.2026 2.0768 1.9171 0.4750 0.2154 2.3581 0.0019 -#> 291: 94.2326 -0.2026 2.0765 1.9162 0.4750 0.2150 2.3577 0.0019 -#> 292: 94.2305 -0.2026 2.0766 1.9178 0.4753 0.2144 2.3577 0.0020 -#> 293: 94.2268 -0.2023 2.0771 1.9257 0.4754 0.2138 2.3574 0.0022 -#> 294: 94.2216 -0.2023 2.0773 1.9326 0.4754 0.2132 2.3565 0.0023 -#> 295: 94.2193 -0.2024 2.0769 1.9378 0.4762 0.2125 2.3565 0.0024 -#> 296: 94.2160 -0.2025 2.0765 1.9463 0.4771 0.2117 2.3565 0.0025 -#> 297: 94.2106 -0.2026 2.0761 1.9523 0.4779 0.2109 2.3569 0.0026 -#> 298: 94.2089 -0.2028 2.0756 1.9622 0.4787 0.2099 2.3578 0.0025 -#> 299: 94.2077 -0.2029 2.0753 1.9721 0.4794 0.2090 2.3586 0.0026 -#> 300: 94.2064 -0.2030 2.0749 1.9838 0.4802 0.2080 2.3589 0.0026 -#> 301: 94.2086 -0.2029 2.0747 1.9942 0.4806 0.2071 2.3587 0.0025 -#> 302: 94.2111 -0.2031 2.0744 1.9938 0.4810 0.2063 2.3593 0.0025 -#> 303: 94.2133 -0.2031 2.0743 1.9923 0.4811 0.2056 2.3593 0.0025 -#> 304: 94.2151 -0.2032 2.0739 1.9885 0.4811 0.2049 2.3595 0.0025 -#> 305: 94.2159 -0.2035 2.0735 1.9872 0.4813 0.2044 2.3594 0.0024 -#> 306: 94.2192 -0.2038 2.0729 1.9806 0.4813 0.2041 2.3592 0.0024 -#> 307: 94.2226 -0.2040 2.0724 1.9796 0.4814 0.2038 2.3588 0.0024 -#> 308: 94.2224 -0.2042 2.0723 1.9828 0.4814 0.2036 2.3589 0.0024 -#> 309: 94.2200 -0.2043 2.0723 1.9859 0.4812 0.2034 2.3587 0.0024 -#> 310: 94.2183 -0.2044 2.0723 1.9892 0.4810 0.2034 2.3583 0.0023 -#> 311: 94.2175 -0.2044 2.0724 1.9895 0.4805 0.2033 2.3580 0.0023 -#> 312: 94.2171 -0.2044 2.0725 1.9977 0.4800 0.2032 2.3581 0.0023 -#> 313: 94.2108 -0.2044 2.0728 1.9995 0.4795 0.2030 2.3578 0.0023 -#> 314: 94.2068 -0.2045 2.0730 1.9929 0.4790 0.2029 2.3576 0.0024 -#> 315: 94.2031 -0.2047 2.0730 1.9884 0.4784 0.2028 2.3579 0.0024 -#> 316: 94.2018 -0.2048 2.0731 1.9860 0.4779 0.2026 2.3582 0.0024 -#> 317: 94.2015 -0.2050 2.0729 1.9836 0.4773 0.2025 2.3582 0.0024 -#> 318: 94.2025 -0.2052 2.0728 1.9814 0.4768 0.2024 2.3580 0.0023 -#> 319: 94.2066 -0.2053 2.0726 1.9867 0.4764 0.2024 2.3577 0.0023 -#> 320: 94.2074 -0.2055 2.0727 1.9896 0.4760 0.2024 2.3575 0.0023 -#> 321: 94.2097 -0.2055 2.0728 1.9985 0.4758 0.2026 2.3573 0.0023 -#> 322: 94.2080 -0.2054 2.0731 2.0108 0.4759 0.2028 2.3570 0.0023 -#> 323: 94.2042 -0.2054 2.0732 2.0253 0.4762 0.2030 2.3566 0.0023 -#> 324: 94.2005 -0.2054 2.0733 2.0514 0.4765 0.2032 2.3566 0.0023 -#> 325: 94.2000 -0.2053 2.0735 2.0719 0.4767 0.2034 2.3570 0.0023 -#> 326: 94.2002 -0.2052 2.0738 2.0907 0.4769 0.2034 2.3573 0.0023 -#> 327: 94.1997 -0.2051 2.0741 2.1140 0.4770 0.2035 2.3571 0.0023 -#> 328: 94.1976 -0.2050 2.0743 2.1379 0.4770 0.2035 2.3569 0.0023 -#> 329: 94.1969 -0.2051 2.0741 2.1485 0.4769 0.2038 2.3566 0.0022 -#> 330: 94.1959 -0.2053 2.0738 2.1533 0.4767 0.2042 2.3561 0.0022 -#> 331: 94.1962 -0.2055 2.0733 2.1588 0.4763 0.2046 2.3555 0.0022 -#> 332: 94.1967 -0.2059 2.0727 2.1626 0.4760 0.2051 2.3551 0.0022 -#> 333: 94.1964 -0.2062 2.0721 2.1666 0.4757 0.2056 2.3547 0.0022 -#> 334: 94.1978 -0.2064 2.0718 2.1703 0.4756 0.2063 2.3543 0.0022 -#> 335: 94.1985 -0.2066 2.0715 2.1698 0.4755 0.2068 2.3538 0.0021 -#> 336: 94.1999 -0.2068 2.0711 2.1705 0.4757 0.2075 2.3534 0.0021 -#> 337: 94.1990 -0.2069 2.0708 2.1690 0.4759 0.2080 2.3530 0.0021 -#> 338: 94.1965 -0.2071 2.0706 2.1708 0.4760 0.2085 2.3525 0.0021 -#> 339: 94.1934 -0.2071 2.0704 2.1769 0.4761 0.2088 2.3518 0.0021 -#> 340: 94.1908 -0.2072 2.0704 2.1794 0.4763 0.2091 2.3515 0.0021 -#> 341: 94.1875 -0.2072 2.0706 2.1859 0.4762 0.2092 2.3512 0.0021 -#> 342: 94.1840 -0.2071 2.0707 2.1903 0.4762 0.2093 2.3513 0.0021 -#> 343: 94.1816 -0.2072 2.0706 2.1909 0.4761 0.2093 2.3512 0.0020 -#> 344: 94.1815 -0.2070 2.0708 2.1877 0.4758 0.2091 2.3514 0.0021 -#> 345: 94.1839 -0.2070 2.0710 2.1844 0.4757 0.2090 2.3517 0.0021 -#> 346: 94.1868 -0.2068 2.0713 2.1787 0.4756 0.2088 2.3520 0.0020 -#> 347: 94.1871 -0.2066 2.0717 2.1762 0.4756 0.2086 2.3519 0.0020 -#> 348: 94.1868 -0.2064 2.0722 2.1724 0.4756 0.2084 2.3521 0.0020 -#> 349: 94.1892 -0.2062 2.0725 2.1673 0.4755 0.2080 2.3524 0.0020 -#> 350: 94.1921 -0.2060 2.0726 2.1632 0.4754 0.2076 2.3527 0.0020 -#> 351: 94.1947 -0.2060 2.0726 2.1613 0.4752 0.2073 2.3530 0.0020 -#> 352: 94.1988 -0.2060 2.0725 2.1647 0.4751 0.2069 2.3530 0.0020 -#> 353: 94.2036 -0.2061 2.0721 2.1684 0.4749 0.2067 2.3530 0.0020 -#> 354: 94.2082 -0.2061 2.0719 2.1670 0.4747 0.2063 2.3529 0.0020 -#> 355: 94.2111 -0.2061 2.0718 2.1645 0.4747 0.2062 2.3526 0.0020 -#> 356: 94.2123 -0.2061 2.0717 2.1628 0.4747 0.2063 2.3525 0.0020 -#> 357: 94.2146 -0.2062 2.0716 2.1610 0.4746 0.2064 2.3523 0.0020 -#> 358: 94.2161 -0.2062 2.0715 2.1656 0.4744 0.2065 2.3520 0.0020 -#> 359: 94.2178 -0.2063 2.0714 2.1684 0.4743 0.2065 2.3516 0.0020 -#> 360: 94.2194 -0.2063 2.0713 2.1687 0.4742 0.2065 2.3512 0.0019 -#> 361: 94.2191 -0.2064 2.0713 2.1738 0.4741 0.2065 2.3508 0.0019 -#> 362: 94.2186 -0.2064 2.0713 2.1762 0.4740 0.2065 2.3502 0.0019 -#> 363: 94.2179 -0.2064 2.0714 2.1754 0.4740 0.2065 2.3495 0.0019 -#> 364: 94.2165 -0.2063 2.0715 2.1740 0.4741 0.2064 2.3495 0.0019 -#> 365: 94.2149 -0.2063 2.0716 2.1736 0.4741 0.2062 2.3495 0.0020 -#> 366: 94.2141 -0.2062 2.0717 2.1813 0.4740 0.2064 2.3490 0.0020 -#> 367: 94.2158 -0.2062 2.0717 2.1905 0.4739 0.2063 2.3491 0.0019 -#> 368: 94.2173 -0.2062 2.0718 2.1963 0.4737 0.2063 2.3485 0.0019 -#> 369: 94.2183 -0.2062 2.0717 2.2005 0.4736 0.2064 2.3481 0.0019 -#> 370: 94.2194 -0.2062 2.0716 2.2016 0.4735 0.2063 2.3477 0.0019 -#> 371: 94.2192 -0.2063 2.0715 2.1997 0.4733 0.2064 2.3476 0.0019 -#> 372: 94.2202 -0.2062 2.0716 2.1957 0.4733 0.2065 2.3479 0.0019 -#> 373: 94.2208 -0.2061 2.0717 2.1913 0.4733 0.2065 2.3480 0.0019 -#> 374: 94.2209 -0.2061 2.0719 2.1870 0.4731 0.2065 2.3479 0.0019 -#> 375: 94.2219 -0.2061 2.0719 2.1864 0.4729 0.2064 2.3477 0.0019 -#> 376: 94.2231 -0.2061 2.0720 2.1849 0.4726 0.2063 2.3473 0.0019 -#> 377: 94.2251 -0.2061 2.0720 2.1835 0.4724 0.2063 2.3471 0.0019 -#> 378: 94.2238 -0.2062 2.0719 2.1777 0.4721 0.2062 2.3472 0.0018 -#> 379: 94.2226 -0.2064 2.0717 2.1741 0.4717 0.2063 2.3471 0.0018 -#> 380: 94.2216 -0.2066 2.0714 2.1759 0.4714 0.2063 2.3468 0.0018 -#> 381: 94.2206 -0.2068 2.0711 2.1784 0.4711 0.2063 2.3465 0.0018 -#> 382: 94.2200 -0.2071 2.0707 2.1753 0.4707 0.2062 2.3462 0.0018 -#> 383: 94.2205 -0.2073 2.0704 2.1757 0.4703 0.2061 2.3461 0.0018 -#> 384: 94.2201 -0.2076 2.0702 2.1802 0.4698 0.2060 2.3458 0.0018 -#> 385: 94.2210 -0.2078 2.0701 2.1795 0.4693 0.2061 2.3457 0.0018 -#> 386: 94.2199 -0.2079 2.0700 2.1788 0.4688 0.2061 2.3455 0.0018 -#> 387: 94.2181 -0.2081 2.0699 2.1801 0.4683 0.2061 2.3454 0.0018 -#> 388: 94.2169 -0.2082 2.0699 2.1850 0.4679 0.2061 2.3452 0.0017 -#> 389: 94.2158 -0.2083 2.0699 2.1881 0.4674 0.2063 2.3449 0.0017 -#> 390: 94.2162 -0.2084 2.0696 2.1928 0.4671 0.2064 2.3447 0.0017 -#> 391: 94.2172 -0.2085 2.0696 2.1921 0.4669 0.2063 2.3444 0.0017 -#> 392: 94.2175 -0.2085 2.0695 2.1933 0.4667 0.2063 2.3442 0.0017 -#> 393: 94.2174 -0.2086 2.0695 2.1972 0.4666 0.2062 2.3440 0.0017 -#> 394: 94.2179 -0.2087 2.0694 2.1972 0.4664 0.2061 2.3439 0.0017 -#> 395: 94.2200 -0.2087 2.0694 2.2009 0.4663 0.2059 2.3438 0.0017 -#> 396: 94.2189 -0.2086 2.0695 2.2062 0.4662 0.2058 2.3434 0.0017 -#> 397: 94.2183 -0.2085 2.0696 2.2151 0.4663 0.2056 2.3431 0.0017 -#> 398: 94.2186 -0.2085 2.0696 2.2200 0.4664 0.2056 2.3430 0.0017 -#> 399: 94.2183 -0.2084 2.0698 2.2204 0.4664 0.2056 2.3428 0.0017 -#> 400: 94.2184 -0.2082 2.0703 2.2252 0.4665 0.2054 2.3428 0.0016 -#> 401: 94.2176 -0.2080 2.0707 2.2323 0.4666 0.2052 2.3427 0.0016 -#> 402: 94.2167 -0.2078 2.0712 2.2397 0.4668 0.2050 2.3426 0.0016 -#> 403: 94.2157 -0.2075 2.0716 2.2464 0.4669 0.2049 2.3426 0.0016 -#> 404: 94.2152 -0.2074 2.0719 2.2508 0.4670 0.2047 2.3427 0.0016 -#> 405: 94.2152 -0.2072 2.0723 2.2537 0.4671 0.2046 2.3427 0.0016 -#> 406: 94.2151 -0.2070 2.0726 2.2565 0.4672 0.2044 2.3427 0.0016 -#> 407: 94.2132 -0.2067 2.0731 2.2568 0.4673 0.2044 2.3426 0.0016 -#> 408: 94.2142 -0.2065 2.0734 2.2579 0.4674 0.2046 2.3424 0.0016 -#> 409: 94.2136 -0.2063 2.0738 2.2630 0.4674 0.2046 2.3420 0.0016 -#> 410: 94.2125 -0.2062 2.0739 2.2635 0.4674 0.2047 2.3417 0.0016 -#> 411: 94.2131 -0.2061 2.0741 2.2634 0.4674 0.2048 2.3413 0.0016 -#> 412: 94.2132 -0.2060 2.0742 2.2662 0.4674 0.2048 2.3409 0.0016 -#> 413: 94.2143 -0.2059 2.0743 2.2666 0.4673 0.2048 2.3407 0.0016 -#> 414: 94.2156 -0.2058 2.0743 2.2710 0.4672 0.2048 2.3404 0.0015 -#> 415: 94.2174 -0.2057 2.0745 2.2751 0.4671 0.2049 2.3400 0.0015 -#> 416: 94.2185 -0.2057 2.0746 2.2762 0.4669 0.2049 2.3399 0.0015 -#> 417: 94.2208 -0.2056 2.0748 2.2759 0.4667 0.2049 2.3397 0.0015 -#> 418: 94.2231 -0.2054 2.0751 2.2772 0.4664 0.2050 2.3398 0.0015 -#> 419: 94.2249 -0.2053 2.0754 2.2783 0.4663 0.2050 2.3396 0.0015 -#> 420: 94.2255 -0.2052 2.0757 2.2798 0.4660 0.2050 2.3395 0.0015 -#> 421: 94.2265 -0.2051 2.0759 2.2848 0.4659 0.2050 2.3392 0.0016 -#> 422: 94.2288 -0.2049 2.0761 2.2929 0.4659 0.2050 2.3390 0.0016 -#> 423: 94.2307 -0.2048 2.0762 2.2988 0.4657 0.2051 2.3390 0.0016 -#> 424: 94.2313 -0.2047 2.0764 2.3017 0.4656 0.2051 2.3391 0.0016 -#> 425: 94.2322 -0.2046 2.0765 2.3028 0.4655 0.2050 2.3388 0.0016 -#> 426: 94.2327 -0.2046 2.0765 2.3049 0.4654 0.2050 2.3386 0.0016 -#> 427: 94.2323 -0.2045 2.0768 2.3053 0.4655 0.2049 2.3386 0.0016 -#> 428: 94.2324 -0.2044 2.0770 2.3016 0.4655 0.2048 2.3387 0.0017 -#> 429: 94.2322 -0.2043 2.0772 2.2984 0.4656 0.2047 2.3386 0.0017 -#> 430: 94.2306 -0.2042 2.0774 2.2971 0.4656 0.2046 2.3384 0.0017 -#> 431: 94.2295 -0.2042 2.0775 2.2931 0.4657 0.2044 2.3384 0.0017 -#> 432: 94.2298 -0.2040 2.0778 2.2896 0.4656 0.2044 2.3383 0.0018 -#> 433: 94.2311 -0.2039 2.0780 2.2885 0.4656 0.2044 2.3383 0.0018 -#> 434: 94.2311 -0.2037 2.0783 2.2854 0.4655 0.2044 2.3381 0.0018 -#> 435: 94.2314 -0.2036 2.0786 2.2838 0.4654 0.2044 2.3378 0.0018 -#> 436: 94.2315 -0.2035 2.0788 2.2817 0.4653 0.2044 2.3377 0.0018 -#> 437: 94.2326 -0.2034 2.0790 2.2801 0.4652 0.2044 2.3378 0.0018 -#> 438: 94.2338 -0.2034 2.0791 2.2802 0.4650 0.2046 2.3380 0.0018 -#> 439: 94.2340 -0.2033 2.0791 2.2810 0.4649 0.2046 2.3377 0.0018 -#> 440: 94.2330 -0.2034 2.0791 2.2822 0.4646 0.2046 2.3376 0.0018 -#> 441: 94.2323 -0.2035 2.0790 2.2818 0.4644 0.2046 2.3375 0.0018 -#> 442: 94.2321 -0.2034 2.0792 2.2804 0.4642 0.2043 2.3375 0.0018 -#> 443: 94.2313 -0.2033 2.0794 2.2812 0.4641 0.2041 2.3372 0.0018 -#> 444: 94.2301 -0.2032 2.0796 2.2820 0.4640 0.2040 2.3369 0.0018 -#> 445: 94.2279 -0.2031 2.0799 2.2872 0.4639 0.2039 2.3366 0.0018 -#> 446: 94.2272 -0.2030 2.0801 2.2874 0.4639 0.2037 2.3363 0.0018 -#> 447: 94.2262 -0.2029 2.0803 2.2881 0.4639 0.2036 2.3359 0.0018 -#> 448: 94.2248 -0.2028 2.0806 2.2905 0.4639 0.2036 2.3358 0.0018 -#> 449: 94.2245 -0.2027 2.0808 2.2914 0.4638 0.2035 2.3356 0.0018 -#> 450: 94.2237 -0.2027 2.0809 2.2928 0.4638 0.2035 2.3356 0.0018 -#> 451: 94.2233 -0.2025 2.0813 2.2917 0.4639 0.2033 2.3355 0.0018 -#> 452: 94.2232 -0.2023 2.0816 2.2898 0.4640 0.2031 2.3356 0.0018 -#> 453: 94.2230 -0.2021 2.0819 2.2890 0.4641 0.2030 2.3356 0.0018 -#> 454: 94.2222 -0.2020 2.0822 2.2851 0.4641 0.2029 2.3357 0.0018 -#> 455: 94.2214 -0.2018 2.0824 2.2820 0.4640 0.2028 2.3357 0.0017 -#> 456: 94.2212 -0.2017 2.0827 2.2797 0.4640 0.2026 2.3357 0.0017 -#> 457: 94.2216 -0.2016 2.0829 2.2771 0.4640 0.2024 2.3358 0.0017 -#> 458: 94.2220 -0.2015 2.0831 2.2740 0.4639 0.2022 2.3358 0.0017 -#> 459: 94.2229 -0.2013 2.0834 2.2765 0.4638 0.2021 2.3358 0.0017 -#> 460: 94.2226 -0.2012 2.0837 2.2810 0.4637 0.2020 2.3359 0.0017 -#> 461: 94.2227 -0.2009 2.0841 2.2893 0.4637 0.2018 2.3358 0.0017 -#> 462: 94.2235 -0.2007 2.0844 2.2942 0.4637 0.2016 2.3357 0.0017 -#> 463: 94.2241 -0.2005 2.0848 2.2971 0.4637 0.2014 2.3358 0.0017 -#> 464: 94.2236 -0.2002 2.0853 2.2953 0.4637 0.2012 2.3360 0.0017 -#> 465: 94.2230 -0.2000 2.0858 2.2946 0.4638 0.2010 2.3360 0.0017 -#> 466: 94.2215 -0.1997 2.0863 2.2995 0.4638 0.2009 2.3363 0.0017 -#> 467: 94.2193 -0.1995 2.0868 2.3051 0.4637 0.2008 2.3363 0.0017 -#> 468: 94.2174 -0.1992 2.0874 2.3086 0.4636 0.2006 2.3363 0.0018 -#> 469: 94.2160 -0.1989 2.0881 2.3072 0.4636 0.2006 2.3361 0.0018 -#> 470: 94.2152 -0.1985 2.0887 2.3075 0.4637 0.2005 2.3363 0.0018 -#> 471: 94.2139 -0.1982 2.0891 2.3126 0.4638 0.2004 2.3361 0.0018 -#> 472: 94.2134 -0.1980 2.0895 2.3151 0.4640 0.2002 2.3360 0.0018 -#> 473: 94.2141 -0.1979 2.0897 2.3149 0.4640 0.2001 2.3360 0.0018 -#> 474: 94.2144 -0.1978 2.0900 2.3140 0.4640 0.2001 2.3358 0.0018 -#> 475: 94.2151 -0.1977 2.0901 2.3151 0.4640 0.2000 2.3358 0.0018 -#> 476: 94.2154 -0.1975 2.0903 2.3195 0.4641 0.2001 2.3357 0.0018 -#> 477: 94.2167 -0.1974 2.0905 2.3253 0.4642 0.2002 2.3358 0.0018 -#> 478: 94.2163 -0.1972 2.0909 2.3324 0.4641 0.2004 2.3357 0.0017 -#> 479: 94.2156 -0.1970 2.0912 2.3364 0.4640 0.2006 2.3355 0.0017 -#> 480: 94.2149 -0.1969 2.0915 2.3395 0.4638 0.2007 2.3353 0.0017 -#> 481: 94.2140 -0.1968 2.0918 2.3431 0.4637 0.2008 2.3350 0.0017 -#> 482: 94.2137 -0.1967 2.0919 2.3440 0.4635 0.2010 2.3349 0.0017 -#> 483: 94.2139 -0.1966 2.0920 2.3468 0.4634 0.2011 2.3348 0.0017 -#> 484: 94.2149 -0.1966 2.0921 2.3488 0.4633 0.2012 2.3346 0.0017 -#> 485: 94.2153 -0.1966 2.0921 2.3486 0.4632 0.2012 2.3345 0.0017 -#> 486: 94.2148 -0.1965 2.0923 2.3483 0.4631 0.2015 2.3345 0.0017 -#> 487: 94.2140 -0.1965 2.0923 2.3492 0.4628 0.2018 2.3345 0.0017 -#> 488: 94.2121 -0.1965 2.0923 2.3489 0.4625 0.2020 2.3347 0.0017 -#> 489: 94.2119 -0.1966 2.0923 2.3497 0.4622 0.2023 2.3346 0.0017 -#> 490: 94.2120 -0.1966 2.0923 2.3476 0.4618 0.2025 2.3346 0.0017 -#> 491: 94.2124 -0.1966 2.0923 2.3462 0.4615 0.2028 2.3346 0.0017 -#> 492: 94.2118 -0.1966 2.0923 2.3453 0.4613 0.2029 2.3346 0.0017 -#> 493: 94.2113 -0.1967 2.0923 2.3452 0.4610 0.2030 2.3347 0.0017 -#> 494: 94.2118 -0.1968 2.0922 2.3488 0.4608 0.2030 2.3347 0.0017 -#> 495: 94.2122 -0.1969 2.0920 2.3530 0.4605 0.2029 2.3347 0.0017 -#> 496: 94.2138 -0.1969 2.0919 2.3540 0.4603 0.2028 2.3350 0.0017 -#> 497: 94.2148 -0.1970 2.0917 2.3554 0.4601 0.2029 2.3352 0.0017 -#> 498: 94.2152 -0.1971 2.0916 2.3534 0.4600 0.2029 2.3356 0.0017 -#> 499: 94.2157 -0.1972 2.0914 2.3519 0.4598 0.2029 2.3357 0.0016 -#> 500: 94.2162 -0.1973 2.0912 2.3498 0.4596 0.2030 2.3358 0.0016
#> Calculating covariance matrix
#>
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → compiling EBE model...
#>
#> done
#> Calculating residuals/tables
#> done
f_nlmixr_fomc_focei_tc <- nlmixr(f_mmkin_parent_tc["FOMC", ], est = "focei") -
#> parameter labels from comments are typically ignored in non-interactive mode
#> Need to run with the source intact to parse comments
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → calculate jacobian
#>
#> → calculate sensitivities
#>
#> → calculate ∂(f)/∂(η)
#>
#> → calculate ∂(R²)/∂(η)
#>
#> → finding duplicate expressions in inner model...
#>
#> → optimizing duplicate expressions in inner model...
#>
#> → finding duplicate expressions in EBE model...
#>
#> → optimizing duplicate expressions in EBE model...
#>
#> → compiling inner model...
#>
#> done
#> → finding duplicate expressions in FD model...
#>
#> → optimizing duplicate expressions in FD model...
#>
#> → compiling EBE model...
#>
#> done
#> → compiling events FD model...
#>
#> done
#> Key: U: Unscaled Parameters; X: Back-transformed parameters; G: Gill difference gradient approximation -#> F: Forward difference gradient approximation -#> C: Central difference gradient approximation -#> M: Mixed forward and central difference gradient approximation -#> Unscaled parameters for Omegas=chol(solve(omega)); -#> Diagonals are transformed, as specified by foceiControl(diagXform=) -#> |-----+---------------+-----------+-----------+-----------+-----------| -#> | #| Objective Fun | parent_0 | log_alpha | log_beta | sigma_low | -#> |.....................| rsd_high | o1 | o2 | o3 | -#> | 1| 356.08238 | 1.000 | -1.000 | -0.9495 | -0.9739 | -#> |.....................| -0.9969 | -0.9818 | -0.9750 | -0.9744 | -#> | U| 356.08238 | 93.10 | -0.1209 | 2.232 | 1.095 | -#> |.....................| 0.02509 | 0.7272 | 1.045 | 1.072 | -#> | X| 356.08238 | 93.10 | 0.8861 | 9.321 | 1.095 | -#> |.....................| 0.02509 | 0.7272 | 1.045 | 1.072 | -#> | G| Gill Diff. | -85.81 | 0.5929 | 0.9043 | -97.79 | -#> |.....................| -28.71 | -0.07427 | -8.550 | -12.99 | -#> | 2| 1940.7752 | 1.640 | -1.004 | -0.9563 | -0.2449 | -#> |.....................| -0.7829 | -0.9813 | -0.9112 | -0.8775 | -#> | U| 1940.7752 | 152.7 | -0.1253 | 2.226 | 1.495 | -#> |.....................| 0.02778 | 0.7276 | 1.112 | 1.176 | -#> | X| 1940.7752 | 152.7 | 0.8822 | 9.258 | 1.495 | -#> |.....................| 0.02778 | 0.7276 | 1.112 | 1.176 | -#> | 3| 370.78508 | 1.064 | -1.000 | -0.9502 | -0.9010 | -#> |.....................| -0.9755 | -0.9817 | -0.9686 | -0.9647 | -#> | U| 370.78508 | 99.05 | -0.1213 | 2.232 | 1.135 | -#> |.....................| 0.02536 | 0.7272 | 1.052 | 1.082 | -#> | X| 370.78508 | 99.05 | 0.8857 | 9.315 | 1.135 | -#> |.....................| 0.02536 | 0.7272 | 1.052 | 1.082 | -#> | 4| 354.52588 | 1.015 | -1.000 | -0.9497 | -0.9565 | -#> |.....................| -0.9918 | -0.9818 | -0.9735 | -0.9721 | -#> | U| 354.52588 | 94.52 | -0.1210 | 2.232 | 1.105 | -#> |.....................| 0.02516 | 0.7272 | 1.047 | 1.074 | -#> | X| 354.52588 | 94.52 | 0.8860 | 9.319 | 1.105 | -#> |.....................| 0.02516 | 0.7272 | 1.047 | 1.074 | -#> | F| Forward Diff. | 126.3 | 0.7329 | 1.391 | -95.71 | -#> |.....................| -26.58 | 0.4812 | -8.528 | -12.76 | -#> | 5| 352.43362 | 0.9998 | -1.000 | -0.9499 | -0.9392 | -#> |.....................| -0.9869 | -0.9819 | -0.9719 | -0.9698 | -#> | U| 352.43362 | 93.08 | -0.1211 | 2.232 | 1.114 | -#> |.....................| 0.02522 | 0.7271 | 1.048 | 1.077 | -#> | X| 352.43362 | 93.08 | 0.8859 | 9.317 | 1.114 | -#> |.....................| 0.02522 | 0.7271 | 1.048 | 1.077 | -#> | F| Forward Diff. | -88.58 | 0.5971 | 0.9141 | -92.65 | -#> |.....................| -26.61 | -0.01862 | -8.458 | -12.78 | -#> | 6| 350.82994 | 1.015 | -1.000 | -0.9501 | -0.9214 | -#> |.....................| -0.9818 | -0.9819 | -0.9703 | -0.9673 | -#> | U| 350.82994 | 94.46 | -0.1213 | 2.232 | 1.124 | -#> |.....................| 0.02528 | 0.7271 | 1.050 | 1.079 | -#> | X| 350.82994 | 94.46 | 0.8858 | 9.315 | 1.124 | -#> |.....................| 0.02528 | 0.7271 | 1.050 | 1.079 | -#> | F| Forward Diff. | 115.7 | 0.7442 | 1.407 | -90.51 | -#> |.....................| -24.67 | 0.2416 | -8.378 | -12.59 | -#> | 7| 348.85697 | 1.000 | -1.000 | -0.9503 | -0.9035 | -#> |.....................| -0.9769 | -0.9819 | -0.9686 | -0.9649 | -#> | U| 348.85697 | 93.10 | -0.1214 | 2.231 | 1.134 | -#> |.....................| 0.02534 | 0.7271 | 1.052 | 1.082 | -#> | X| 348.85697 | 93.10 | 0.8857 | 9.313 | 1.134 | -#> |.....................| 0.02534 | 0.7271 | 1.052 | 1.082 | -#> | F| Forward Diff. | -86.89 | 0.6078 | 0.9395 | -87.49 | -#> |.....................| -24.70 | -0.2033 | -8.301 | -12.59 | -#> | 8| 347.23757 | 1.014 | -1.001 | -0.9506 | -0.8852 | -#> |.....................| -0.9717 | -0.9819 | -0.9669 | -0.9622 | -#> | U| 347.23757 | 94.41 | -0.1215 | 2.231 | 1.144 | -#> |.....................| 0.02541 | 0.7271 | 1.054 | 1.085 | -#> | X| 347.23757 | 94.41 | 0.8856 | 9.311 | 1.144 | -#> |.....................| 0.02541 | 0.7271 | 1.054 | 1.085 | -#> | F| Forward Diff. | 106.0 | 0.7499 | 1.419 | -85.67 | -#> |.....................| -22.89 | -0.09812 | -8.213 | -12.39 | -#> | 9| 345.37317 | 1.000 | -1.001 | -0.9508 | -0.8667 | -#> |.....................| -0.9667 | -0.9818 | -0.9651 | -0.9596 | -#> | U| 345.37317 | 93.12 | -0.1217 | 2.231 | 1.154 | -#> |.....................| 0.02547 | 0.7272 | 1.056 | 1.088 | -#> | X| 345.37317 | 93.12 | 0.8854 | 9.308 | 1.154 | -#> |.....................| 0.02547 | 0.7272 | 1.056 | 1.088 | -#> | F| Forward Diff. | -84.47 | 0.6193 | 0.9668 | -82.72 | -#> |.....................| -22.87 | -0.2860 | -8.128 | -12.38 | -#> | 10| 343.77522 | 1.014 | -1.001 | -0.9511 | -0.8479 | -#> |.....................| -0.9616 | -0.9818 | -0.9633 | -0.9568 | -#> | U| 343.77522 | 94.37 | -0.1218 | 2.231 | 1.164 | -#> |.....................| 0.02554 | 0.7272 | 1.057 | 1.091 | -#> | X| 343.77522 | 94.37 | 0.8853 | 9.306 | 1.164 | -#> |.....................| 0.02554 | 0.7272 | 1.057 | 1.091 | -#> | F| Forward Diff. | 98.54 | 0.7582 | 1.440 | -80.80 | -#> |.....................| -21.11 | -0.2480 | -8.037 | -12.18 | -#> | 11| 342.01002 | 1.000 | -1.001 | -0.9514 | -0.8290 | -#> |.....................| -0.9566 | -0.9817 | -0.9614 | -0.9539 | -#> | U| 342.01002 | 93.14 | -0.1220 | 2.230 | 1.175 | -#> |.....................| 0.02560 | 0.7273 | 1.059 | 1.094 | -#> | X| 342.01002 | 93.14 | 0.8852 | 9.303 | 1.175 | -#> |.....................| 0.02560 | 0.7273 | 1.059 | 1.094 | -#> | F| Forward Diff. | -81.78 | 0.6281 | 0.9934 | -78.17 | -#> |.....................| -21.11 | -0.4903 | -7.943 | -12.16 | -#> | 12| 340.43696 | 1.013 | -1.001 | -0.9517 | -0.8098 | -#> |.....................| -0.9515 | -0.9816 | -0.9595 | -0.9509 | -#> | U| 340.43696 | 94.32 | -0.1222 | 2.230 | 1.185 | -#> |.....................| 0.02566 | 0.7274 | 1.062 | 1.097 | -#> | X| 340.43696 | 94.32 | 0.8850 | 9.301 | 1.185 | -#> |.....................| 0.02566 | 0.7274 | 1.062 | 1.097 | -#> | F| Forward Diff. | 90.87 | 0.7671 | 1.462 | -75.86 | -#> |.....................| -19.30 | -0.2119 | -7.851 | -11.96 | -#> | 13| 338.78414 | 1.001 | -1.001 | -0.9520 | -0.7906 | -#> |.....................| -0.9465 | -0.9815 | -0.9574 | -0.9478 | -#> | U| 338.78414 | 93.15 | -0.1223 | 2.230 | 1.196 | -#> |.....................| 0.02572 | 0.7274 | 1.064 | 1.100 | -#> | X| 338.78414 | 93.15 | 0.8848 | 9.298 | 1.196 | -#> |.....................| 0.02572 | 0.7274 | 1.064 | 1.100 | -#> | F| Forward Diff. | -80.47 | 0.6431 | 1.023 | -73.28 | -#> |.....................| -19.27 | -0.2791 | -7.739 | -11.92 | -#> | 14| 337.22825 | 1.013 | -1.002 | -0.9523 | -0.7710 | -#> |.....................| -0.9415 | -0.9814 | -0.9553 | -0.9445 | -#> | U| 337.22825 | 94.28 | -0.1225 | 2.229 | 1.206 | -#> |.....................| 0.02579 | 0.7275 | 1.066 | 1.104 | -#> | X| 337.22825 | 94.28 | 0.8847 | 9.295 | 1.206 | -#> |.....................| 0.02579 | 0.7275 | 1.066 | 1.104 | -#> | F| Forward Diff. | 82.17 | 0.7754 | 1.480 | -71.69 | -#> |.....................| -17.81 | -0.5846 | -7.635 | -11.71 | -#> | 15| 335.66851 | 1.001 | -1.002 | -0.9527 | -0.7512 | -#> |.....................| -0.9367 | -0.9812 | -0.9531 | -0.9411 | -#> | U| 335.66851 | 93.18 | -0.1228 | 2.229 | 1.217 | -#> |.....................| 0.02585 | 0.7276 | 1.068 | 1.108 | -#> | X| 335.66851 | 93.18 | 0.8845 | 9.291 | 1.217 | -#> |.....................| 0.02585 | 0.7276 | 1.068 | 1.108 | -#> | F| Forward Diff. | -77.03 | 0.6546 | 1.055 | -69.28 | -#> |.....................| -17.76 | -0.6126 | -7.531 | -11.66 | -#> | 16| 334.17549 | 1.012 | -1.002 | -0.9531 | -0.7314 | -#> |.....................| -0.9319 | -0.9810 | -0.9509 | -0.9376 | -#> | U| 334.17549 | 94.25 | -0.1230 | 2.229 | 1.228 | -#> |.....................| 0.02591 | 0.7278 | 1.070 | 1.111 | -#> | X| 334.17549 | 94.25 | 0.8843 | 9.287 | 1.228 | -#> |.....................| 0.02591 | 0.7278 | 1.070 | 1.111 | -#> | F| Forward Diff. | 77.34 | 0.7869 | 1.511 | -67.40 | -#> |.....................| -16.23 | -0.6338 | -7.414 | -11.45 | -#> | 17| 332.70253 | 1.001 | -1.002 | -0.9536 | -0.7113 | -#> |.....................| -0.9273 | -0.9807 | -0.9485 | -0.9339 | -#> | U| 332.70253 | 93.20 | -0.1232 | 2.228 | 1.239 | -#> |.....................| 0.02597 | 0.7280 | 1.073 | 1.115 | -#> | X| 332.70253 | 93.20 | 0.8841 | 9.283 | 1.239 | -#> |.....................| 0.02597 | 0.7280 | 1.073 | 1.115 | -#> | F| Forward Diff. | -74.42 | 0.6680 | 1.089 | -65.07 | -#> |.....................| -16.20 | -0.6067 | -7.288 | -11.39 | -#> | 18| 331.26057 | 1.012 | -1.003 | -0.9540 | -0.6912 | -#> |.....................| -0.9227 | -0.9804 | -0.9461 | -0.9301 | -#> | U| 331.26057 | 94.22 | -0.1235 | 2.228 | 1.250 | -#> |.....................| 0.02602 | 0.7282 | 1.076 | 1.119 | -#> | X| 331.26057 | 94.22 | 0.8838 | 9.279 | 1.250 | -#> |.....................| 0.02602 | 0.7282 | 1.076 | 1.119 | -#> | F| Forward Diff. | 71.33 | 0.7962 | 1.537 | -63.45 | -#> |.....................| -14.84 | -0.8466 | -7.169 | -11.16 | -#> | 19| 329.86877 | 1.001 | -1.003 | -0.9546 | -0.6708 | -#> |.....................| -0.9184 | -0.9799 | -0.9435 | -0.9260 | -#> | U| 329.86877 | 93.23 | -0.1238 | 2.227 | 1.261 | -#> |.....................| 0.02608 | 0.7285 | 1.078 | 1.124 | -#> | X| 329.86877 | 93.23 | 0.8836 | 9.273 | 1.261 | -#> |.....................| 0.02608 | 0.7285 | 1.078 | 1.124 | -#> | F| Forward Diff. | -70.96 | 0.6825 | 1.126 | -60.92 | -#> |.....................| -14.66 | -0.5289 | -7.027 | -11.08 | -#> | 20| 328.50031 | 1.012 | -1.003 | -0.9552 | -0.6504 | -#> |.....................| -0.9143 | -0.9795 | -0.9408 | -0.9217 | -#> | U| 328.50031 | 94.20 | -0.1241 | 2.227 | 1.272 | -#> |.....................| 0.02613 | 0.7288 | 1.081 | 1.128 | -#> | X| 328.50031 | 94.20 | 0.8833 | 9.268 | 1.272 | -#> |.....................| 0.02613 | 0.7288 | 1.081 | 1.128 | -#> | F| Forward Diff. | 67.86 | 0.8082 | 1.577 | -59.49 | -#> |.....................| -13.42 | -0.7986 | -6.899 | -10.84 | -#> | 21| 327.16645 | 1.002 | -1.004 | -0.9559 | -0.6298 | -#> |.....................| -0.9105 | -0.9791 | -0.9380 | -0.9171 | -#> | U| 327.16645 | 93.27 | -0.1245 | 2.226 | 1.284 | -#> |.....................| 0.02618 | 0.7291 | 1.084 | 1.133 | -#> | X| 327.16645 | 93.27 | 0.8829 | 9.261 | 1.284 | -#> |.....................| 0.02618 | 0.7291 | 1.084 | 1.133 | -#> | F| Forward Diff. | -65.39 | 0.6978 | 1.172 | -57.48 | -#> |.....................| -13.36 | -0.7754 | -6.743 | -10.73 | -#> | 22| 325.87373 | 1.012 | -1.004 | -0.9567 | -0.6091 | -#> |.....................| -0.9070 | -0.9785 | -0.9351 | -0.9123 | -#> | U| 325.87373 | 94.19 | -0.1249 | 2.225 | 1.295 | -#> |.....................| 0.02622 | 0.7296 | 1.087 | 1.138 | -#> | X| 325.87373 | 94.19 | 0.8826 | 9.255 | 1.295 | -#> |.....................| 0.02622 | 0.7296 | 1.087 | 1.138 | -#> | F| Forward Diff. | 64.00 | 0.8187 | 1.613 | -55.46 | -#> |.....................| -12.01 | -0.6347 | -6.615 | -10.48 | -#> | 23| 324.62990 | 1.002 | -1.004 | -0.9576 | -0.5884 | -#> |.....................| -0.9040 | -0.9780 | -0.9320 | -0.9071 | -#> | U| 324.6299 | 93.29 | -0.1254 | 2.224 | 1.306 | -#> |.....................| 0.02626 | 0.7300 | 1.090 | 1.144 | -#> | X| 324.6299 | 93.29 | 0.8822 | 9.246 | 1.306 | -#> |.....................| 0.02626 | 0.7300 | 1.090 | 1.144 | -#> | F| Forward Diff. | -64.25 | 0.7091 | 1.205 | -53.86 | -#> |.....................| -12.06 | -0.7132 | -6.446 | -10.35 | -#> | 24| 323.37595 | 1.011 | -1.005 | -0.9586 | -0.5676 | -#> |.....................| -0.9015 | -0.9774 | -0.9287 | -0.9014 | -#> | U| 323.37595 | 94.14 | -0.1259 | 2.223 | 1.318 | -#> |.....................| 0.02629 | 0.7304 | 1.094 | 1.150 | -#> | X| 323.37595 | 94.14 | 0.8817 | 9.236 | 1.318 | -#> |.....................| 0.02629 | 0.7304 | 1.094 | 1.150 | -#> | F| Forward Diff. | 56.04 | 0.8254 | 1.637 | -52.44 | -#> |.....................| -10.96 | -0.9420 | -6.280 | -10.07 | -#> | 25| 322.22752 | 1.002 | -1.006 | -0.9598 | -0.5467 | -#> |.....................| -0.8995 | -0.9764 | -0.9254 | -0.8957 | -#> | U| 322.22752 | 93.30 | -0.1265 | 2.222 | 1.329 | -#> |.....................| 0.02631 | 0.7311 | 1.097 | 1.156 | -#> | X| 322.22752 | 93.30 | 0.8812 | 9.225 | 1.329 | -#> |.....................| 0.02631 | 0.7311 | 1.097 | 1.156 | -#> | F| Forward Diff. | -62.58 | 0.7198 | 1.238 | -50.46 | -#> |.....................| -10.85 | -0.6563 | -6.111 | -9.931 | -#> | 26| 321.05050 | 1.011 | -1.006 | -0.9612 | -0.5258 | -#> |.....................| -0.8983 | -0.9755 | -0.9219 | -0.8894 | -#> | U| 321.0505 | 94.13 | -0.1272 | 2.221 | 1.341 | -#> |.....................| 0.02633 | 0.7318 | 1.101 | 1.163 | -#> | X| 321.0505 | 94.13 | 0.8805 | 9.213 | 1.341 | -#> |.....................| 0.02633 | 0.7318 | 1.101 | 1.163 | -#> | F| Forward Diff. | 53.55 | 0.8319 | 1.674 | -49.18 | -#> |.....................| -9.827 | -0.8926 | -5.944 | -9.631 | -#> | 27| 319.96320 | 1.003 | -1.007 | -0.9629 | -0.5048 | -#> |.....................| -0.8978 | -0.9744 | -0.9184 | -0.8829 | -#> | U| 319.9632 | 93.35 | -0.1280 | 2.219 | 1.352 | -#> |.....................| 0.02633 | 0.7325 | 1.104 | 1.170 | -#> | X| 319.9632 | 93.35 | 0.8798 | 9.197 | 1.352 | -#> |.....................| 0.02633 | 0.7325 | 1.104 | 1.170 | -#> | F| Forward Diff. | -57.14 | 0.7318 | 1.284 | -47.52 | -#> |.....................| -9.778 | -0.7040 | -5.744 | -9.448 | -#> | 28| 318.87595 | 1.011 | -1.008 | -0.9647 | -0.4840 | -#> |.....................| -0.8984 | -0.9733 | -0.9148 | -0.8761 | -#> | U| 318.87595 | 94.12 | -0.1289 | 2.217 | 1.364 | -#> |.....................| 0.02633 | 0.7334 | 1.108 | 1.177 | -#> | X| 318.87595 | 94.12 | 0.8790 | 9.180 | 1.364 | -#> |.....................| 0.02633 | 0.7334 | 1.108 | 1.177 | -#> | F| Forward Diff. | 50.84 | 0.8352 | 1.706 | -46.29 | -#> |.....................| -8.837 | -0.9158 | -5.564 | -9.134 | -#> | 29| 317.86528 | 1.003 | -1.009 | -0.9669 | -0.4631 | -#> |.....................| -0.9000 | -0.9719 | -0.9113 | -0.8691 | -#> | U| 317.86528 | 93.39 | -0.1300 | 2.215 | 1.375 | -#> |.....................| 0.02631 | 0.7344 | 1.112 | 1.185 | -#> | X| 317.86528 | 93.39 | 0.8781 | 9.160 | 1.375 | -#> |.....................| 0.02631 | 0.7344 | 1.112 | 1.185 | -#> | F| Forward Diff. | -53.64 | 0.7337 | 1.307 | -44.73 | -#> |.....................| -8.788 | -0.7242 | -5.380 | -8.940 | -#> | 30| 316.86653 | 1.011 | -1.010 | -0.9694 | -0.4424 | -#> |.....................| -0.9029 | -0.9703 | -0.9078 | -0.8619 | -#> | U| 316.86653 | 94.11 | -0.1312 | 2.212 | 1.386 | -#> |.....................| 0.02627 | 0.7355 | 1.115 | 1.192 | -#> | X| 316.86653 | 94.11 | 0.8771 | 9.137 | 1.386 | -#> |.....................| 0.02627 | 0.7355 | 1.115 | 1.192 | -#> | F| Forward Diff. | 47.91 | 0.8298 | 1.717 | -43.37 | -#> |.....................| -7.860 | -0.7095 | -5.221 | -8.628 | -#> | 31| 315.94581 | 1.003 | -1.012 | -0.9723 | -0.4219 | -#> |.....................| -0.9070 | -0.9693 | -0.9044 | -0.8547 | -#> | U| 315.94581 | 93.42 | -0.1325 | 2.209 | 1.398 | -#> |.....................| 0.02622 | 0.7363 | 1.119 | 1.200 | -#> | X| 315.94581 | 93.42 | 0.8759 | 9.111 | 1.398 | -#> |.....................| 0.02622 | 0.7363 | 1.119 | 1.200 | -#> | F| Forward Diff. | -50.84 | 0.7268 | 1.307 | -41.97 | -#> |.....................| -7.840 | -0.5502 | -5.032 | -8.421 | -#> | 32| 315.03994 | 1.011 | -1.013 | -0.9754 | -0.4018 | -#> |.....................| -0.9129 | -0.9687 | -0.9011 | -0.8473 | -#> | U| 315.03994 | 94.09 | -0.1340 | 2.206 | 1.409 | -#> |.....................| 0.02615 | 0.7367 | 1.122 | 1.208 | -#> | X| 315.03994 | 94.09 | 0.8746 | 9.082 | 1.409 | -#> |.....................| 0.02615 | 0.7367 | 1.122 | 1.208 | -#> | F| Forward Diff. | 43.50 | 0.8139 | 1.698 | -41.38 | -#> |.....................| -7.196 | -0.9249 | -4.882 | -8.108 | -#> | 33| 314.20198 | 1.004 | -1.015 | -0.9788 | -0.3816 | -#> |.....................| -0.9197 | -0.9671 | -0.8983 | -0.8406 | -#> | U| 314.20198 | 93.47 | -0.1355 | 2.203 | 1.420 | -#> |.....................| 0.02606 | 0.7379 | 1.125 | 1.215 | -#> | X| 314.20198 | 93.47 | 0.8733 | 9.052 | 1.420 | -#> |.....................| 0.02606 | 0.7379 | 1.125 | 1.215 | -#> | F| Forward Diff. | -46.04 | 0.7133 | 1.286 | -40.35 | -#> |.....................| -7.243 | -0.8268 | -4.724 | -7.917 | -#> | 34| 313.39087 | 1.011 | -1.016 | -0.9822 | -0.3616 | -#> |.....................| -0.9277 | -0.9641 | -0.8960 | -0.8348 | -#> | U| 313.39087 | 94.10 | -0.1371 | 2.200 | 1.431 | -#> |.....................| 0.02596 | 0.7401 | 1.128 | 1.221 | -#> | X| 313.39087 | 94.10 | 0.8719 | 9.021 | 1.431 | -#> |.....................| 0.02596 | 0.7401 | 1.128 | 1.221 | -#> | F| Forward Diff. | 42.44 | 0.7936 | 1.657 | -38.93 | -#> |.....................| -6.417 | -0.6060 | -4.631 | -7.687 | -#> | 35| 312.65204 | 1.004 | -1.018 | -0.9857 | -0.3421 | -#> |.....................| -0.9371 | -0.9626 | -0.8936 | -0.8290 | -#> | U| 312.65204 | 93.49 | -0.1387 | 2.196 | 1.441 | -#> |.....................| 0.02584 | 0.7411 | 1.130 | 1.228 | -#> | X| 312.65204 | 93.49 | 0.8705 | 8.989 | 1.441 | -#> |.....................| 0.02584 | 0.7411 | 1.130 | 1.228 | -#> | F| Forward Diff. | -46.74 | 0.6875 | 1.233 | -38.07 | -#> |.....................| -6.520 | -0.5247 | -4.495 | -7.518 | -#> | 36| 311.92333 | 1.010 | -1.020 | -0.9894 | -0.3235 | -#> |.....................| -0.9483 | -0.9627 | -0.8910 | -0.8230 | -#> | U| 311.92333 | 94.07 | -0.1404 | 2.192 | 1.452 | -#> |.....................| 0.02570 | 0.7411 | 1.133 | 1.234 | -#> | X| 311.92333 | 94.07 | 0.8690 | 8.957 | 1.452 | -#> |.....................| 0.02570 | 0.7411 | 1.133 | 1.234 | -#> | F| Forward Diff. | 35.63 | 0.7624 | 1.583 | -37.23 | -#> |.....................| -5.893 | -0.6222 | -4.382 | -7.287 | -#> | 37| 311.27355 | 1.004 | -1.021 | -0.9929 | -0.3046 | -#> |.....................| -0.9595 | -0.9623 | -0.8888 | -0.8177 | -#> | U| 311.27355 | 93.51 | -0.1420 | 2.189 | 1.462 | -#> |.....................| 0.02556 | 0.7413 | 1.135 | 1.240 | -#> | X| 311.27355 | 93.51 | 0.8676 | 8.925 | 1.462 | -#> |.....................| 0.02556 | 0.7413 | 1.135 | 1.240 | -#> | F| Forward Diff. | -45.98 | 0.6631 | 1.170 | -36.31 | -#> |.....................| -5.950 | -0.4376 | -4.255 | -7.133 | -#> | 38| 310.62439 | 1.010 | -1.023 | -0.9963 | -0.2868 | -#> |.....................| -0.9728 | -0.9625 | -0.8869 | -0.8128 | -#> | U| 310.62439 | 94.07 | -0.1437 | 2.185 | 1.472 | -#> |.....................| 0.02539 | 0.7412 | 1.137 | 1.245 | -#> | X| 310.62439 | 94.07 | 0.8661 | 8.895 | 1.472 | -#> |.....................| 0.02539 | 0.7412 | 1.137 | 1.245 | -#> | F| Forward Diff. | 33.19 | 0.7369 | 1.513 | -35.63 | -#> |.....................| -5.399 | -0.5527 | -4.174 | -6.950 | -#> | 39| 310.04420 | 1.005 | -1.024 | -0.9995 | -0.2687 | -#> |.....................| -0.9859 | -0.9628 | -0.8850 | -0.8081 | -#> | U| 310.0442 | 93.55 | -0.1453 | 2.182 | 1.482 | -#> |.....................| 0.02523 | 0.7410 | 1.139 | 1.250 | -#> | X| 310.0442 | 93.55 | 0.8648 | 8.866 | 1.482 | -#> |.....................| 0.02523 | 0.7410 | 1.139 | 1.250 | -#> | F| Forward Diff. | -43.63 | 0.6390 | 1.117 | -34.92 | -#> |.....................| -5.491 | -0.4082 | -4.072 | -6.814 | -#> | 40| 309.46411 | 1.010 | -1.026 | -1.003 | -0.2518 | -#> |.....................| -1.001 | -0.9632 | -0.8835 | -0.8040 | -#> | U| 309.46411 | 94.07 | -0.1468 | 2.179 | 1.491 | -#> |.....................| 0.02504 | 0.7407 | 1.141 | 1.254 | -#> | X| 309.46411 | 94.07 | 0.8634 | 8.839 | 1.491 | -#> |.....................| 0.02504 | 0.7407 | 1.141 | 1.254 | -#> | F| Forward Diff. | 30.94 | 0.7075 | 1.451 | -34.14 | -#> |.....................| -4.970 | -0.4915 | -4.021 | -6.668 | -#> | 41| 308.94397 | 1.005 | -1.027 | -1.005 | -0.2344 | -#> |.....................| -1.015 | -0.9639 | -0.8817 | -0.7999 | -#> | U| 308.94397 | 93.57 | -0.1483 | 2.176 | 1.500 | -#> |.....................| 0.02486 | 0.7402 | 1.143 | 1.259 | -#> | X| 308.94397 | 93.57 | 0.8622 | 8.814 | 1.500 | -#> |.....................| 0.02486 | 0.7402 | 1.143 | 1.259 | -#> | F| Forward Diff. | -43.40 | 0.6150 | 1.062 | -33.15 | -#> |.....................| -4.981 | -0.1275 | -3.914 | -6.542 | -#> | 42| 308.42636 | 1.010 | -1.029 | -1.008 | -0.2188 | -#> |.....................| -1.031 | -0.9663 | -0.8797 | -0.7956 | -#> | U| 308.42636 | 94.07 | -0.1498 | 2.174 | 1.509 | -#> |.....................| 0.02466 | 0.7384 | 1.145 | 1.264 | -#> | X| 308.42636 | 94.07 | 0.8609 | 8.789 | 1.509 | -#> |.....................| 0.02466 | 0.7384 | 1.145 | 1.264 | -#> | F| Forward Diff. | 28.94 | 0.6832 | 1.395 | -33.36 | -#> |.....................| -4.720 | -0.6585 | -3.841 | -6.387 | -#> | 43| 307.94294 | 1.006 | -1.030 | -1.011 | -0.2019 | -#> |.....................| -1.047 | -0.9672 | -0.8783 | -0.7922 | -#> | U| 307.94294 | 93.62 | -0.1511 | 2.171 | 1.518 | -#> |.....................| 0.02447 | 0.7378 | 1.146 | 1.267 | -#> | X| 307.94294 | 93.62 | 0.8597 | 8.766 | 1.518 | -#> |.....................| 0.02447 | 0.7378 | 1.146 | 1.267 | -#> | F| Forward Diff. | -38.44 | 0.5985 | 1.037 | -32.41 | -#> |.....................| -4.734 | -0.3663 | -3.762 | -6.284 | -#> | 44| 307.46797 | 1.011 | -1.032 | -1.013 | -0.1861 | -#> |.....................| -1.063 | -0.9666 | -0.8774 | -0.7896 | -#> | U| 307.46797 | 94.11 | -0.1524 | 2.169 | 1.527 | -#> |.....................| 0.02426 | 0.7383 | 1.147 | 1.270 | -#> | X| 307.46797 | 94.11 | 0.8586 | 8.746 | 1.527 | -#> |.....................| 0.02426 | 0.7383 | 1.147 | 1.270 | -#> | F| Forward Diff. | 31.70 | 0.6652 | 1.367 | -32.07 | -#> |.....................| -4.364 | -0.4841 | -3.739 | -6.200 | -#> | 45| 307.02197 | 1.006 | -1.033 | -1.016 | -0.1702 | -#> |.....................| -1.080 | -0.9671 | -0.8762 | -0.7866 | -#> | U| 307.02197 | 93.66 | -0.1537 | 2.166 | 1.536 | -#> |.....................| 0.02405 | 0.7379 | 1.149 | 1.273 | -#> | X| 307.02197 | 93.66 | 0.8575 | 8.725 | 1.536 | -#> |.....................| 0.02405 | 0.7379 | 1.149 | 1.273 | -#> | F| Forward Diff. | -34.81 | 0.5817 | 1.015 | -31.25 | -#> |.....................| -4.413 | -0.2597 | -3.670 | -6.117 | -#> | 46| 306.58875 | 1.011 | -1.034 | -1.018 | -0.1551 | -#> |.....................| -1.097 | -0.9684 | -0.8747 | -0.7833 | -#> | U| 306.58875 | 94.13 | -0.1549 | 2.164 | 1.544 | -#> |.....................| 0.02384 | 0.7369 | 1.150 | 1.277 | -#> | X| 306.58875 | 94.13 | 0.8565 | 8.705 | 1.544 | -#> |.....................| 0.02384 | 0.7369 | 1.150 | 1.277 | -#> | F| Forward Diff. | 31.47 | 0.6484 | 1.332 | -31.08 | -#> |.....................| -4.101 | -0.4354 | -3.617 | -5.999 | -#> | 47| 306.17343 | 1.006 | -1.035 | -1.020 | -0.1399 | -#> |.....................| -1.114 | -0.9699 | -0.8732 | -0.7802 | -#> | U| 306.17343 | 93.70 | -0.1561 | 2.162 | 1.552 | -#> |.....................| 0.02362 | 0.7358 | 1.152 | 1.280 | -#> | X| 306.17343 | 93.70 | 0.8554 | 8.686 | 1.552 | -#> |.....................| 0.02362 | 0.7358 | 1.152 | 1.280 | -#> | F| Forward Diff. | -31.81 | 0.5683 | 0.9956 | -30.69 | -#> |.....................| -4.225 | -0.4059 | -3.540 | -5.903 | -#> | 48| 305.76609 | 1.011 | -1.036 | -1.022 | -0.1248 | -#> |.....................| -1.132 | -0.9702 | -0.8722 | -0.7778 | -#> | U| 305.76609 | 94.14 | -0.1573 | 2.160 | 1.560 | -#> |.....................| 0.02340 | 0.7356 | 1.153 | 1.283 | -#> | X| 305.76609 | 94.14 | 0.8545 | 8.668 | 1.560 | -#> |.....................| 0.02340 | 0.7356 | 1.153 | 1.283 | -#> | F| Forward Diff. | 30.78 | 0.6301 | 1.297 | -30.24 | -#> |.....................| -3.891 | -0.4278 | -3.502 | -5.825 | -#> | 49| 305.37620 | 1.007 | -1.037 | -1.024 | -0.1098 | -#> |.....................| -1.149 | -0.9705 | -0.8714 | -0.7755 | -#> | U| 305.3762 | 93.72 | -0.1584 | 2.158 | 1.569 | -#> |.....................| 0.02318 | 0.7354 | 1.154 | 1.285 | -#> | X| 305.3762 | 93.72 | 0.8535 | 8.651 | 1.569 | -#> |.....................| 0.02318 | 0.7354 | 1.154 | 1.285 | -#> | F| Forward Diff. | -32.45 | 0.5512 | 0.9611 | -29.28 | -#> |.....................| -3.904 | -0.09870 | -3.459 | -5.767 | -#> | 50| 304.99974 | 1.011 | -1.039 | -1.026 | -0.09561 | -#> |.....................| -1.167 | -0.9731 | -0.8699 | -0.7723 | -#> | U| 304.99974 | 94.15 | -0.1595 | 2.156 | 1.576 | -#> |.....................| 0.02295 | 0.7335 | 1.155 | 1.288 | -#> | X| 304.99974 | 94.15 | 0.8526 | 8.633 | 1.576 | -#> |.....................| 0.02295 | 0.7335 | 1.155 | 1.288 | -#> | F| Forward Diff. | 30.20 | 0.6130 | 1.265 | -28.57 | -#> |.....................| -3.511 | -0.04200 | -3.403 | -5.652 | -#> | 51| 304.64794 | 1.007 | -1.040 | -1.028 | -0.08217 | -#> |.....................| -1.185 | -0.9783 | -0.8678 | -0.7682 | -#> | U| 304.64794 | 93.75 | -0.1607 | 2.153 | 1.584 | -#> |.....................| 0.02273 | 0.7297 | 1.157 | 1.293 | -#> | X| 304.64794 | 93.75 | 0.8516 | 8.614 | 1.584 | -#> |.....................| 0.02273 | 0.7297 | 1.157 | 1.293 | -#> | F| Forward Diff. | -30.08 | 0.5385 | 0.9408 | -28.96 | -#> |.....................| -3.779 | -0.3908 | -3.281 | -5.515 | -#> | 52| 304.28931 | 1.011 | -1.041 | -1.030 | -0.06828 | -#> |.....................| -1.203 | -0.9811 | -0.8668 | -0.7655 | -#> | U| 304.28931 | 94.14 | -0.1618 | 2.151 | 1.591 | -#> |.....................| 0.02250 | 0.7277 | 1.158 | 1.296 | -#> | X| 304.28931 | 94.14 | 0.8506 | 8.597 | 1.591 | -#> |.....................| 0.02250 | 0.7277 | 1.158 | 1.296 | -#> | 53| 304.03244 | 1.011 | -1.042 | -1.033 | -0.05709 | -#> |.....................| -1.225 | -0.9843 | -0.8662 | -0.7633 | -#> | U| 304.03244 | 94.13 | -0.1630 | 2.149 | 1.597 | -#> |.....................| 0.02223 | 0.7253 | 1.159 | 1.298 | -#> | X| 304.03244 | 94.13 | 0.8496 | 8.578 | 1.597 | -#> |.....................| 0.02223 | 0.7253 | 1.159 | 1.298 | -#> | 54| 302.98899 | 1.011 | -1.047 | -1.041 | -0.01055 | -#> |.....................| -1.314 | -0.9977 | -0.8638 | -0.7544 | -#> | U| 302.98899 | 94.10 | -0.1678 | 2.140 | 1.623 | -#> |.....................| 0.02111 | 0.7156 | 1.161 | 1.308 | -#> | X| 302.98899 | 94.10 | 0.8455 | 8.503 | 1.623 | -#> |.....................| 0.02111 | 0.7156 | 1.161 | 1.308 | -#> | 55| 298.89653 | 1.010 | -1.068 | -1.080 | 0.1944 | -#> |.....................| -1.708 | -1.057 | -0.8531 | -0.7150 | -#> | U| 298.89653 | 93.99 | -0.1892 | 2.101 | 1.735 | -#> |.....................| 0.01618 | 0.6726 | 1.173 | 1.350 | -#> | X| 298.89653 | 93.99 | 0.8276 | 8.177 | 1.735 | -#> |.....................| 0.01618 | 0.6726 | 1.173 | 1.350 | -#> | 56| 292.24425 | 1.012 | -1.205 | -1.331 | 1.218 | -#> |.....................| -2.997 | -1.313 | -0.8095 | -0.4981 | -#> | U| 292.24425 | 94.21 | -0.3257 | 1.851 | 2.296 | -#> |.....................| 5.960e-07 | 0.4863 | 1.218 | 1.582 | -#> | X| 292.24425 | 94.21 | 0.7221 | 6.365 | 2.296 | -#> |.....................| 5.960e-07 | 0.4863 | 1.218 | 1.582 | -#> | F| Forward Diff. | -17.20 | -1.896 | -10.23 | 0.3663 | -#> |.....................| 0.002021 | -17.85 | 0.1528 | 5.292 | -#> | 57| 309.71599 | 0.9897 | -1.187 | -0.4357 | 2.442 | -#> |.....................| -2.997 | 0.5394 | -0.6812 | -0.7129 | -#> | U| 309.71599 | 92.14 | -0.3076 | 2.746 | 2.966 | -#> |.....................| 5.960e-07 | 1.833 | 1.352 | 1.352 | -#> | X| 309.71599 | 92.14 | 0.7352 | 15.58 | 2.966 | -#> |.....................| 5.960e-07 | 1.833 | 1.352 | 1.352 | -#> | 58| 292.01474 | 1.005 | -1.198 | -1.013 | 1.651 | -#> |.....................| -2.997 | -0.6561 | -0.7641 | -0.5745 | -#> | U| 292.01474 | 93.60 | -0.3191 | 2.168 | 2.533 | -#> |.....................| 5.960e-07 | 0.9640 | 1.266 | 1.501 | -#> | X| 292.01474 | 93.60 | 0.7268 | 8.745 | 2.533 | -#> |.....................| 5.960e-07 | 0.9640 | 1.266 | 1.501 | -#> | F| Forward Diff. | -172.4 | -2.986 | 3.411 | 4.977 | -#> |.....................| 0.05585 | 3.841 | 3.028 | 0.3322 | -#> | 59| 292.30890 | 1.013 | -0.8632 | -1.158 | 1.672 | -#> |.....................| -2.997 | -0.5770 | -0.9665 | -0.6082 | -#> | U| 292.3089 | 94.28 | 0.01586 | 2.024 | 2.544 | -#> |.....................| 5.960e-07 | 1.022 | 1.054 | 1.464 | -#> | X| 292.3089 | 94.28 | 1.016 | 7.565 | 2.544 | -#> |.....................| 5.960e-07 | 1.022 | 1.054 | 1.464 | -#> | 60| 291.20170 | 1.015 | -1.046 | -1.079 | 1.660 | -#> |.....................| -2.997 | -0.6203 | -0.8561 | -0.5898 | -#> | U| 291.2017 | 94.51 | -0.1669 | 2.103 | 2.538 | -#> |.....................| 5.960e-07 | 0.9900 | 1.170 | 1.484 | -#> | X| 291.2017 | 94.51 | 0.8462 | 8.187 | 2.538 | -#> |.....................| 5.960e-07 | 0.9900 | 1.170 | 1.484 | -#> | F| Forward Diff. | 39.51 | 0.9033 | 2.112 | 5.106 | -#> |.....................| 0.03418 | 2.863 | -2.696 | -0.7695 | -#> | 61| 291.43833 | 1.017 | -1.033 | -1.136 | 1.600 | -#> |.....................| -2.997 | -0.6066 | -0.6851 | -0.5537 | -#> | U| 291.43833 | 94.73 | -0.1542 | 2.046 | 2.505 | -#> |.....................| 5.960e-07 | 1.000 | 1.348 | 1.523 | -#> | X| 291.43833 | 94.73 | 0.8571 | 7.739 | 2.505 | -#> |.....................| 5.960e-07 | 1.000 | 1.348 | 1.523 | -#> | 62| 290.99248 | 1.014 | -1.041 | -1.101 | 1.637 | -#> |.....................| -2.997 | -0.6152 | -0.7907 | -0.5760 | -#> | U| 290.99248 | 94.43 | -0.1621 | 2.081 | 2.525 | -#> |.....................| 5.960e-07 | 0.9938 | 1.238 | 1.499 | -#> | X| 290.99248 | 94.43 | 0.8503 | 8.012 | 2.525 | -#> |.....................| 5.960e-07 | 0.9938 | 1.238 | 1.499 | -#> | F| Forward Diff. | 14.98 | 1.278 | 1.101 | 4.858 | -#> |.....................| 0.03639 | 3.021 | 0.9673 | -0.2780 | -#> | 63| 291.02454 | 1.009 | -1.102 | -1.088 | 1.608 | -#> |.....................| -2.997 | -0.6330 | -0.7900 | -0.5542 | -#> | U| 291.02454 | 93.95 | -0.2228 | 2.094 | 2.510 | -#> |.....................| 5.960e-07 | 0.9808 | 1.239 | 1.522 | -#> | X| 291.02454 | 93.95 | 0.8003 | 8.118 | 2.510 | -#> |.....................| 5.960e-07 | 0.9808 | 1.239 | 1.522 | -#> | 64| 291.12722 | 1.009 | -1.068 | -1.095 | 1.623 | -#> |.....................| -2.997 | -0.6237 | -0.7906 | -0.5663 | -#> | U| 291.12722 | 93.94 | -0.1892 | 2.087 | 2.518 | -#> |.....................| 5.960e-07 | 0.9876 | 1.238 | 1.509 | -#> | X| 291.12722 | 93.94 | 0.8276 | 8.057 | 2.518 | -#> |.....................| 5.960e-07 | 0.9876 | 1.238 | 1.509 | -#> | 65| 291.20836 | 1.009 | -1.048 | -1.100 | 1.633 | -#> |.....................| -2.997 | -0.6180 | -0.7910 | -0.5738 | -#> | U| 291.20836 | 93.93 | -0.1686 | 2.082 | 2.523 | -#> |.....................| 5.960e-07 | 0.9918 | 1.238 | 1.501 | -#> | X| 291.20836 | 93.93 | 0.8449 | 8.020 | 2.523 | -#> |.....................| 5.960e-07 | 0.9918 | 1.238 | 1.501 | -#> | 66| 290.99661 | 1.013 | -1.041 | -1.101 | 1.637 | -#> |.....................| -2.997 | -0.6156 | -0.7909 | -0.5760 | -#> | U| 290.99661 | 94.27 | -0.1623 | 2.081 | 2.525 | -#> |.....................| 5.960e-07 | 0.9935 | 1.238 | 1.499 | -#> | X| 290.99661 | 94.27 | 0.8502 | 8.011 | 2.525 | -#> |.....................| 5.960e-07 | 0.9935 | 1.238 | 1.499 | -#> | 67| 290.98636 | 1.014 | -1.041 | -1.101 | 1.637 | -#> |.....................| -2.997 | -0.6154 | -0.7908 | -0.5760 | -#> | U| 290.98636 | 94.36 | -0.1622 | 2.081 | 2.525 | -#> |.....................| 5.960e-07 | 0.9936 | 1.238 | 1.499 | -#> | X| 290.98636 | 94.36 | 0.8503 | 8.012 | 2.525 | -#> |.....................| 5.960e-07 | 0.9936 | 1.238 | 1.499 | -#> | F| Forward Diff. | -1.956 | 1.256 | 0.9523 | 4.835 | -#> |.....................| 0.03649 | 3.031 | 0.9657 | -0.2695 | -#> | 68| 290.98211 | 1.014 | -1.041 | -1.101 | 1.636 | -#> |.....................| -2.997 | -0.6157 | -0.7909 | -0.5760 | -#> | U| 290.98211 | 94.38 | -0.1623 | 2.081 | 2.525 | -#> |.....................| 5.960e-07 | 0.9934 | 1.238 | 1.499 | -#> | X| 290.98211 | 94.38 | 0.8502 | 8.011 | 2.525 | -#> |.....................| 5.960e-07 | 0.9934 | 1.238 | 1.499 | -#> | 69| 290.97746 | 1.014 | -1.042 | -1.101 | 1.635 | -#> |.....................| -2.997 | -0.6167 | -0.7912 | -0.5759 | -#> | U| 290.97746 | 94.44 | -0.1627 | 2.081 | 2.524 | -#> |.....................| 5.960e-07 | 0.9927 | 1.237 | 1.499 | -#> | X| 290.97746 | 94.44 | 0.8498 | 8.009 | 2.524 | -#> |.....................| 5.960e-07 | 0.9927 | 1.237 | 1.499 | -#> | F| Forward Diff. | 17.70 | 1.268 | 1.108 | 4.855 | -#> |.....................| 0.04257 | 3.066 | 0.9427 | -0.2771 | -#> | 70| 290.96180 | 1.014 | -1.044 | -1.101 | 1.634 | -#> |.....................| -2.997 | -0.6175 | -0.7910 | -0.5752 | -#> | U| 290.9618 | 94.36 | -0.1647 | 2.081 | 2.523 | -#> |.....................| 5.960e-07 | 0.9921 | 1.238 | 1.500 | -#> | X| 290.9618 | 94.36 | 0.8481 | 8.013 | 2.523 | -#> |.....................| 5.960e-07 | 0.9921 | 1.238 | 1.500 | -#> | F| Forward Diff. | -1.598 | 1.197 | 0.9704 | 4.824 | -#> |.....................| 0.03731 | 2.941 | 0.9551 | -0.2334 | -#> | 71| 290.95083 | 1.014 | -1.044 | -1.101 | 1.632 | -#> |.....................| -2.997 | -0.6188 | -0.7915 | -0.5751 | -#> | U| 290.95083 | 94.43 | -0.1653 | 2.081 | 2.522 | -#> |.....................| 5.960e-07 | 0.9912 | 1.237 | 1.500 | -#> | X| 290.95083 | 94.43 | 0.8477 | 8.010 | 2.522 | -#> |.....................| 5.960e-07 | 0.9912 | 1.237 | 1.500 | -#> | F| Forward Diff. | 14.81 | 1.204 | 1.097 | 4.820 | -#> |.....................| 0.03908 | 3.014 | 0.9116 | -0.2462 | -#> | 72| 290.93714 | 1.014 | -1.046 | -1.101 | 1.630 | -#> |.....................| -2.997 | -0.6196 | -0.7913 | -0.5744 | -#> | U| 290.93714 | 94.36 | -0.1673 | 2.081 | 2.522 | -#> |.....................| 5.960e-07 | 0.9906 | 1.237 | 1.501 | -#> | X| 290.93714 | 94.36 | 0.8459 | 8.014 | 2.522 | -#> |.....................| 5.960e-07 | 0.9906 | 1.237 | 1.501 | -#> | F| Forward Diff. | -1.943 | 1.135 | 0.9791 | 4.793 | -#> |.....................| 0.03360 | 3.051 | 0.9080 | -0.2200 | -#> | 73| 290.92845 | 1.014 | -1.047 | -1.101 | 1.628 | -#> |.....................| -2.997 | -0.6209 | -0.7917 | -0.5743 | -#> | U| 290.92845 | 94.44 | -0.1678 | 2.081 | 2.521 | -#> |.....................| 5.960e-07 | 0.9896 | 1.237 | 1.501 | -#> | X| 290.92845 | 94.44 | 0.8455 | 8.011 | 2.521 | -#> |.....................| 5.960e-07 | 0.9896 | 1.237 | 1.501 | -#> | F| Forward Diff. | 17.70 | 1.147 | 1.134 | 4.752 | -#> |.....................| 0.02729 | 3.018 | 0.8867 | -0.2229 | -#> | 74| 290.91300 | 1.014 | -1.049 | -1.100 | 1.627 | -#> |.....................| -2.997 | -0.6219 | -0.7915 | -0.5737 | -#> | U| 290.913 | 94.36 | -0.1698 | 2.081 | 2.520 | -#> |.....................| 5.960e-07 | 0.9889 | 1.237 | 1.501 | -#> | X| 290.913 | 94.36 | 0.8439 | 8.016 | 2.520 | -#> |.....................| 5.960e-07 | 0.9889 | 1.237 | 1.501 | -#> | F| Forward Diff. | -1.940 | 1.078 | 0.9981 | 4.722 | -#> |.....................| 0.04064 | 3.105 | 0.9143 | -0.1849 | -#> | 75| 290.90444 | 1.014 | -1.049 | -1.101 | 1.625 | -#> |.....................| -2.997 | -0.6232 | -0.7919 | -0.5736 | -#> | U| 290.90444 | 94.44 | -0.1702 | 2.081 | 2.519 | -#> |.....................| 5.960e-07 | 0.9879 | 1.237 | 1.501 | -#> | X| 290.90444 | 94.44 | 0.8435 | 8.013 | 2.519 | -#> |.....................| 5.960e-07 | 0.9879 | 1.237 | 1.501 | -#> | F| Forward Diff. | 17.76 | 1.091 | 1.153 | 4.713 | -#> |.....................| 0.03198 | 2.950 | 0.8627 | -0.2001 | -#> | 76| 290.88905 | 1.014 | -1.051 | -1.100 | 1.624 | -#> |.....................| -2.997 | -0.6243 | -0.7916 | -0.5732 | -#> | U| 290.88905 | 94.36 | -0.1722 | 2.082 | 2.518 | -#> |.....................| 5.960e-07 | 0.9872 | 1.237 | 1.502 | -#> | X| 290.88905 | 94.36 | 0.8418 | 8.019 | 2.518 | -#> |.....................| 5.960e-07 | 0.9872 | 1.237 | 1.502 | -#> | F| Forward Diff. | -2.112 | 1.022 | 1.016 | 4.749 | -#> |.....................| 0.03990 | 3.117 | 0.8810 | -0.1779 | -#> | 77| 290.87937 | 1.014 | -1.052 | -1.100 | 1.622 | -#> |.....................| -2.997 | -0.6257 | -0.7918 | -0.5730 | -#> | U| 290.87937 | 94.43 | -0.1731 | 2.082 | 2.517 | -#> |.....................| 5.960e-07 | 0.9861 | 1.237 | 1.502 | -#> | X| 290.87937 | 94.43 | 0.8411 | 8.018 | 2.517 | -#> |.....................| 5.960e-07 | 0.9861 | 1.237 | 1.502 | -#> | F| Forward Diff. | 15.72 | 1.022 | 1.168 | 4.728 | -#> |.....................| 0.04036 | 3.118 | 0.8621 | -0.1806 | -#> | 78| 290.86528 | 1.014 | -1.054 | -1.099 | 1.621 | -#> |.....................| -2.997 | -0.6269 | -0.7915 | -0.5727 | -#> | U| 290.86528 | 94.36 | -0.1749 | 2.083 | 2.516 | -#> |.....................| 5.960e-07 | 0.9853 | 1.237 | 1.502 | -#> | X| 290.86528 | 94.36 | 0.8396 | 8.025 | 2.516 | -#> |.....................| 5.960e-07 | 0.9853 | 1.237 | 1.502 | -#> | F| Forward Diff. | -2.089 | 0.9583 | 1.055 | 4.711 | -#> |.....................| 0.04161 | 3.089 | 0.8790 | -0.1555 | -#> | 79| 290.85625 | 1.014 | -1.055 | -1.099 | 1.619 | -#> |.....................| -2.997 | -0.6283 | -0.7918 | -0.5726 | -#> | U| 290.85625 | 94.44 | -0.1756 | 2.082 | 2.515 | -#> |.....................| 5.960e-07 | 0.9842 | 1.237 | 1.503 | -#> | X| 290.85625 | 94.44 | 0.8389 | 8.023 | 2.515 | -#> |.....................| 5.960e-07 | 0.9842 | 1.237 | 1.503 | -#> | F| Forward Diff. | 16.77 | 0.9641 | 1.212 | 4.706 | -#> |.....................| 0.04215 | 3.138 | 0.8554 | -0.1643 | -#> | 80| 290.84140 | 1.014 | -1.056 | -1.099 | 1.618 | -#> |.....................| -2.997 | -0.6296 | -0.7915 | -0.5724 | -#> | U| 290.8414 | 94.36 | -0.1774 | 2.083 | 2.515 | -#> |.....................| 5.960e-07 | 0.9833 | 1.237 | 1.503 | -#> | X| 290.8414 | 94.36 | 0.8375 | 8.030 | 2.515 | -#> |.....................| 5.960e-07 | 0.9833 | 1.237 | 1.503 | -#> | F| Forward Diff. | -1.641 | 0.9006 | 1.093 | 4.694 | -#> |.....................| 0.04205 | 3.147 | 0.8775 | -0.1452 | -#> | 81| 290.83107 | 1.014 | -1.057 | -1.099 | 1.616 | -#> |.....................| -2.997 | -0.6310 | -0.7919 | -0.5723 | -#> | U| 290.83107 | 94.43 | -0.1778 | 2.083 | 2.514 | -#> |.....................| 5.960e-07 | 0.9823 | 1.237 | 1.503 | -#> | X| 290.83107 | 94.43 | 0.8371 | 8.026 | 2.514 | -#> |.....................| 5.960e-07 | 0.9823 | 1.237 | 1.503 | -#> | F| Forward Diff. | 15.22 | 0.9116 | 1.221 | 4.655 | -#> |.....................| 0.04015 | 3.140 | 0.8393 | -0.1501 | -#> | 82| 290.81725 | 1.014 | -1.059 | -1.098 | 1.615 | -#> |.....................| -2.997 | -0.6323 | -0.7916 | -0.5722 | -#> | U| 290.81725 | 94.36 | -0.1795 | 2.084 | 2.513 | -#> |.....................| 5.960e-07 | 0.9813 | 1.237 | 1.503 | -#> | X| 290.81725 | 94.36 | 0.8357 | 8.034 | 2.513 | -#> |.....................| 5.960e-07 | 0.9813 | 1.237 | 1.503 | -#> | F| Forward Diff. | -2.105 | 0.8517 | 1.114 | 4.660 | -#> |.....................| 0.03878 | 3.162 | 0.8666 | -0.1313 | -#> | 83| 290.80795 | 1.014 | -1.059 | -1.098 | 1.613 | -#> |.....................| -2.997 | -0.6339 | -0.7918 | -0.5722 | -#> | U| 290.80795 | 94.43 | -0.1802 | 2.084 | 2.512 | -#> |.....................| 5.960e-07 | 0.9802 | 1.237 | 1.503 | -#> | X| 290.80795 | 94.43 | 0.8351 | 8.033 | 2.512 | -#> |.....................| 5.960e-07 | 0.9802 | 1.237 | 1.503 | -#> | F| Forward Diff. | 16.11 | 0.8564 | 1.267 | 4.653 | -#> |.....................| 0.04303 | 3.178 | 0.8469 | -0.1413 | -#> | 84| 290.79348 | 1.014 | -1.061 | -1.097 | 1.611 | -#> |.....................| -2.997 | -0.6353 | -0.7914 | -0.5722 | -#> | U| 290.79348 | 94.36 | -0.1817 | 2.084 | 2.511 | -#> |.....................| 5.960e-07 | 0.9792 | 1.237 | 1.503 | -#> | X| 290.79348 | 94.36 | 0.8338 | 8.041 | 2.511 | -#> |.....................| 5.960e-07 | 0.9792 | 1.237 | 1.503 | -#> | F| Forward Diff. | -1.840 | 0.7976 | 1.155 | 4.587 | -#> |.....................| 0.02723 | 3.115 | 0.8603 | -0.1275 | -#> | 85| 290.78474 | 1.014 | -1.061 | -1.098 | 1.609 | -#> |.....................| -2.997 | -0.6367 | -0.7918 | -0.5721 | -#> | U| 290.78474 | 94.44 | -0.1821 | 2.084 | 2.510 | -#> |.....................| 5.960e-07 | 0.9781 | 1.237 | 1.503 | -#> | X| 290.78474 | 94.44 | 0.8335 | 8.036 | 2.510 | -#> |.....................| 5.960e-07 | 0.9781 | 1.237 | 1.503 | -#> | F| Forward Diff. | 17.19 | 0.8130 | 1.300 | 4.618 | -#> |.....................| 0.03919 | 3.190 | 0.8345 | -0.1328 | -#> | 86| 290.76934 | 1.014 | -1.063 | -1.097 | 1.608 | -#> |.....................| -2.997 | -0.6382 | -0.7915 | -0.5722 | -#> | U| 290.76934 | 94.36 | -0.1836 | 2.085 | 2.510 | -#> |.....................| 5.960e-07 | 0.9771 | 1.237 | 1.503 | -#> | X| 290.76934 | 94.36 | 0.8322 | 8.044 | 2.510 | -#> |.....................| 5.960e-07 | 0.9771 | 1.237 | 1.503 | -#> | F| Forward Diff. | -1.203 | 0.7543 | 1.182 | 4.565 | -#> |.....................| 0.03490 | 3.166 | 0.8589 | -0.1256 | -#> | 87| 290.75687 | 1.014 | -1.063 | -1.097 | 1.606 | -#> |.....................| -2.997 | -0.6397 | -0.7919 | -0.5722 | -#> | U| 290.75687 | 94.41 | -0.1840 | 2.084 | 2.508 | -#> |.....................| 5.960e-07 | 0.9760 | 1.237 | 1.503 | -#> | X| 290.75687 | 94.41 | 0.8319 | 8.039 | 2.508 | -#> |.....................| 5.960e-07 | 0.9760 | 1.237 | 1.503 | -#> | 88| 290.75123 | 1.015 | -1.063 | -1.098 | 1.604 | -#> |.....................| -2.997 | -0.6414 | -0.7924 | -0.5721 | -#> | U| 290.75123 | 94.47 | -0.1844 | 2.084 | 2.507 | -#> |.....................| 5.960e-07 | 0.9747 | 1.236 | 1.503 | -#> | X| 290.75123 | 94.47 | 0.8316 | 8.034 | 2.507 | -#> |.....................| 5.960e-07 | 0.9747 | 1.236 | 1.503 | -#> | F| Forward Diff. | 26.23 | 0.7709 | 1.374 | 4.560 | -#> |.....................| 0.04194 | 3.213 | 0.7966 | -0.1353 | -#> | 89| 290.71744 | 1.014 | -1.067 | -1.096 | 1.601 | -#> |.....................| -2.997 | -0.6448 | -0.7915 | -0.5726 | -#> | U| 290.71744 | 94.37 | -0.1875 | 2.086 | 2.506 | -#> |.....................| 5.960e-07 | 0.9722 | 1.237 | 1.503 | -#> | X| 290.71744 | 94.37 | 0.8291 | 8.054 | 2.506 | -#> |.....................| 5.960e-07 | 0.9722 | 1.237 | 1.503 | -#> | F| Forward Diff. | 0.1928 | 0.6670 | 1.256 | 4.555 | -#> |.....................| 0.04212 | 3.227 | 0.8436 | -0.1302 | -#> | 90| 290.68496 | 1.013 | -1.067 | -1.097 | 1.597 | -#> |.....................| -2.997 | -0.6481 | -0.7924 | -0.5725 | -#> | U| 290.68496 | 94.35 | -0.1881 | 2.085 | 2.503 | -#> |.....................| 5.960e-07 | 0.9698 | 1.236 | 1.503 | -#> | X| 290.68496 | 94.35 | 0.8285 | 8.044 | 2.503 | -#> |.....................| 5.960e-07 | 0.9698 | 1.236 | 1.503 | -#> | 91| 290.59496 | 1.013 | -1.069 | -1.101 | 1.583 | -#> |.....................| -2.997 | -0.6580 | -0.7950 | -0.5721 | -#> | U| 290.59496 | 94.29 | -0.1902 | 2.081 | 2.496 | -#> |.....................| 5.960e-07 | 0.9627 | 1.233 | 1.503 | -#> | X| 290.59496 | 94.29 | 0.8268 | 8.013 | 2.496 | -#> |.....................| 5.960e-07 | 0.9627 | 1.233 | 1.503 | -#> | 92| 290.34408 | 1.010 | -1.077 | -1.116 | 1.527 | -#> |.....................| -2.997 | -0.6974 | -0.8053 | -0.5705 | -#> | U| 290.34408 | 94.08 | -0.1983 | 2.066 | 2.465 | -#> |.....................| 5.960e-07 | 0.9340 | 1.223 | 1.505 | -#> | X| 290.34408 | 94.08 | 0.8201 | 7.891 | 2.465 | -#> |.....................| 5.960e-07 | 0.9340 | 1.223 | 1.505 | -#> | F| Forward Diff. | -74.08 | 0.3588 | -0.1794 | 3.803 | -#> |.....................| 0.04205 | 3.779 | 0.06785 | -0.005437 | -#> | 93| 289.95778 | 1.012 | -1.081 | -1.068 | 1.490 | -#> |.....................| -2.997 | -0.7670 | -0.7909 | -0.5845 | -#> | U| 289.95778 | 94.18 | -0.2020 | 2.114 | 2.445 | -#> |.....................| 5.960e-07 | 0.8834 | 1.238 | 1.490 | -#> | X| 289.95778 | 94.18 | 0.8171 | 8.282 | 2.445 | -#> |.....................| 5.960e-07 | 0.8834 | 1.238 | 1.490 | -#> | 94| 289.83089 | 1.009 | -1.086 | -1.006 | 1.442 | -#> |.....................| -2.997 | -0.8563 | -0.7725 | -0.6025 | -#> | U| 289.83089 | 93.98 | -0.2067 | 2.176 | 2.418 | -#> |.....................| 5.960e-07 | 0.8185 | 1.257 | 1.470 | -#> | X| 289.83089 | 93.98 | 0.8132 | 8.812 | 2.418 | -#> |.....................| 5.960e-07 | 0.8185 | 1.257 | 1.470 | -#> | F| Forward Diff. | -65.01 | -0.01626 | 4.198 | 3.297 | -#> |.....................| 0.05097 | 3.562 | 1.909 | -0.3175 | -#> | 95| 290.63229 | 1.014 | -1.226 | -1.068 | 1.287 | -#> |.....................| -2.997 | -1.101 | -0.7595 | -0.8853 | -#> | U| 290.63229 | 94.43 | -0.3467 | 2.113 | 2.333 | -#> |.....................| 5.960e-07 | 0.6407 | 1.271 | 1.167 | -#> | X| 290.63229 | 94.43 | 0.7070 | 8.277 | 2.333 | -#> |.....................| 5.960e-07 | 0.6407 | 1.271 | 1.167 | -#> | 96| 289.56584 | 1.017 | -1.134 | -1.028 | 1.388 | -#> |.....................| -2.997 | -0.9416 | -0.7681 | -0.7007 | -#> | U| 289.56584 | 94.70 | -0.2554 | 2.154 | 2.389 | -#> |.....................| 5.960e-07 | 0.7564 | 1.261 | 1.365 | -#> | X| 289.56584 | 94.70 | 0.7746 | 8.619 | 2.389 | -#> |.....................| 5.960e-07 | 0.7564 | 1.261 | 1.365 | -#> | F| Forward Diff. | 59.80 | -0.9076 | 3.450 | 2.884 | -#> |.....................| 0.04168 | 2.247 | 1.868 | -3.338 | -#> | 97| 289.16078 | 1.017 | -1.094 | -1.010 | 1.317 | -#> |.....................| -2.997 | -0.9798 | -0.7948 | -0.5837 | -#> | U| 289.16078 | 94.64 | -0.2152 | 2.172 | 2.350 | -#> |.....................| 5.960e-07 | 0.7287 | 1.234 | 1.491 | -#> | X| 289.16078 | 94.64 | 0.8063 | 8.773 | 2.350 | -#> |.....................| 5.960e-07 | 0.7287 | 1.234 | 1.491 | -#> | F| Forward Diff. | 50.77 | -0.08196 | 5.132 | 1.948 | -#> |.....................| 0.04608 | 1.474 | 0.6389 | 0.4459 | -#> | 98| 290.19527 | 1.002 | -1.018 | -1.037 | 1.157 | -#> |.....................| -2.997 | -1.195 | -0.7989 | -0.6967 | -#> | U| 290.19527 | 93.32 | -0.1385 | 2.145 | 2.263 | -#> |.....................| 5.960e-07 | 0.5724 | 1.229 | 1.370 | -#> | X| 290.19527 | 93.32 | 0.8707 | 8.542 | 2.263 | -#> |.....................| 5.960e-07 | 0.5724 | 1.229 | 1.370 | -#> | 99| 289.65582 | 1.003 | -1.072 | -1.019 | 1.270 | -#> |.....................| -2.997 | -1.043 | -0.7961 | -0.6170 | -#> | U| 289.65582 | 93.34 | -0.1926 | 2.163 | 2.324 | -#> |.....................| 5.960e-07 | 0.6825 | 1.232 | 1.455 | -#> | X| 289.65582 | 93.34 | 0.8248 | 8.696 | 2.324 | -#> |.....................| 5.960e-07 | 0.6825 | 1.232 | 1.455 | -#> | 100| 289.77865 | 1.003 | -1.088 | -1.014 | 1.303 | -#> |.....................| -2.997 | -0.9984 | -0.7953 | -0.5934 | -#> | U| 289.77865 | 93.35 | -0.2087 | 2.168 | 2.342 | -#> |.....................| 5.960e-07 | 0.7151 | 1.233 | 1.480 | -#> | X| 289.77865 | 93.35 | 0.8116 | 8.742 | 2.342 | -#> |.....................| 5.960e-07 | 0.7151 | 1.233 | 1.480 | -#> | 101| 289.23886 | 1.008 | -1.094 | -1.011 | 1.317 | -#> |.....................| -2.997 | -0.9800 | -0.7949 | -0.5837 | -#> | U| 289.23886 | 93.87 | -0.2152 | 2.171 | 2.350 | -#> |.....................| 5.960e-07 | 0.7285 | 1.234 | 1.491 | -#> | X| 289.23886 | 93.87 | 0.8064 | 8.765 | 2.350 | -#> |.....................| 5.960e-07 | 0.7285 | 1.234 | 1.491 | -#> | 102| 289.07165 | 1.013 | -1.094 | -1.010 | 1.317 | -#> |.....................| -2.997 | -0.9799 | -0.7948 | -0.5837 | -#> | U| 289.07165 | 94.31 | -0.2152 | 2.171 | 2.350 | -#> |.....................| 5.960e-07 | 0.7286 | 1.234 | 1.491 | -#> | X| 289.07165 | 94.31 | 0.8063 | 8.770 | 2.350 | -#> |.....................| 5.960e-07 | 0.7286 | 1.234 | 1.491 | -#> | F| Forward Diff. | -0.3607 | -0.1394 | 4.728 | 1.937 | -#> |.....................| 0.04518 | 1.333 | 0.6601 | 0.3686 | -#> | 103| 289.05383 | 1.013 | -1.094 | -1.014 | 1.315 | -#> |.....................| -2.997 | -0.9807 | -0.7952 | -0.5839 | -#> | U| 289.05383 | 94.33 | -0.2152 | 2.168 | 2.349 | -#> |.....................| 5.960e-07 | 0.7280 | 1.233 | 1.490 | -#> | X| 289.05383 | 94.33 | 0.8064 | 8.742 | 2.349 | -#> |.....................| 5.960e-07 | 0.7280 | 1.233 | 1.490 | -#> | 104| 289.00706 | 1.014 | -1.094 | -1.023 | 1.312 | -#> |.....................| -2.997 | -0.9834 | -0.7965 | -0.5847 | -#> | U| 289.00706 | 94.40 | -0.2149 | 2.159 | 2.347 | -#> |.....................| 5.960e-07 | 0.7260 | 1.232 | 1.490 | -#> | X| 289.00706 | 94.40 | 0.8066 | 8.661 | 2.347 | -#> |.....................| 5.960e-07 | 0.7260 | 1.232 | 1.490 | -#> | 105| 288.92149 | 1.016 | -1.093 | -1.055 | 1.299 | -#> |.....................| -2.997 | -0.9924 | -0.8010 | -0.5872 | -#> | U| 288.92149 | 94.63 | -0.2139 | 2.127 | 2.340 | -#> |.....................| 5.960e-07 | 0.7195 | 1.227 | 1.487 | -#> | X| 288.92149 | 94.63 | 0.8074 | 8.388 | 2.340 | -#> |.....................| 5.960e-07 | 0.7195 | 1.227 | 1.487 | -#> | F| Forward Diff. | 43.21 | 0.03028 | 3.221 | 1.557 | -#> |.....................| 0.008151 | 1.175 | 0.2057 | -0.1154 | -#> | 106| 288.79118 | 1.014 | -1.096 | -1.061 | 1.264 | -#> |.....................| -2.997 | -1.027 | -0.7973 | -0.5956 | -#> | U| 288.79118 | 94.43 | -0.2174 | 2.120 | 2.321 | -#> |.....................| 5.960e-07 | 0.6943 | 1.231 | 1.478 | -#> | X| 288.79118 | 94.43 | 0.8046 | 8.334 | 2.321 | -#> |.....................| 5.960e-07 | 0.6943 | 1.231 | 1.478 | -#> | F| Forward Diff. | 10.81 | -0.06252 | 2.679 | 1.204 | -#> |.....................| 0.03262 | -0.1240 | 0.4322 | -0.2470 | -#> | 107| 288.75294 | 1.013 | -1.132 | -1.081 | 1.252 | -#> |.....................| -2.997 | -1.011 | -0.7930 | -0.5741 | -#> | U| 288.75294 | 94.35 | -0.2531 | 2.101 | 2.314 | -#> |.....................| 5.960e-07 | 0.7060 | 1.235 | 1.501 | -#> | X| 288.75294 | 94.35 | 0.7764 | 8.173 | 2.314 | -#> |.....................| 5.960e-07 | 0.7060 | 1.235 | 1.501 | -#> | F| Forward Diff. | -3.091 | -0.8602 | 1.971 | 1.009 | -#> |.....................| 0.04475 | 0.5130 | 0.7746 | 0.2303 | -#> | 108| 288.69834 | 1.013 | -1.093 | -1.104 | 1.232 | -#> |.....................| -2.997 | -1.011 | -0.7973 | -0.5721 | -#> | U| 288.69834 | 94.27 | -0.2136 | 2.078 | 2.303 | -#> |.....................| 5.960e-07 | 0.7061 | 1.231 | 1.503 | -#> | X| 288.69834 | 94.27 | 0.8077 | 7.987 | 2.303 | -#> |.....................| 5.960e-07 | 0.7061 | 1.231 | 1.503 | -#> | F| Forward Diff. | -16.61 | 0.06814 | 0.8311 | 0.6184 | -#> |.....................| 0.03151 | 0.5612 | 0.4558 | 0.3067 | -#> | 109| 288.67099 | 1.014 | -1.108 | -1.122 | 1.197 | -#> |.....................| -2.997 | -1.038 | -0.8030 | -0.5758 | -#> | U| 288.67099 | 94.36 | -0.2285 | 2.060 | 2.284 | -#> |.....................| 5.960e-07 | 0.6866 | 1.225 | 1.499 | -#> | X| 288.67099 | 94.36 | 0.7957 | 7.847 | 2.284 | -#> |.....................| 5.960e-07 | 0.6866 | 1.225 | 1.499 | -#> | F| Forward Diff. | -4.975 | -0.2154 | 0.1983 | 0.1047 | -#> |.....................| 0.03564 | -0.4652 | 0.1266 | 0.2269 | -#> | 110| 288.66432 | 1.014 | -1.097 | -1.128 | 1.196 | -#> |.....................| -2.997 | -1.027 | -0.8055 | -0.5813 | -#> | U| 288.66432 | 94.40 | -0.2184 | 2.053 | 2.283 | -#> |.....................| 5.960e-07 | 0.6941 | 1.222 | 1.493 | -#> | X| 288.66432 | 94.40 | 0.8038 | 7.793 | 2.283 | -#> |.....................| 5.960e-07 | 0.6941 | 1.222 | 1.493 | -#> | F| Forward Diff. | 0.3927 | 0.02780 | -0.05986 | 0.04997 | -#> |.....................| 0.03453 | -0.01180 | -0.03408 | 0.03556 | -#> | 111| 288.66432 | 1.014 | -1.097 | -1.128 | 1.196 | -#> |.....................| -2.997 | -1.027 | -0.8055 | -0.5813 | -#> | U| 288.66432 | 94.40 | -0.2184 | 2.053 | 2.283 | -#> |.....................| 5.960e-07 | 0.6941 | 1.222 | 1.493 | -#> | X| 288.66432 | 94.40 | 0.8038 | 7.793 | 2.283 | -#> |.....................| 5.960e-07 | 0.6941 | 1.222 | 1.493 | -#> done
#> Calculating residuals/tables
#> done
#> Warning: initial ETAs were nudged; (can control by foceiControl(etaNudge=., etaNudge2=))
#> Warning: ETAs were reset to zero during optimization; (Can control by foceiControl(resetEtaP=.))
#> Warning: last objective function was not at minimum, possible problems in optimization
#> Warning: parameter estimate near boundary; covariance not calculated: +f_nlmixr_fomc_saem_tc <- nlmixr(f_mmkin_parent_tc["FOMC", ], est = "saem", + control = saemControl(print = 0)) +
#> parameter labels from comments are typically ignored in non-interactive mode
#> Need to run with the source intact to parse comments
#>
#> Calculating covariance matrix
#>
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → compiling EBE model...
#>
#> done
#> Calculating residuals/tables
#> done
f_nlmixr_fomc_focei_tc <- nlmixr(f_mmkin_parent_tc["FOMC", ], est = "focei", + control = foceiControl(print = 0)) +
#> parameter labels from comments are typically ignored in non-interactive mode
#> Need to run with the source intact to parse comments
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → calculate jacobian
#>
#> → calculate sensitivities
#>
#> → calculate ∂(f)/∂(η)
#>
#> → calculate ∂(R²)/∂(η)
#>
#> → finding duplicate expressions in inner model...
#>
#> → optimizing duplicate expressions in inner model...
#>
#> → finding duplicate expressions in EBE model...
#>
#> → optimizing duplicate expressions in EBE model...
#>
#> → compiling inner model...
#>
#> done
#> → finding duplicate expressions in FD model...
#>
#> → optimizing duplicate expressions in FD model...
#>
#> → compiling EBE model...
#>
#> done
#> → compiling events FD model...
#>
#> done
#> done
#> Calculating residuals/tables
#> done
#> Warning: initial ETAs were nudged; (can control by foceiControl(etaNudge=., etaNudge2=))
#> Warning: ETAs were reset to zero during optimization; (Can control by foceiControl(resetEtaP=.))
#> Warning: last objective function was not at minimum, possible problems in optimization
#> Warning: parameter estimate near boundary; covariance not calculated: #> "rsd_high" #> use 'getVarCov' to calculate anyway
#> Warning: gradient problems with initial estimate; see $scaleInfo
AIC( @@ -4440,9 +347,8 @@ obtained by fitting the same model to a list of datasets using AIC(nlme(f_mmkin_parent["FOMC", ]))
#> [1] 468.0781
AIC(nlme(f_mmkin_parent["HS", ]))
#> [1] 535.609
-# nlme is comparable to nlmixr with focei, saem finds a better -# solution, the two-component error model does not improve it -plot(f_nlmixr_fomc_saem) +# The FOCEI fit of FOMC with constant variance or the tc error model is best +plot(f_nlmixr_fomc_saem_tc)
sfo_sfo <- mkinmod(parent = mkinsub("SFO", "A1"), A1 = mkinsub("SFO")) @@ -4503,7 +409,7 @@ obtained by fitting the same model to a list of datasets using k_A1=rx_expr_11; #> f_parent=1/(1+exp(-(ETA[4]+THETA[4]))); #> tad=tad(); -#> dosenum=dosenum();
#> Error in (function (data, inits, PKpars, model = NULL, pred = NULL, err = NULL, lower = -Inf, upper = Inf, fixed = NULL, skipCov = NULL, control = foceiControl(), thetaNames = NULL, etaNames = NULL, etaMat = NULL, ..., env = NULL, keep = NULL, drop = NULL) { set.seed(control$seed) .pt <- proc.time() RxODE::.setWarnIdSort(FALSE) on.exit(RxODE::.setWarnIdSort(TRUE)) loadNamespace("n1qn1") if (!RxODE::rxIs(control, "foceiControl")) { control <- do.call(foceiControl, control) } if (is.null(env)) { .ret <- new.env(parent = emptyenv()) } else { .ret <- env } .ret$origData <- data .ret$etaNames <- etaNames .ret$thetaFixed <- fixed .ret$control <- control .ret$control$focei.mu.ref <- integer(0) if (is(model, "RxODE") || is(model, "character")) { .ret$ODEmodel <- TRUE if (class(pred) != "function") { stop("pred must be a function specifying the prediction variables in this model.") } } else { .ret$ODEmodel <- TRUE model <- RxODE::rxGetLin(PKpars) pred <- eval(parse(text = "function(){return(Central);}")) } .square <- function(x) x * x .ret$diagXformInv <- c(sqrt = ".square", log = "exp", identity = "identity")[control$diagXform] if (is.null(err)) { err <- eval(parse(text = paste0("function(){err", paste(inits$ERROR[[1]], collapse = ""), "}"))) } .covNames <- .parNames <- c() .ret$adjLik <- control$adjLik .mixed <- !is.null(inits$OMGA) && length(inits$OMGA) > 0 if (!exists("noLik", envir = .ret)) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ssAtol <- rep(control$ssAtol, length(RxODE::rxModelVars(model)$state)) .ssRtol <- rep(control$ssRtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = (control$derivMethod == 2L), pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, interaction = (control$interaction == 1L), only.numeric = !.mixed, run.internal = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol .ssAtol <- c(.ssAtol, rep(control$ssAtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssAtol))) .ssRtol <- c(.ssRtol, rep(control$ssRtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssRtol))) .ret$control$rxControl$ssAtol <- .ssAtol .ret$control$rxControl$ssRtol <- .ssRtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { if (.ret$noLik) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = FALSE, pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, run.internal = TRUE, only.numeric = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { .extraPars <- NULL } } .ret$skipCov <- skipCov if (is.null(skipCov)) { if (is.null(fixed)) { .tmp <- rep(FALSE, length(inits$THTA)) } else { if (length(fixed) < length(inits$THTA)) { .tmp <- c(fixed, rep(FALSE, length(inits$THTA) - length(fixed))) } else { .tmp <- fixed[1:length(inits$THTA)] } } if (exists("uif", envir = .ret)) { .uifErr <- .ret$uif$ini$err[!is.na(.ret$uif$ini$ntheta)] .uifErr <- sapply(.uifErr, function(x) { if (is.na(x)) { return(FALSE) } return(!any(x == c("pow2", "tbs", "tbsYj"))) }) .tmp <- (.tmp | .uifErr) } .ret$skipCov <- c(.tmp, rep(TRUE, length(.extraPars))) .ret$control$focei.mu.ref <- .ret$uif$focei.mu.ref } if (is.null(.extraPars)) { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA))) } else { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA)), sprintf("ERR[%s]", seq_along(.extraPars))) } if (!is.null(thetaNames) && (length(inits$THTA) + length(.extraPars)) == length(thetaNames)) { .nms <- thetaNames } .ret$thetaNames <- .nms .thetaReset$thetaNames <- .nms if (length(lower) == 1) { lower <- rep(lower, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { print(inits$THTA) print(lower) stop("Lower must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (length(upper) == 1) { upper <- rep(upper, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { stop("Upper must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (!is.null(.extraPars)) { .ret$model$extra.pars <- eval(call(control$diagXform, .ret$model$extra.pars)) if (length(.ret$model$extra.pars) > 0) { inits$THTA <- c(inits$THTA, .ret$model$extra.pars) .lowerErr <- rep(control$atol[1] * 10, length(.ret$model$extra.pars)) .upperErr <- rep(Inf, length(.ret$model$extra.pars)) lower <- c(lower, .lowerErr) upper <- c(upper, .upperErr) } } if (is.null(data$ID)) stop("\"ID\" not found in data") if (is.null(data$DV)) stop("\"DV\" not found in data") if (is.null(data$EVID)) data$EVID <- 0 if (is.null(data$AMT)) data$AMT <- 0 for (.v in c("TIME", "AMT", "DV", .covNames)) { data[[.v]] <- as.double(data[[.v]]) } .ret$dataSav <- data .ds <- data[data$EVID != 0 & data$EVID != 2, c("ID", "TIME", "AMT", "EVID", .covNames)] .w <- which(tolower(names(data)) == "limit") .limitName <- NULL if (length(.w) == 1L) { .limitName <- names(data)[.w] } .censName <- NULL .w <- which(tolower(names(data)) == "cens") if (length(.w) == 1L) { .censName <- names(data[.w]) } data <- data[data$EVID == 0 | data$EVID == 2, c("ID", "TIME", "DV", "EVID", .covNames, .limitName, .censName)] .w <- which(!(names(.ret$dataSav) %in% c(.covNames, keep))) names(.ret$dataSav)[.w] <- tolower(names(.ret$dataSav[.w])) if (.mixed) { .lh <- .parseOM(inits$OMGA) .nlh <- sapply(.lh, length) .osplt <- rep(1:length(.lh), .nlh) .lini <- list(inits$THTA, unlist(.lh)) .nlini <- sapply(.lini, length) .nsplt <- rep(1:length(.lini), .nlini) .om0 <- .genOM(.lh) if (length(etaNames) == dim(.om0)[1]) { .ret$etaNames <- .ret$etaNames } else { .ret$etaNames <- sprintf("ETA[%d]", seq(1, dim(.om0)[1])) } .ret$rxInv <- RxODE::rxSymInvCholCreate(mat = .om0, diag.xform = control$diagXform) .ret$xType <- .ret$rxInv$xType .om0a <- .om0 .om0a <- .om0a/control$diagOmegaBoundLower .om0b <- .om0 .om0b <- .om0b * control$diagOmegaBoundUpper .om0a <- RxODE::rxSymInvCholCreate(mat = .om0a, diag.xform = control$diagXform) .om0b <- RxODE::rxSymInvCholCreate(mat = .om0b, diag.xform = control$diagXform) .omdf <- data.frame(a = .om0a$theta, m = .ret$rxInv$theta, b = .om0b$theta, diag = .om0a$theta.diag) .omdf$lower <- with(.omdf, ifelse(a > b, b, a)) .omdf$lower <- with(.omdf, ifelse(lower == m, -Inf, lower)) .omdf$lower <- with(.omdf, ifelse(!diag, -Inf, lower)) .omdf$upper <- with(.omdf, ifelse(a < b, b, a)) .omdf$upper <- with(.omdf, ifelse(upper == m, Inf, upper)) .omdf$upper <- with(.omdf, ifelse(!diag, Inf, upper)) .ret$control$nomega <- length(.omdf$lower) .ret$control$neta <- sum(.omdf$diag) .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) lower <- c(lower, .omdf$lower) upper <- c(upper, .omdf$upper) } else { .ret$control$nomega <- 0 .ret$control$neta <- 0 .ret$xType <- -1 .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) } .ret$lower <- lower .ret$upper <- upper .ret$thetaIni <- inits$THTA .scaleC <- double(length(lower)) if (is.null(control$scaleC)) { .scaleC <- rep(NA_real_, length(lower)) } else { .scaleC <- as.double(control$scaleC) if (length(lower) > length(.scaleC)) { .scaleC <- c(.scaleC, rep(NA_real_, length(lower) - length(.scaleC))) } else if (length(lower) < length(.scaleC)) { .scaleC <- .scaleC[seq(1, length(lower))] warning("scaleC control option has more options than estimated population parameters, please check.") } } .ret$scaleC <- .scaleC if (exists("uif", envir = .ret)) { .ini <- as.data.frame(.ret$uif$ini)[!is.na(.ret$uif$ini$err), c("est", "err", "ntheta")] for (.i in seq_along(.ini$err)) { if (is.na(.ret$scaleC[.ini$ntheta[.i]])) { if (any(.ini$err[.i] == c("boxCox", "yeoJohnson", "pow2", "tbs", "tbsYj"))) { .ret$scaleC[.ini$ntheta[.i]] <- 1 } else if (any(.ini$err[.i] == c("prop", "add", "norm", "dnorm", "logn", "dlogn", "lnorm", "dlnorm"))) { .ret$scaleC[.ini$ntheta[.i]] <- 0.5 * abs(.ini$est[.i]) } } } for (.i in .ini$model$extraProps$powTheta) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- 1 } .ini <- as.data.frame(.ret$uif$ini) for (.i in .ini$model$extraProps$factorial) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i] + 1)) } for (.i in .ini$model$extraProps$gamma) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i])) } for (.i in .ini$model$extraProps$log) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- log(abs(.ini$est[.i])) * abs(.ini$est[.i]) } for (.i in .ret$logitThetas) { .b <- .ret$logitThetasLow[.i] .c <- .ret$logitThetasHi[.i] .a <- .ini$est[.i] if (is.na(.ret$scaleC[.i])) { .ret$scaleC[.i] <- 1 * (-.b + .c) * exp(-.a)/((1 + exp(-.a))^2 * (.b + 1 * (-.b + .c)/(1 + exp(-.a)))) } } } names(.ret$thetaIni) <- sprintf("THETA[%d]", seq_along(.ret$thetaIni)) if (is.null(etaMat) & !is.null(control$etaMat)) { .ret$etaMat <- control$etaMat } else { .ret$etaMat <- etaMat } .ret$setupTime <- (proc.time() - .pt)["elapsed"] if (exists("uif", envir = .ret)) { .tmp <- .ret$uif$logThetasList .ret$logThetas <- .tmp[[1]] .ret$logThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasList .ret$logitThetas <- .tmp[[1]] .ret$logitThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListLow .ret$logitThetasLow <- .tmp[[1]] .ret$logitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListHi .ret$logitThetasHi <- .tmp[[1]] .ret$logitThetasHiF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasList .ret$probitThetas <- .tmp[[1]] .ret$probitThetasF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListLow .ret$probitThetasLow <- .tmp[[1]] .ret$probitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListHi .ret$probitThetasHi <- .tmp[[1]] .ret$probitThetasHiF <- .tmp[[2]] } else { .ret$logThetasF <- integer(0) .ret$logitThetasF <- integer(0) .ret$logitThetasHiF <- numeric(0) .ret$logitThetasLowF <- numeric(0) .ret$logitThetas <- integer(0) .ret$logitThetasHi <- numeric(0) .ret$logitThetasLow <- numeric(0) .ret$probitThetasF <- integer(0) .ret$probitThetasHiF <- numeric(0) .ret$probitThetasLowF <- numeric(0) .ret$probitThetas <- integer(0) .ret$probitThetasHi <- numeric(0) .ret$probitThetasLow <- numeric(0) } if (exists("noLik", envir = .ret)) { if (!.ret$noLik) { .ret$.params <- c(sprintf("THETA[%d]", seq_along(.ret$thetaIni)), sprintf("ETA[%d]", seq(1, dim(.om0)[1]))) .ret$.thetan <- length(.ret$thetaIni) .ret$nobs <- sum(data$EVID == 0) } } .ret$control$printTop <- TRUE .ret$control$nF <- 0 .est0 <- .ret$thetaIni if (!is.null(.ret$model$pred.nolhs)) { .ret$control$predNeq <- length(.ret$model$pred.nolhs$state) } else { .ret$control$predNeq <- 0L } .fitFun <- function(.ret) { this.env <- environment() assign("err", "theta reset", this.env) while (this.env$err == "theta reset") { assign("err", "", this.env) .ret0 <- tryCatch({ foceiFitCpp_(.ret) }, error = function(e) { if (regexpr("theta reset", e$message) != -1) { assign("zeroOuter", FALSE, this.env) assign("zeroGrad", FALSE, this.env) if (regexpr("theta reset0", e$message) != -1) { assign("zeroGrad", TRUE, this.env) } else if (regexpr("theta resetZ", e$message) != -1) { assign("zeroOuter", TRUE, this.env) } assign("err", "theta reset", this.env) } else { assign("err", e$message, this.env) } }) if (this.env$err == "theta reset") { .nm <- names(.ret$thetaIni) .ret$thetaIni <- setNames(.thetaReset$thetaIni + 0, .nm) .ret$rxInv$theta <- .thetaReset$omegaTheta .ret$control$printTop <- FALSE .ret$etaMat <- .thetaReset$etaMat .ret$control$etaMat <- .thetaReset$etaMat .ret$control$maxInnerIterations <- .thetaReset$maxInnerIterations .ret$control$nF <- .thetaReset$nF .ret$control$gillRetC <- .thetaReset$gillRetC .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillDf <- .thetaReset$gillDf .ret$control$gillDf2 <- .thetaReset$gillDf2 .ret$control$gillErr <- .thetaReset$gillErr .ret$control$rEps <- .thetaReset$rEps .ret$control$aEps <- .thetaReset$aEps .ret$control$rEpsC <- .thetaReset$rEpsC .ret$control$aEpsC <- .thetaReset$aEpsC .ret$control$c1 <- .thetaReset$c1 .ret$control$c2 <- .thetaReset$c2 if (this.env$zeroOuter) { message("Posthoc reset") .ret$control$maxOuterIterations <- 0L } else if (this.env$zeroGrad) { message("Theta reset (zero gradient values); Switch to bobyqa") RxODE::rxReq("minqa") .ret$control$outerOptFun <- .bobyqa .ret$control$outerOpt <- -1L } else { message("Theta reset (ETA drift)") } } } if (this.env$err != "") { stop(this.env$err) } else { return(.ret0) } } .ret0 <- try(.fitFun(.ret)) .n <- 1 while (inherits(.ret0, "try-error") && control$maxOuterIterations != 0 && .n <= control$nRetries) { message(sprintf("Restart %s", .n)) .ret$control$nF <- 0 .estNew <- .est0 + 0.2 * .n * abs(.est0) * stats::runif(length(.est0)) - 0.1 * .n .estNew <- sapply(seq_along(.est0), function(.i) { if (.ret$thetaFixed[.i]) { return(.est0[.i]) } else if (.estNew[.i] < lower[.i]) { return(lower + (.Machine$double.eps)^(1/7)) } else if (.estNew[.i] > upper[.i]) { return(upper - (.Machine$double.eps)^(1/7)) } else { return(.estNew[.i]) } }) .ret$thetaIni <- .estNew .ret0 <- try(.fitFun(.ret)) .n <- .n + 1 } if (inherits(.ret0, "try-error")) stop("Could not fit data.") .ret <- .ret0 if (exists("parHistData", .ret)) { .tmp <- .ret$parHistData .tmp <- .tmp[.tmp$type == "Unscaled", names(.tmp) != "type"] .iter <- .tmp$iter .tmp <- .tmp[, names(.tmp) != "iter"] .ret$parHistStacked <- data.frame(stack(.tmp), iter = .iter) names(.ret$parHistStacked) <- c("val", "par", "iter") .ret$parHist <- data.frame(iter = .iter, .tmp) } if (.mixed) { .etas <- .ret$ranef .thetas <- .ret$fixef .pars <- .Call(`_nlmixr_nlmixrParameters`, .thetas, .etas) .ret$shrink <- .Call(`_nlmixr_calcShrinkOnly`, .ret$omega, .pars$eta.lst, length(.etas$ID)) .updateParFixed(.ret) } else { .updateParFixed(.ret) } if (!exists("table", .ret)) { .ret$table <- tableControl() } if (control$calcTables) { .ret <- addTable(.ret, updateObject = "no", keep = keep, drop = drop, table = .ret$table) } .ret})(data = dat, inits = .FoceiInits, PKpars = .pars, model = .mod, pred = function() { return(nlmixr_pred) }, err = uif$error, lower = uif$focei.lower, upper = uif$focei.upper, fixed = uif$focei.fixed, thetaNames = uif$focei.names, etaNames = uif$eta.names, control = control, env = env, keep = .keep, drop = .drop): Not all the covariates are in the dataset.
f_nlmixr_fomc_sfo_focei_const <- nlmixr(f_mmkin_const["FOMC-SFO", ], est = "focei") +#> dosenum=dosenum();
#> Needed Covariates:
#> [1] "f_parent_to_A1" "CMT"
#> Error in (function (data, inits, PKpars, model = NULL, pred = NULL, err = NULL, lower = -Inf, upper = Inf, fixed = NULL, skipCov = NULL, control = foceiControl(), thetaNames = NULL, etaNames = NULL, etaMat = NULL, ..., env = NULL, keep = NULL, drop = NULL) { set.seed(control$seed) .pt <- proc.time() RxODE::.setWarnIdSort(FALSE) on.exit(RxODE::.setWarnIdSort(TRUE)) loadNamespace("n1qn1") if (!RxODE::rxIs(control, "foceiControl")) { control <- do.call(foceiControl, control) } if (is.null(env)) { .ret <- new.env(parent = emptyenv()) } else { .ret <- env } .ret$origData <- data .ret$etaNames <- etaNames .ret$thetaFixed <- fixed .ret$control <- control .ret$control$focei.mu.ref <- integer(0) if (is(model, "RxODE") || is(model, "character")) { .ret$ODEmodel <- TRUE if (class(pred) != "function") { stop("pred must be a function specifying the prediction variables in this model.") } } else { .ret$ODEmodel <- TRUE model <- RxODE::rxGetLin(PKpars) pred <- eval(parse(text = "function(){return(Central);}")) } .square <- function(x) x * x .ret$diagXformInv <- c(sqrt = ".square", log = "exp", identity = "identity")[control$diagXform] if (is.null(err)) { err <- eval(parse(text = paste0("function(){err", paste(inits$ERROR[[1]], collapse = ""), "}"))) } .covNames <- .parNames <- c() .ret$adjLik <- control$adjLik .mixed <- !is.null(inits$OMGA) && length(inits$OMGA) > 0 if (!exists("noLik", envir = .ret)) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ssAtol <- rep(control$ssAtol, length(RxODE::rxModelVars(model)$state)) .ssRtol <- rep(control$ssRtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = (control$derivMethod == 2L), pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, interaction = (control$interaction == 1L), only.numeric = !.mixed, run.internal = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol .ssAtol <- c(.ssAtol, rep(control$ssAtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssAtol))) .ssRtol <- c(.ssRtol, rep(control$ssRtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssRtol))) .ret$control$rxControl$ssAtol <- .ssAtol .ret$control$rxControl$ssRtol <- .ssRtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { if (.ret$noLik) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = FALSE, pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, run.internal = TRUE, only.numeric = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { .extraPars <- NULL } } .ret$skipCov <- skipCov if (is.null(skipCov)) { if (is.null(fixed)) { .tmp <- rep(FALSE, length(inits$THTA)) } else { if (length(fixed) < length(inits$THTA)) { .tmp <- c(fixed, rep(FALSE, length(inits$THTA) - length(fixed))) } else { .tmp <- fixed[1:length(inits$THTA)] } } if (exists("uif", envir = .ret)) { .uifErr <- .ret$uif$ini$err[!is.na(.ret$uif$ini$ntheta)] .uifErr <- sapply(.uifErr, function(x) { if (is.na(x)) { return(FALSE) } return(!any(x == c("pow2", "tbs", "tbsYj"))) }) .tmp <- (.tmp | .uifErr) } .ret$skipCov <- c(.tmp, rep(TRUE, length(.extraPars))) .ret$control$focei.mu.ref <- .ret$uif$focei.mu.ref } if (is.null(.extraPars)) { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA))) } else { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA)), sprintf("ERR[%s]", seq_along(.extraPars))) } if (!is.null(thetaNames) && (length(inits$THTA) + length(.extraPars)) == length(thetaNames)) { .nms <- thetaNames } .ret$thetaNames <- .nms .thetaReset$thetaNames <- .nms if (length(lower) == 1) { lower <- rep(lower, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { print(inits$THTA) print(lower) stop("Lower must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (length(upper) == 1) { upper <- rep(upper, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { stop("Upper must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (!is.null(.extraPars)) { .ret$model$extra.pars <- eval(call(control$diagXform, .ret$model$extra.pars)) if (length(.ret$model$extra.pars) > 0) { inits$THTA <- c(inits$THTA, .ret$model$extra.pars) .lowerErr <- rep(control$atol[1] * 10, length(.ret$model$extra.pars)) .upperErr <- rep(Inf, length(.ret$model$extra.pars)) lower <- c(lower, .lowerErr) upper <- c(upper, .upperErr) } } if (is.null(data$ID)) stop("\"ID\" not found in data") if (is.null(data$DV)) stop("\"DV\" not found in data") if (is.null(data$EVID)) data$EVID <- 0 if (is.null(data$AMT)) data$AMT <- 0 for (.v in c("TIME", "AMT", "DV", .covNames)) { data[[.v]] <- as.double(data[[.v]]) } .ret$dataSav <- data .ds <- data[data$EVID != 0 & data$EVID != 2, c("ID", "TIME", "AMT", "EVID", .covNames)] .w <- which(tolower(names(data)) == "limit") .limitName <- NULL if (length(.w) == 1L) { .limitName <- names(data)[.w] } .censName <- NULL .w <- which(tolower(names(data)) == "cens") if (length(.w) == 1L) { .censName <- names(data[.w]) } data <- data[data$EVID == 0 | data$EVID == 2, c("ID", "TIME", "DV", "EVID", .covNames, .limitName, .censName)] .w <- which(!(names(.ret$dataSav) %in% c(.covNames, keep))) names(.ret$dataSav)[.w] <- tolower(names(.ret$dataSav[.w])) if (.mixed) { .lh <- .parseOM(inits$OMGA) .nlh <- sapply(.lh, length) .osplt <- rep(1:length(.lh), .nlh) .lini <- list(inits$THTA, unlist(.lh)) .nlini <- sapply(.lini, length) .nsplt <- rep(1:length(.lini), .nlini) .om0 <- .genOM(.lh) if (length(etaNames) == dim(.om0)[1]) { .ret$etaNames <- .ret$etaNames } else { .ret$etaNames <- sprintf("ETA[%d]", seq(1, dim(.om0)[1])) } .ret$rxInv <- RxODE::rxSymInvCholCreate(mat = .om0, diag.xform = control$diagXform) .ret$xType <- .ret$rxInv$xType .om0a <- .om0 .om0a <- .om0a/control$diagOmegaBoundLower .om0b <- .om0 .om0b <- .om0b * control$diagOmegaBoundUpper .om0a <- RxODE::rxSymInvCholCreate(mat = .om0a, diag.xform = control$diagXform) .om0b <- RxODE::rxSymInvCholCreate(mat = .om0b, diag.xform = control$diagXform) .omdf <- data.frame(a = .om0a$theta, m = .ret$rxInv$theta, b = .om0b$theta, diag = .om0a$theta.diag) .omdf$lower <- with(.omdf, ifelse(a > b, b, a)) .omdf$lower <- with(.omdf, ifelse(lower == m, -Inf, lower)) .omdf$lower <- with(.omdf, ifelse(!diag, -Inf, lower)) .omdf$upper <- with(.omdf, ifelse(a < b, b, a)) .omdf$upper <- with(.omdf, ifelse(upper == m, Inf, upper)) .omdf$upper <- with(.omdf, ifelse(!diag, Inf, upper)) .ret$control$nomega <- length(.omdf$lower) .ret$control$neta <- sum(.omdf$diag) .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) lower <- c(lower, .omdf$lower) upper <- c(upper, .omdf$upper) } else { .ret$control$nomega <- 0 .ret$control$neta <- 0 .ret$xType <- -1 .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) } .ret$lower <- lower .ret$upper <- upper .ret$thetaIni <- inits$THTA .scaleC <- double(length(lower)) if (is.null(control$scaleC)) { .scaleC <- rep(NA_real_, length(lower)) } else { .scaleC <- as.double(control$scaleC) if (length(lower) > length(.scaleC)) { .scaleC <- c(.scaleC, rep(NA_real_, length(lower) - length(.scaleC))) } else if (length(lower) < length(.scaleC)) { .scaleC <- .scaleC[seq(1, length(lower))] warning("scaleC control option has more options than estimated population parameters, please check.") } } .ret$scaleC <- .scaleC if (exists("uif", envir = .ret)) { .ini <- as.data.frame(.ret$uif$ini)[!is.na(.ret$uif$ini$err), c("est", "err", "ntheta")] for (.i in seq_along(.ini$err)) { if (is.na(.ret$scaleC[.ini$ntheta[.i]])) { if (any(.ini$err[.i] == c("boxCox", "yeoJohnson", "pow2", "tbs", "tbsYj"))) { .ret$scaleC[.ini$ntheta[.i]] <- 1 } else if (any(.ini$err[.i] == c("prop", "add", "norm", "dnorm", "logn", "dlogn", "lnorm", "dlnorm"))) { .ret$scaleC[.ini$ntheta[.i]] <- 0.5 * abs(.ini$est[.i]) } } } for (.i in .ini$model$extraProps$powTheta) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- 1 } .ini <- as.data.frame(.ret$uif$ini) for (.i in .ini$model$extraProps$factorial) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i] + 1)) } for (.i in .ini$model$extraProps$gamma) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i])) } for (.i in .ini$model$extraProps$log) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- log(abs(.ini$est[.i])) * abs(.ini$est[.i]) } for (.i in .ret$logitThetas) { .b <- .ret$logitThetasLow[.i] .c <- .ret$logitThetasHi[.i] .a <- .ini$est[.i] if (is.na(.ret$scaleC[.i])) { .ret$scaleC[.i] <- 1 * (-.b + .c) * exp(-.a)/((1 + exp(-.a))^2 * (.b + 1 * (-.b + .c)/(1 + exp(-.a)))) } } } names(.ret$thetaIni) <- sprintf("THETA[%d]", seq_along(.ret$thetaIni)) if (is.null(etaMat) & !is.null(control$etaMat)) { .ret$etaMat <- control$etaMat } else { .ret$etaMat <- etaMat } .ret$setupTime <- (proc.time() - .pt)["elapsed"] if (exists("uif", envir = .ret)) { .tmp <- .ret$uif$logThetasList .ret$logThetas <- .tmp[[1]] .ret$logThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasList .ret$logitThetas <- .tmp[[1]] .ret$logitThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListLow .ret$logitThetasLow <- .tmp[[1]] .ret$logitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListHi .ret$logitThetasHi <- .tmp[[1]] .ret$logitThetasHiF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasList .ret$probitThetas <- .tmp[[1]] .ret$probitThetasF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListLow .ret$probitThetasLow <- .tmp[[1]] .ret$probitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListHi .ret$probitThetasHi <- .tmp[[1]] .ret$probitThetasHiF <- .tmp[[2]] } else { .ret$logThetasF <- integer(0) .ret$logitThetasF <- integer(0) .ret$logitThetasHiF <- numeric(0) .ret$logitThetasLowF <- numeric(0) .ret$logitThetas <- integer(0) .ret$logitThetasHi <- numeric(0) .ret$logitThetasLow <- numeric(0) .ret$probitThetasF <- integer(0) .ret$probitThetasHiF <- numeric(0) .ret$probitThetasLowF <- numeric(0) .ret$probitThetas <- integer(0) .ret$probitThetasHi <- numeric(0) .ret$probitThetasLow <- numeric(0) } if (exists("noLik", envir = .ret)) { if (!.ret$noLik) { .ret$.params <- c(sprintf("THETA[%d]", seq_along(.ret$thetaIni)), sprintf("ETA[%d]", seq(1, dim(.om0)[1]))) .ret$.thetan <- length(.ret$thetaIni) .ret$nobs <- sum(data$EVID == 0) } } .ret$control$printTop <- TRUE .ret$control$nF <- 0 .est0 <- .ret$thetaIni if (!is.null(.ret$model$pred.nolhs)) { .ret$control$predNeq <- length(.ret$model$pred.nolhs$state) } else { .ret$control$predNeq <- 0L } .fitFun <- function(.ret) { this.env <- environment() assign("err", "theta reset", this.env) while (this.env$err == "theta reset") { assign("err", "", this.env) .ret0 <- tryCatch({ foceiFitCpp_(.ret) }, error = function(e) { if (regexpr("theta reset", e$message) != -1) { assign("zeroOuter", FALSE, this.env) assign("zeroGrad", FALSE, this.env) if (regexpr("theta reset0", e$message) != -1) { assign("zeroGrad", TRUE, this.env) } else if (regexpr("theta resetZ", e$message) != -1) { assign("zeroOuter", TRUE, this.env) } assign("err", "theta reset", this.env) } else { assign("err", e$message, this.env) } }) if (this.env$err == "theta reset") { .nm <- names(.ret$thetaIni) .ret$thetaIni <- setNames(.thetaReset$thetaIni + 0, .nm) .ret$rxInv$theta <- .thetaReset$omegaTheta .ret$control$printTop <- FALSE .ret$etaMat <- .thetaReset$etaMat .ret$control$etaMat <- .thetaReset$etaMat .ret$control$maxInnerIterations <- .thetaReset$maxInnerIterations .ret$control$nF <- .thetaReset$nF .ret$control$gillRetC <- .thetaReset$gillRetC .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillDf <- .thetaReset$gillDf .ret$control$gillDf2 <- .thetaReset$gillDf2 .ret$control$gillErr <- .thetaReset$gillErr .ret$control$rEps <- .thetaReset$rEps .ret$control$aEps <- .thetaReset$aEps .ret$control$rEpsC <- .thetaReset$rEpsC .ret$control$aEpsC <- .thetaReset$aEpsC .ret$control$c1 <- .thetaReset$c1 .ret$control$c2 <- .thetaReset$c2 if (this.env$zeroOuter) { message("Posthoc reset") .ret$control$maxOuterIterations <- 0L } else if (this.env$zeroGrad) { message("Theta reset (zero gradient values); Switch to bobyqa") RxODE::rxReq("minqa") .ret$control$outerOptFun <- .bobyqa .ret$control$outerOpt <- -1L } else { message("Theta reset (ETA drift)") } } } if (this.env$err != "") { stop(this.env$err) } else { return(.ret0) } } .ret0 <- try(.fitFun(.ret)) .n <- 1 while (inherits(.ret0, "try-error") && control$maxOuterIterations != 0 && .n <= control$nRetries) { message(sprintf("Restart %s", .n)) .ret$control$nF <- 0 .estNew <- .est0 + 0.2 * .n * abs(.est0) * stats::runif(length(.est0)) - 0.1 * .n .estNew <- sapply(seq_along(.est0), function(.i) { if (.ret$thetaFixed[.i]) { return(.est0[.i]) } else if (.estNew[.i] < lower[.i]) { return(lower + (.Machine$double.eps)^(1/7)) } else if (.estNew[.i] > upper[.i]) { return(upper - (.Machine$double.eps)^(1/7)) } else { return(.estNew[.i]) } }) .ret$thetaIni <- .estNew .ret0 <- try(.fitFun(.ret)) .n <- .n + 1 } if (inherits(.ret0, "try-error")) stop("Could not fit data.") .ret <- .ret0 if (exists("parHistData", .ret)) { .tmp <- .ret$parHistData .tmp <- .tmp[.tmp$type == "Unscaled", names(.tmp) != "type"] .iter <- .tmp$iter .tmp <- .tmp[, names(.tmp) != "iter"] .ret$parHistStacked <- data.frame(stack(.tmp), iter = .iter) names(.ret$parHistStacked) <- c("val", "par", "iter") .ret$parHist <- data.frame(iter = .iter, .tmp) } if (.mixed) { .etas <- .ret$ranef .thetas <- .ret$fixef .pars <- .Call(`_nlmixr_nlmixrParameters`, .thetas, .etas) .ret$shrink <- .Call(`_nlmixr_calcShrinkOnly`, .ret$omega, .pars$eta.lst, length(.etas$ID)) .updateParFixed(.ret) } else { .updateParFixed(.ret) } if (!exists("table", .ret)) { .ret$table <- tableControl() } if (control$calcTables) { .ret <- addTable(.ret, updateObject = "no", keep = keep, drop = drop, table = .ret$table) } .ret})(data = dat, inits = .FoceiInits, PKpars = .pars, model = .mod, pred = function() { return(nlmixr_pred) }, err = uif$error, lower = uif$focei.lower, upper = uif$focei.upper, fixed = uif$focei.fixed, thetaNames = uif$focei.names, etaNames = uif$eta.names, control = control, env = env, keep = .keep, drop = .drop): Not all the covariates are in the dataset.
#> Timing stopped at: 5.549 0.41 5.959
f_nlmixr_fomc_sfo_focei_const <- nlmixr(f_mmkin_const["FOMC-SFO", ], est = "focei")
#> parameter labels from comments are typically ignored in non-interactive mode
#> Need to run with the source intact to parse comments
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → calculate jacobian
#>
#> → calculate sensitivities
#>
#> → calculate ∂(f)/∂(η)
#>
#> → calculate ∂(R²)/∂(η)
#>
#> → finding duplicate expressions in inner model...
#>
#> → optimizing duplicate expressions in inner model...
#>
#> → finding duplicate expressions in EBE model...
#>
#> → optimizing duplicate expressions in EBE model...
#>
#> → compiling inner model...
#>
#> done
#> → finding duplicate expressions in FD model...
#>
#> → optimizing duplicate expressions in FD model...
#>
#> → compiling EBE model...
#>
#> done
#> → compiling events FD model...
#>
#> done
#> Model:
#> cmt(parent); #> cmt(A1); #> rx_expr_6~ETA[1]+THETA[1]; @@ -4552,7 +458,7 @@ obtained by fitting the same model to a list of datasets using beta=exp(rx_expr_8); #> f_parent=1/(1+exp(-(ETA[3]+THETA[3]))); #> tad=tad(); -#> dosenum=dosenum();
#> Error in (function (data, inits, PKpars, model = NULL, pred = NULL, err = NULL, lower = -Inf, upper = Inf, fixed = NULL, skipCov = NULL, control = foceiControl(), thetaNames = NULL, etaNames = NULL, etaMat = NULL, ..., env = NULL, keep = NULL, drop = NULL) { set.seed(control$seed) .pt <- proc.time() RxODE::.setWarnIdSort(FALSE) on.exit(RxODE::.setWarnIdSort(TRUE)) loadNamespace("n1qn1") if (!RxODE::rxIs(control, "foceiControl")) { control <- do.call(foceiControl, control) } if (is.null(env)) { .ret <- new.env(parent = emptyenv()) } else { .ret <- env } .ret$origData <- data .ret$etaNames <- etaNames .ret$thetaFixed <- fixed .ret$control <- control .ret$control$focei.mu.ref <- integer(0) if (is(model, "RxODE") || is(model, "character")) { .ret$ODEmodel <- TRUE if (class(pred) != "function") { stop("pred must be a function specifying the prediction variables in this model.") } } else { .ret$ODEmodel <- TRUE model <- RxODE::rxGetLin(PKpars) pred <- eval(parse(text = "function(){return(Central);}")) } .square <- function(x) x * x .ret$diagXformInv <- c(sqrt = ".square", log = "exp", identity = "identity")[control$diagXform] if (is.null(err)) { err <- eval(parse(text = paste0("function(){err", paste(inits$ERROR[[1]], collapse = ""), "}"))) } .covNames <- .parNames <- c() .ret$adjLik <- control$adjLik .mixed <- !is.null(inits$OMGA) && length(inits$OMGA) > 0 if (!exists("noLik", envir = .ret)) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ssAtol <- rep(control$ssAtol, length(RxODE::rxModelVars(model)$state)) .ssRtol <- rep(control$ssRtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = (control$derivMethod == 2L), pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, interaction = (control$interaction == 1L), only.numeric = !.mixed, run.internal = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol .ssAtol <- c(.ssAtol, rep(control$ssAtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssAtol))) .ssRtol <- c(.ssRtol, rep(control$ssRtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssRtol))) .ret$control$rxControl$ssAtol <- .ssAtol .ret$control$rxControl$ssRtol <- .ssRtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { if (.ret$noLik) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = FALSE, pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, run.internal = TRUE, only.numeric = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { .extraPars <- NULL } } .ret$skipCov <- skipCov if (is.null(skipCov)) { if (is.null(fixed)) { .tmp <- rep(FALSE, length(inits$THTA)) } else { if (length(fixed) < length(inits$THTA)) { .tmp <- c(fixed, rep(FALSE, length(inits$THTA) - length(fixed))) } else { .tmp <- fixed[1:length(inits$THTA)] } } if (exists("uif", envir = .ret)) { .uifErr <- .ret$uif$ini$err[!is.na(.ret$uif$ini$ntheta)] .uifErr <- sapply(.uifErr, function(x) { if (is.na(x)) { return(FALSE) } return(!any(x == c("pow2", "tbs", "tbsYj"))) }) .tmp <- (.tmp | .uifErr) } .ret$skipCov <- c(.tmp, rep(TRUE, length(.extraPars))) .ret$control$focei.mu.ref <- .ret$uif$focei.mu.ref } if (is.null(.extraPars)) { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA))) } else { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA)), sprintf("ERR[%s]", seq_along(.extraPars))) } if (!is.null(thetaNames) && (length(inits$THTA) + length(.extraPars)) == length(thetaNames)) { .nms <- thetaNames } .ret$thetaNames <- .nms .thetaReset$thetaNames <- .nms if (length(lower) == 1) { lower <- rep(lower, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { print(inits$THTA) print(lower) stop("Lower must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (length(upper) == 1) { upper <- rep(upper, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { stop("Upper must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (!is.null(.extraPars)) { .ret$model$extra.pars <- eval(call(control$diagXform, .ret$model$extra.pars)) if (length(.ret$model$extra.pars) > 0) { inits$THTA <- c(inits$THTA, .ret$model$extra.pars) .lowerErr <- rep(control$atol[1] * 10, length(.ret$model$extra.pars)) .upperErr <- rep(Inf, length(.ret$model$extra.pars)) lower <- c(lower, .lowerErr) upper <- c(upper, .upperErr) } } if (is.null(data$ID)) stop("\"ID\" not found in data") if (is.null(data$DV)) stop("\"DV\" not found in data") if (is.null(data$EVID)) data$EVID <- 0 if (is.null(data$AMT)) data$AMT <- 0 for (.v in c("TIME", "AMT", "DV", .covNames)) { data[[.v]] <- as.double(data[[.v]]) } .ret$dataSav <- data .ds <- data[data$EVID != 0 & data$EVID != 2, c("ID", "TIME", "AMT", "EVID", .covNames)] .w <- which(tolower(names(data)) == "limit") .limitName <- NULL if (length(.w) == 1L) { .limitName <- names(data)[.w] } .censName <- NULL .w <- which(tolower(names(data)) == "cens") if (length(.w) == 1L) { .censName <- names(data[.w]) } data <- data[data$EVID == 0 | data$EVID == 2, c("ID", "TIME", "DV", "EVID", .covNames, .limitName, .censName)] .w <- which(!(names(.ret$dataSav) %in% c(.covNames, keep))) names(.ret$dataSav)[.w] <- tolower(names(.ret$dataSav[.w])) if (.mixed) { .lh <- .parseOM(inits$OMGA) .nlh <- sapply(.lh, length) .osplt <- rep(1:length(.lh), .nlh) .lini <- list(inits$THTA, unlist(.lh)) .nlini <- sapply(.lini, length) .nsplt <- rep(1:length(.lini), .nlini) .om0 <- .genOM(.lh) if (length(etaNames) == dim(.om0)[1]) { .ret$etaNames <- .ret$etaNames } else { .ret$etaNames <- sprintf("ETA[%d]", seq(1, dim(.om0)[1])) } .ret$rxInv <- RxODE::rxSymInvCholCreate(mat = .om0, diag.xform = control$diagXform) .ret$xType <- .ret$rxInv$xType .om0a <- .om0 .om0a <- .om0a/control$diagOmegaBoundLower .om0b <- .om0 .om0b <- .om0b * control$diagOmegaBoundUpper .om0a <- RxODE::rxSymInvCholCreate(mat = .om0a, diag.xform = control$diagXform) .om0b <- RxODE::rxSymInvCholCreate(mat = .om0b, diag.xform = control$diagXform) .omdf <- data.frame(a = .om0a$theta, m = .ret$rxInv$theta, b = .om0b$theta, diag = .om0a$theta.diag) .omdf$lower <- with(.omdf, ifelse(a > b, b, a)) .omdf$lower <- with(.omdf, ifelse(lower == m, -Inf, lower)) .omdf$lower <- with(.omdf, ifelse(!diag, -Inf, lower)) .omdf$upper <- with(.omdf, ifelse(a < b, b, a)) .omdf$upper <- with(.omdf, ifelse(upper == m, Inf, upper)) .omdf$upper <- with(.omdf, ifelse(!diag, Inf, upper)) .ret$control$nomega <- length(.omdf$lower) .ret$control$neta <- sum(.omdf$diag) .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) lower <- c(lower, .omdf$lower) upper <- c(upper, .omdf$upper) } else { .ret$control$nomega <- 0 .ret$control$neta <- 0 .ret$xType <- -1 .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) } .ret$lower <- lower .ret$upper <- upper .ret$thetaIni <- inits$THTA .scaleC <- double(length(lower)) if (is.null(control$scaleC)) { .scaleC <- rep(NA_real_, length(lower)) } else { .scaleC <- as.double(control$scaleC) if (length(lower) > length(.scaleC)) { .scaleC <- c(.scaleC, rep(NA_real_, length(lower) - length(.scaleC))) } else if (length(lower) < length(.scaleC)) { .scaleC <- .scaleC[seq(1, length(lower))] warning("scaleC control option has more options than estimated population parameters, please check.") } } .ret$scaleC <- .scaleC if (exists("uif", envir = .ret)) { .ini <- as.data.frame(.ret$uif$ini)[!is.na(.ret$uif$ini$err), c("est", "err", "ntheta")] for (.i in seq_along(.ini$err)) { if (is.na(.ret$scaleC[.ini$ntheta[.i]])) { if (any(.ini$err[.i] == c("boxCox", "yeoJohnson", "pow2", "tbs", "tbsYj"))) { .ret$scaleC[.ini$ntheta[.i]] <- 1 } else if (any(.ini$err[.i] == c("prop", "add", "norm", "dnorm", "logn", "dlogn", "lnorm", "dlnorm"))) { .ret$scaleC[.ini$ntheta[.i]] <- 0.5 * abs(.ini$est[.i]) } } } for (.i in .ini$model$extraProps$powTheta) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- 1 } .ini <- as.data.frame(.ret$uif$ini) for (.i in .ini$model$extraProps$factorial) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i] + 1)) } for (.i in .ini$model$extraProps$gamma) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i])) } for (.i in .ini$model$extraProps$log) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- log(abs(.ini$est[.i])) * abs(.ini$est[.i]) } for (.i in .ret$logitThetas) { .b <- .ret$logitThetasLow[.i] .c <- .ret$logitThetasHi[.i] .a <- .ini$est[.i] if (is.na(.ret$scaleC[.i])) { .ret$scaleC[.i] <- 1 * (-.b + .c) * exp(-.a)/((1 + exp(-.a))^2 * (.b + 1 * (-.b + .c)/(1 + exp(-.a)))) } } } names(.ret$thetaIni) <- sprintf("THETA[%d]", seq_along(.ret$thetaIni)) if (is.null(etaMat) & !is.null(control$etaMat)) { .ret$etaMat <- control$etaMat } else { .ret$etaMat <- etaMat } .ret$setupTime <- (proc.time() - .pt)["elapsed"] if (exists("uif", envir = .ret)) { .tmp <- .ret$uif$logThetasList .ret$logThetas <- .tmp[[1]] .ret$logThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasList .ret$logitThetas <- .tmp[[1]] .ret$logitThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListLow .ret$logitThetasLow <- .tmp[[1]] .ret$logitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListHi .ret$logitThetasHi <- .tmp[[1]] .ret$logitThetasHiF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasList .ret$probitThetas <- .tmp[[1]] .ret$probitThetasF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListLow .ret$probitThetasLow <- .tmp[[1]] .ret$probitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListHi .ret$probitThetasHi <- .tmp[[1]] .ret$probitThetasHiF <- .tmp[[2]] } else { .ret$logThetasF <- integer(0) .ret$logitThetasF <- integer(0) .ret$logitThetasHiF <- numeric(0) .ret$logitThetasLowF <- numeric(0) .ret$logitThetas <- integer(0) .ret$logitThetasHi <- numeric(0) .ret$logitThetasLow <- numeric(0) .ret$probitThetasF <- integer(0) .ret$probitThetasHiF <- numeric(0) .ret$probitThetasLowF <- numeric(0) .ret$probitThetas <- integer(0) .ret$probitThetasHi <- numeric(0) .ret$probitThetasLow <- numeric(0) } if (exists("noLik", envir = .ret)) { if (!.ret$noLik) { .ret$.params <- c(sprintf("THETA[%d]", seq_along(.ret$thetaIni)), sprintf("ETA[%d]", seq(1, dim(.om0)[1]))) .ret$.thetan <- length(.ret$thetaIni) .ret$nobs <- sum(data$EVID == 0) } } .ret$control$printTop <- TRUE .ret$control$nF <- 0 .est0 <- .ret$thetaIni if (!is.null(.ret$model$pred.nolhs)) { .ret$control$predNeq <- length(.ret$model$pred.nolhs$state) } else { .ret$control$predNeq <- 0L } .fitFun <- function(.ret) { this.env <- environment() assign("err", "theta reset", this.env) while (this.env$err == "theta reset") { assign("err", "", this.env) .ret0 <- tryCatch({ foceiFitCpp_(.ret) }, error = function(e) { if (regexpr("theta reset", e$message) != -1) { assign("zeroOuter", FALSE, this.env) assign("zeroGrad", FALSE, this.env) if (regexpr("theta reset0", e$message) != -1) { assign("zeroGrad", TRUE, this.env) } else if (regexpr("theta resetZ", e$message) != -1) { assign("zeroOuter", TRUE, this.env) } assign("err", "theta reset", this.env) } else { assign("err", e$message, this.env) } }) if (this.env$err == "theta reset") { .nm <- names(.ret$thetaIni) .ret$thetaIni <- setNames(.thetaReset$thetaIni + 0, .nm) .ret$rxInv$theta <- .thetaReset$omegaTheta .ret$control$printTop <- FALSE .ret$etaMat <- .thetaReset$etaMat .ret$control$etaMat <- .thetaReset$etaMat .ret$control$maxInnerIterations <- .thetaReset$maxInnerIterations .ret$control$nF <- .thetaReset$nF .ret$control$gillRetC <- .thetaReset$gillRetC .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillDf <- .thetaReset$gillDf .ret$control$gillDf2 <- .thetaReset$gillDf2 .ret$control$gillErr <- .thetaReset$gillErr .ret$control$rEps <- .thetaReset$rEps .ret$control$aEps <- .thetaReset$aEps .ret$control$rEpsC <- .thetaReset$rEpsC .ret$control$aEpsC <- .thetaReset$aEpsC .ret$control$c1 <- .thetaReset$c1 .ret$control$c2 <- .thetaReset$c2 if (this.env$zeroOuter) { message("Posthoc reset") .ret$control$maxOuterIterations <- 0L } else if (this.env$zeroGrad) { message("Theta reset (zero gradient values); Switch to bobyqa") RxODE::rxReq("minqa") .ret$control$outerOptFun <- .bobyqa .ret$control$outerOpt <- -1L } else { message("Theta reset (ETA drift)") } } } if (this.env$err != "") { stop(this.env$err) } else { return(.ret0) } } .ret0 <- try(.fitFun(.ret)) .n <- 1 while (inherits(.ret0, "try-error") && control$maxOuterIterations != 0 && .n <= control$nRetries) { message(sprintf("Restart %s", .n)) .ret$control$nF <- 0 .estNew <- .est0 + 0.2 * .n * abs(.est0) * stats::runif(length(.est0)) - 0.1 * .n .estNew <- sapply(seq_along(.est0), function(.i) { if (.ret$thetaFixed[.i]) { return(.est0[.i]) } else if (.estNew[.i] < lower[.i]) { return(lower + (.Machine$double.eps)^(1/7)) } else if (.estNew[.i] > upper[.i]) { return(upper - (.Machine$double.eps)^(1/7)) } else { return(.estNew[.i]) } }) .ret$thetaIni <- .estNew .ret0 <- try(.fitFun(.ret)) .n <- .n + 1 } if (inherits(.ret0, "try-error")) stop("Could not fit data.") .ret <- .ret0 if (exists("parHistData", .ret)) { .tmp <- .ret$parHistData .tmp <- .tmp[.tmp$type == "Unscaled", names(.tmp) != "type"] .iter <- .tmp$iter .tmp <- .tmp[, names(.tmp) != "iter"] .ret$parHistStacked <- data.frame(stack(.tmp), iter = .iter) names(.ret$parHistStacked) <- c("val", "par", "iter") .ret$parHist <- data.frame(iter = .iter, .tmp) } if (.mixed) { .etas <- .ret$ranef .thetas <- .ret$fixef .pars <- .Call(`_nlmixr_nlmixrParameters`, .thetas, .etas) .ret$shrink <- .Call(`_nlmixr_calcShrinkOnly`, .ret$omega, .pars$eta.lst, length(.etas$ID)) .updateParFixed(.ret) } else { .updateParFixed(.ret) } if (!exists("table", .ret)) { .ret$table <- tableControl() } if (control$calcTables) { .ret <- addTable(.ret, updateObject = "no", keep = keep, drop = drop, table = .ret$table) } .ret})(data = dat, inits = .FoceiInits, PKpars = .pars, model = .mod, pred = function() { return(nlmixr_pred) }, err = uif$error, lower = uif$focei.lower, upper = uif$focei.upper, fixed = uif$focei.fixed, thetaNames = uif$focei.names, etaNames = uif$eta.names, control = control, env = env, keep = .keep, drop = .drop): Not all the covariates are in the dataset.
f_nlmixr_dfop_sfo_focei_const <- nlmixr(f_mmkin_const["DFOP-SFO", ], est = "focei") +#> dosenum=dosenum();
#> Needed Covariates:
#> [1] "f_parent_to_A1" "CMT"
#> Error in (function (data, inits, PKpars, model = NULL, pred = NULL, err = NULL, lower = -Inf, upper = Inf, fixed = NULL, skipCov = NULL, control = foceiControl(), thetaNames = NULL, etaNames = NULL, etaMat = NULL, ..., env = NULL, keep = NULL, drop = NULL) { set.seed(control$seed) .pt <- proc.time() RxODE::.setWarnIdSort(FALSE) on.exit(RxODE::.setWarnIdSort(TRUE)) loadNamespace("n1qn1") if (!RxODE::rxIs(control, "foceiControl")) { control <- do.call(foceiControl, control) } if (is.null(env)) { .ret <- new.env(parent = emptyenv()) } else { .ret <- env } .ret$origData <- data .ret$etaNames <- etaNames .ret$thetaFixed <- fixed .ret$control <- control .ret$control$focei.mu.ref <- integer(0) if (is(model, "RxODE") || is(model, "character")) { .ret$ODEmodel <- TRUE if (class(pred) != "function") { stop("pred must be a function specifying the prediction variables in this model.") } } else { .ret$ODEmodel <- TRUE model <- RxODE::rxGetLin(PKpars) pred <- eval(parse(text = "function(){return(Central);}")) } .square <- function(x) x * x .ret$diagXformInv <- c(sqrt = ".square", log = "exp", identity = "identity")[control$diagXform] if (is.null(err)) { err <- eval(parse(text = paste0("function(){err", paste(inits$ERROR[[1]], collapse = ""), "}"))) } .covNames <- .parNames <- c() .ret$adjLik <- control$adjLik .mixed <- !is.null(inits$OMGA) && length(inits$OMGA) > 0 if (!exists("noLik", envir = .ret)) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ssAtol <- rep(control$ssAtol, length(RxODE::rxModelVars(model)$state)) .ssRtol <- rep(control$ssRtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = (control$derivMethod == 2L), pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, interaction = (control$interaction == 1L), only.numeric = !.mixed, run.internal = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol .ssAtol <- c(.ssAtol, rep(control$ssAtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssAtol))) .ssRtol <- c(.ssRtol, rep(control$ssRtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssRtol))) .ret$control$rxControl$ssAtol <- .ssAtol .ret$control$rxControl$ssRtol <- .ssRtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { if (.ret$noLik) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = FALSE, pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, run.internal = TRUE, only.numeric = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { .extraPars <- NULL } } .ret$skipCov <- skipCov if (is.null(skipCov)) { if (is.null(fixed)) { .tmp <- rep(FALSE, length(inits$THTA)) } else { if (length(fixed) < length(inits$THTA)) { .tmp <- c(fixed, rep(FALSE, length(inits$THTA) - length(fixed))) } else { .tmp <- fixed[1:length(inits$THTA)] } } if (exists("uif", envir = .ret)) { .uifErr <- .ret$uif$ini$err[!is.na(.ret$uif$ini$ntheta)] .uifErr <- sapply(.uifErr, function(x) { if (is.na(x)) { return(FALSE) } return(!any(x == c("pow2", "tbs", "tbsYj"))) }) .tmp <- (.tmp | .uifErr) } .ret$skipCov <- c(.tmp, rep(TRUE, length(.extraPars))) .ret$control$focei.mu.ref <- .ret$uif$focei.mu.ref } if (is.null(.extraPars)) { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA))) } else { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA)), sprintf("ERR[%s]", seq_along(.extraPars))) } if (!is.null(thetaNames) && (length(inits$THTA) + length(.extraPars)) == length(thetaNames)) { .nms <- thetaNames } .ret$thetaNames <- .nms .thetaReset$thetaNames <- .nms if (length(lower) == 1) { lower <- rep(lower, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { print(inits$THTA) print(lower) stop("Lower must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (length(upper) == 1) { upper <- rep(upper, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { stop("Upper must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (!is.null(.extraPars)) { .ret$model$extra.pars <- eval(call(control$diagXform, .ret$model$extra.pars)) if (length(.ret$model$extra.pars) > 0) { inits$THTA <- c(inits$THTA, .ret$model$extra.pars) .lowerErr <- rep(control$atol[1] * 10, length(.ret$model$extra.pars)) .upperErr <- rep(Inf, length(.ret$model$extra.pars)) lower <- c(lower, .lowerErr) upper <- c(upper, .upperErr) } } if (is.null(data$ID)) stop("\"ID\" not found in data") if (is.null(data$DV)) stop("\"DV\" not found in data") if (is.null(data$EVID)) data$EVID <- 0 if (is.null(data$AMT)) data$AMT <- 0 for (.v in c("TIME", "AMT", "DV", .covNames)) { data[[.v]] <- as.double(data[[.v]]) } .ret$dataSav <- data .ds <- data[data$EVID != 0 & data$EVID != 2, c("ID", "TIME", "AMT", "EVID", .covNames)] .w <- which(tolower(names(data)) == "limit") .limitName <- NULL if (length(.w) == 1L) { .limitName <- names(data)[.w] } .censName <- NULL .w <- which(tolower(names(data)) == "cens") if (length(.w) == 1L) { .censName <- names(data[.w]) } data <- data[data$EVID == 0 | data$EVID == 2, c("ID", "TIME", "DV", "EVID", .covNames, .limitName, .censName)] .w <- which(!(names(.ret$dataSav) %in% c(.covNames, keep))) names(.ret$dataSav)[.w] <- tolower(names(.ret$dataSav[.w])) if (.mixed) { .lh <- .parseOM(inits$OMGA) .nlh <- sapply(.lh, length) .osplt <- rep(1:length(.lh), .nlh) .lini <- list(inits$THTA, unlist(.lh)) .nlini <- sapply(.lini, length) .nsplt <- rep(1:length(.lini), .nlini) .om0 <- .genOM(.lh) if (length(etaNames) == dim(.om0)[1]) { .ret$etaNames <- .ret$etaNames } else { .ret$etaNames <- sprintf("ETA[%d]", seq(1, dim(.om0)[1])) } .ret$rxInv <- RxODE::rxSymInvCholCreate(mat = .om0, diag.xform = control$diagXform) .ret$xType <- .ret$rxInv$xType .om0a <- .om0 .om0a <- .om0a/control$diagOmegaBoundLower .om0b <- .om0 .om0b <- .om0b * control$diagOmegaBoundUpper .om0a <- RxODE::rxSymInvCholCreate(mat = .om0a, diag.xform = control$diagXform) .om0b <- RxODE::rxSymInvCholCreate(mat = .om0b, diag.xform = control$diagXform) .omdf <- data.frame(a = .om0a$theta, m = .ret$rxInv$theta, b = .om0b$theta, diag = .om0a$theta.diag) .omdf$lower <- with(.omdf, ifelse(a > b, b, a)) .omdf$lower <- with(.omdf, ifelse(lower == m, -Inf, lower)) .omdf$lower <- with(.omdf, ifelse(!diag, -Inf, lower)) .omdf$upper <- with(.omdf, ifelse(a < b, b, a)) .omdf$upper <- with(.omdf, ifelse(upper == m, Inf, upper)) .omdf$upper <- with(.omdf, ifelse(!diag, Inf, upper)) .ret$control$nomega <- length(.omdf$lower) .ret$control$neta <- sum(.omdf$diag) .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) lower <- c(lower, .omdf$lower) upper <- c(upper, .omdf$upper) } else { .ret$control$nomega <- 0 .ret$control$neta <- 0 .ret$xType <- -1 .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) } .ret$lower <- lower .ret$upper <- upper .ret$thetaIni <- inits$THTA .scaleC <- double(length(lower)) if (is.null(control$scaleC)) { .scaleC <- rep(NA_real_, length(lower)) } else { .scaleC <- as.double(control$scaleC) if (length(lower) > length(.scaleC)) { .scaleC <- c(.scaleC, rep(NA_real_, length(lower) - length(.scaleC))) } else if (length(lower) < length(.scaleC)) { .scaleC <- .scaleC[seq(1, length(lower))] warning("scaleC control option has more options than estimated population parameters, please check.") } } .ret$scaleC <- .scaleC if (exists("uif", envir = .ret)) { .ini <- as.data.frame(.ret$uif$ini)[!is.na(.ret$uif$ini$err), c("est", "err", "ntheta")] for (.i in seq_along(.ini$err)) { if (is.na(.ret$scaleC[.ini$ntheta[.i]])) { if (any(.ini$err[.i] == c("boxCox", "yeoJohnson", "pow2", "tbs", "tbsYj"))) { .ret$scaleC[.ini$ntheta[.i]] <- 1 } else if (any(.ini$err[.i] == c("prop", "add", "norm", "dnorm", "logn", "dlogn", "lnorm", "dlnorm"))) { .ret$scaleC[.ini$ntheta[.i]] <- 0.5 * abs(.ini$est[.i]) } } } for (.i in .ini$model$extraProps$powTheta) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- 1 } .ini <- as.data.frame(.ret$uif$ini) for (.i in .ini$model$extraProps$factorial) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i] + 1)) } for (.i in .ini$model$extraProps$gamma) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i])) } for (.i in .ini$model$extraProps$log) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- log(abs(.ini$est[.i])) * abs(.ini$est[.i]) } for (.i in .ret$logitThetas) { .b <- .ret$logitThetasLow[.i] .c <- .ret$logitThetasHi[.i] .a <- .ini$est[.i] if (is.na(.ret$scaleC[.i])) { .ret$scaleC[.i] <- 1 * (-.b + .c) * exp(-.a)/((1 + exp(-.a))^2 * (.b + 1 * (-.b + .c)/(1 + exp(-.a)))) } } } names(.ret$thetaIni) <- sprintf("THETA[%d]", seq_along(.ret$thetaIni)) if (is.null(etaMat) & !is.null(control$etaMat)) { .ret$etaMat <- control$etaMat } else { .ret$etaMat <- etaMat } .ret$setupTime <- (proc.time() - .pt)["elapsed"] if (exists("uif", envir = .ret)) { .tmp <- .ret$uif$logThetasList .ret$logThetas <- .tmp[[1]] .ret$logThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasList .ret$logitThetas <- .tmp[[1]] .ret$logitThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListLow .ret$logitThetasLow <- .tmp[[1]] .ret$logitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListHi .ret$logitThetasHi <- .tmp[[1]] .ret$logitThetasHiF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasList .ret$probitThetas <- .tmp[[1]] .ret$probitThetasF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListLow .ret$probitThetasLow <- .tmp[[1]] .ret$probitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListHi .ret$probitThetasHi <- .tmp[[1]] .ret$probitThetasHiF <- .tmp[[2]] } else { .ret$logThetasF <- integer(0) .ret$logitThetasF <- integer(0) .ret$logitThetasHiF <- numeric(0) .ret$logitThetasLowF <- numeric(0) .ret$logitThetas <- integer(0) .ret$logitThetasHi <- numeric(0) .ret$logitThetasLow <- numeric(0) .ret$probitThetasF <- integer(0) .ret$probitThetasHiF <- numeric(0) .ret$probitThetasLowF <- numeric(0) .ret$probitThetas <- integer(0) .ret$probitThetasHi <- numeric(0) .ret$probitThetasLow <- numeric(0) } if (exists("noLik", envir = .ret)) { if (!.ret$noLik) { .ret$.params <- c(sprintf("THETA[%d]", seq_along(.ret$thetaIni)), sprintf("ETA[%d]", seq(1, dim(.om0)[1]))) .ret$.thetan <- length(.ret$thetaIni) .ret$nobs <- sum(data$EVID == 0) } } .ret$control$printTop <- TRUE .ret$control$nF <- 0 .est0 <- .ret$thetaIni if (!is.null(.ret$model$pred.nolhs)) { .ret$control$predNeq <- length(.ret$model$pred.nolhs$state) } else { .ret$control$predNeq <- 0L } .fitFun <- function(.ret) { this.env <- environment() assign("err", "theta reset", this.env) while (this.env$err == "theta reset") { assign("err", "", this.env) .ret0 <- tryCatch({ foceiFitCpp_(.ret) }, error = function(e) { if (regexpr("theta reset", e$message) != -1) { assign("zeroOuter", FALSE, this.env) assign("zeroGrad", FALSE, this.env) if (regexpr("theta reset0", e$message) != -1) { assign("zeroGrad", TRUE, this.env) } else if (regexpr("theta resetZ", e$message) != -1) { assign("zeroOuter", TRUE, this.env) } assign("err", "theta reset", this.env) } else { assign("err", e$message, this.env) } }) if (this.env$err == "theta reset") { .nm <- names(.ret$thetaIni) .ret$thetaIni <- setNames(.thetaReset$thetaIni + 0, .nm) .ret$rxInv$theta <- .thetaReset$omegaTheta .ret$control$printTop <- FALSE .ret$etaMat <- .thetaReset$etaMat .ret$control$etaMat <- .thetaReset$etaMat .ret$control$maxInnerIterations <- .thetaReset$maxInnerIterations .ret$control$nF <- .thetaReset$nF .ret$control$gillRetC <- .thetaReset$gillRetC .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillDf <- .thetaReset$gillDf .ret$control$gillDf2 <- .thetaReset$gillDf2 .ret$control$gillErr <- .thetaReset$gillErr .ret$control$rEps <- .thetaReset$rEps .ret$control$aEps <- .thetaReset$aEps .ret$control$rEpsC <- .thetaReset$rEpsC .ret$control$aEpsC <- .thetaReset$aEpsC .ret$control$c1 <- .thetaReset$c1 .ret$control$c2 <- .thetaReset$c2 if (this.env$zeroOuter) { message("Posthoc reset") .ret$control$maxOuterIterations <- 0L } else if (this.env$zeroGrad) { message("Theta reset (zero gradient values); Switch to bobyqa") RxODE::rxReq("minqa") .ret$control$outerOptFun <- .bobyqa .ret$control$outerOpt <- -1L } else { message("Theta reset (ETA drift)") } } } if (this.env$err != "") { stop(this.env$err) } else { return(.ret0) } } .ret0 <- try(.fitFun(.ret)) .n <- 1 while (inherits(.ret0, "try-error") && control$maxOuterIterations != 0 && .n <= control$nRetries) { message(sprintf("Restart %s", .n)) .ret$control$nF <- 0 .estNew <- .est0 + 0.2 * .n * abs(.est0) * stats::runif(length(.est0)) - 0.1 * .n .estNew <- sapply(seq_along(.est0), function(.i) { if (.ret$thetaFixed[.i]) { return(.est0[.i]) } else if (.estNew[.i] < lower[.i]) { return(lower + (.Machine$double.eps)^(1/7)) } else if (.estNew[.i] > upper[.i]) { return(upper - (.Machine$double.eps)^(1/7)) } else { return(.estNew[.i]) } }) .ret$thetaIni <- .estNew .ret0 <- try(.fitFun(.ret)) .n <- .n + 1 } if (inherits(.ret0, "try-error")) stop("Could not fit data.") .ret <- .ret0 if (exists("parHistData", .ret)) { .tmp <- .ret$parHistData .tmp <- .tmp[.tmp$type == "Unscaled", names(.tmp) != "type"] .iter <- .tmp$iter .tmp <- .tmp[, names(.tmp) != "iter"] .ret$parHistStacked <- data.frame(stack(.tmp), iter = .iter) names(.ret$parHistStacked) <- c("val", "par", "iter") .ret$parHist <- data.frame(iter = .iter, .tmp) } if (.mixed) { .etas <- .ret$ranef .thetas <- .ret$fixef .pars <- .Call(`_nlmixr_nlmixrParameters`, .thetas, .etas) .ret$shrink <- .Call(`_nlmixr_calcShrinkOnly`, .ret$omega, .pars$eta.lst, length(.etas$ID)) .updateParFixed(.ret) } else { .updateParFixed(.ret) } if (!exists("table", .ret)) { .ret$table <- tableControl() } if (control$calcTables) { .ret <- addTable(.ret, updateObject = "no", keep = keep, drop = drop, table = .ret$table) } .ret})(data = dat, inits = .FoceiInits, PKpars = .pars, model = .mod, pred = function() { return(nlmixr_pred) }, err = uif$error, lower = uif$focei.lower, upper = uif$focei.upper, fixed = uif$focei.fixed, thetaNames = uif$focei.names, etaNames = uif$eta.names, control = control, env = env, keep = .keep, drop = .drop): Not all the covariates are in the dataset.
#> Timing stopped at: 6.93 0.367 7.293
f_nlmixr_dfop_sfo_focei_const <- nlmixr(f_mmkin_const["DFOP-SFO", ], est = "focei")
#> parameter labels from comments are typically ignored in non-interactive mode
#> Need to run with the source intact to parse comments
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → calculate jacobian
#>
#> → calculate sensitivities
#>
#> → calculate ∂(f)/∂(η)
#>
#> → calculate ∂(R²)/∂(η)
#>
#> → finding duplicate expressions in inner model...
#>
#> → optimizing duplicate expressions in inner model...
#>
#> → finding duplicate expressions in EBE model...
#>
#> → optimizing duplicate expressions in EBE model...
#>
#> → compiling inner model...
#>
#> done
#> → finding duplicate expressions in FD model...
#>
#> → optimizing duplicate expressions in FD model...
#>
#> → compiling EBE model...
#>
#> done
#> → compiling events FD model...
#>
#> done
#> Model:
#> cmt(parent); #> cmt(A1); #> rx_expr_6~ETA[1]+THETA[1]; @@ -4609,10 +515,10 @@ obtained by fitting the same model to a list of datasets using f_parent=1/(1+exp(-(ETA[3]+THETA[3]))); #> g=1/(rx_expr_20); #> tad=tad(); -#> dosenum=dosenum();
#> Error in (function (data, inits, PKpars, model = NULL, pred = NULL, err = NULL, lower = -Inf, upper = Inf, fixed = NULL, skipCov = NULL, control = foceiControl(), thetaNames = NULL, etaNames = NULL, etaMat = NULL, ..., env = NULL, keep = NULL, drop = NULL) { set.seed(control$seed) .pt <- proc.time() RxODE::.setWarnIdSort(FALSE) on.exit(RxODE::.setWarnIdSort(TRUE)) loadNamespace("n1qn1") if (!RxODE::rxIs(control, "foceiControl")) { control <- do.call(foceiControl, control) } if (is.null(env)) { .ret <- new.env(parent = emptyenv()) } else { .ret <- env } .ret$origData <- data .ret$etaNames <- etaNames .ret$thetaFixed <- fixed .ret$control <- control .ret$control$focei.mu.ref <- integer(0) if (is(model, "RxODE") || is(model, "character")) { .ret$ODEmodel <- TRUE if (class(pred) != "function") { stop("pred must be a function specifying the prediction variables in this model.") } } else { .ret$ODEmodel <- TRUE model <- RxODE::rxGetLin(PKpars) pred <- eval(parse(text = "function(){return(Central);}")) } .square <- function(x) x * x .ret$diagXformInv <- c(sqrt = ".square", log = "exp", identity = "identity")[control$diagXform] if (is.null(err)) { err <- eval(parse(text = paste0("function(){err", paste(inits$ERROR[[1]], collapse = ""), "}"))) } .covNames <- .parNames <- c() .ret$adjLik <- control$adjLik .mixed <- !is.null(inits$OMGA) && length(inits$OMGA) > 0 if (!exists("noLik", envir = .ret)) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ssAtol <- rep(control$ssAtol, length(RxODE::rxModelVars(model)$state)) .ssRtol <- rep(control$ssRtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = (control$derivMethod == 2L), pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, interaction = (control$interaction == 1L), only.numeric = !.mixed, run.internal = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol .ssAtol <- c(.ssAtol, rep(control$ssAtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssAtol))) .ssRtol <- c(.ssRtol, rep(control$ssRtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssRtol))) .ret$control$rxControl$ssAtol <- .ssAtol .ret$control$rxControl$ssRtol <- .ssRtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { if (.ret$noLik) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = FALSE, pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, run.internal = TRUE, only.numeric = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { .extraPars <- NULL } } .ret$skipCov <- skipCov if (is.null(skipCov)) { if (is.null(fixed)) { .tmp <- rep(FALSE, length(inits$THTA)) } else { if (length(fixed) < length(inits$THTA)) { .tmp <- c(fixed, rep(FALSE, length(inits$THTA) - length(fixed))) } else { .tmp <- fixed[1:length(inits$THTA)] } } if (exists("uif", envir = .ret)) { .uifErr <- .ret$uif$ini$err[!is.na(.ret$uif$ini$ntheta)] .uifErr <- sapply(.uifErr, function(x) { if (is.na(x)) { return(FALSE) } return(!any(x == c("pow2", "tbs", "tbsYj"))) }) .tmp <- (.tmp | .uifErr) } .ret$skipCov <- c(.tmp, rep(TRUE, length(.extraPars))) .ret$control$focei.mu.ref <- .ret$uif$focei.mu.ref } if (is.null(.extraPars)) { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA))) } else { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA)), sprintf("ERR[%s]", seq_along(.extraPars))) } if (!is.null(thetaNames) && (length(inits$THTA) + length(.extraPars)) == length(thetaNames)) { .nms <- thetaNames } .ret$thetaNames <- .nms .thetaReset$thetaNames <- .nms if (length(lower) == 1) { lower <- rep(lower, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { print(inits$THTA) print(lower) stop("Lower must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (length(upper) == 1) { upper <- rep(upper, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { stop("Upper must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (!is.null(.extraPars)) { .ret$model$extra.pars <- eval(call(control$diagXform, .ret$model$extra.pars)) if (length(.ret$model$extra.pars) > 0) { inits$THTA <- c(inits$THTA, .ret$model$extra.pars) .lowerErr <- rep(control$atol[1] * 10, length(.ret$model$extra.pars)) .upperErr <- rep(Inf, length(.ret$model$extra.pars)) lower <- c(lower, .lowerErr) upper <- c(upper, .upperErr) } } if (is.null(data$ID)) stop("\"ID\" not found in data") if (is.null(data$DV)) stop("\"DV\" not found in data") if (is.null(data$EVID)) data$EVID <- 0 if (is.null(data$AMT)) data$AMT <- 0 for (.v in c("TIME", "AMT", "DV", .covNames)) { data[[.v]] <- as.double(data[[.v]]) } .ret$dataSav <- data .ds <- data[data$EVID != 0 & data$EVID != 2, c("ID", "TIME", "AMT", "EVID", .covNames)] .w <- which(tolower(names(data)) == "limit") .limitName <- NULL if (length(.w) == 1L) { .limitName <- names(data)[.w] } .censName <- NULL .w <- which(tolower(names(data)) == "cens") if (length(.w) == 1L) { .censName <- names(data[.w]) } data <- data[data$EVID == 0 | data$EVID == 2, c("ID", "TIME", "DV", "EVID", .covNames, .limitName, .censName)] .w <- which(!(names(.ret$dataSav) %in% c(.covNames, keep))) names(.ret$dataSav)[.w] <- tolower(names(.ret$dataSav[.w])) if (.mixed) { .lh <- .parseOM(inits$OMGA) .nlh <- sapply(.lh, length) .osplt <- rep(1:length(.lh), .nlh) .lini <- list(inits$THTA, unlist(.lh)) .nlini <- sapply(.lini, length) .nsplt <- rep(1:length(.lini), .nlini) .om0 <- .genOM(.lh) if (length(etaNames) == dim(.om0)[1]) { .ret$etaNames <- .ret$etaNames } else { .ret$etaNames <- sprintf("ETA[%d]", seq(1, dim(.om0)[1])) } .ret$rxInv <- RxODE::rxSymInvCholCreate(mat = .om0, diag.xform = control$diagXform) .ret$xType <- .ret$rxInv$xType .om0a <- .om0 .om0a <- .om0a/control$diagOmegaBoundLower .om0b <- .om0 .om0b <- .om0b * control$diagOmegaBoundUpper .om0a <- RxODE::rxSymInvCholCreate(mat = .om0a, diag.xform = control$diagXform) .om0b <- RxODE::rxSymInvCholCreate(mat = .om0b, diag.xform = control$diagXform) .omdf <- data.frame(a = .om0a$theta, m = .ret$rxInv$theta, b = .om0b$theta, diag = .om0a$theta.diag) .omdf$lower <- with(.omdf, ifelse(a > b, b, a)) .omdf$lower <- with(.omdf, ifelse(lower == m, -Inf, lower)) .omdf$lower <- with(.omdf, ifelse(!diag, -Inf, lower)) .omdf$upper <- with(.omdf, ifelse(a < b, b, a)) .omdf$upper <- with(.omdf, ifelse(upper == m, Inf, upper)) .omdf$upper <- with(.omdf, ifelse(!diag, Inf, upper)) .ret$control$nomega <- length(.omdf$lower) .ret$control$neta <- sum(.omdf$diag) .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) lower <- c(lower, .omdf$lower) upper <- c(upper, .omdf$upper) } else { .ret$control$nomega <- 0 .ret$control$neta <- 0 .ret$xType <- -1 .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) } .ret$lower <- lower .ret$upper <- upper .ret$thetaIni <- inits$THTA .scaleC <- double(length(lower)) if (is.null(control$scaleC)) { .scaleC <- rep(NA_real_, length(lower)) } else { .scaleC <- as.double(control$scaleC) if (length(lower) > length(.scaleC)) { .scaleC <- c(.scaleC, rep(NA_real_, length(lower) - length(.scaleC))) } else if (length(lower) < length(.scaleC)) { .scaleC <- .scaleC[seq(1, length(lower))] warning("scaleC control option has more options than estimated population parameters, please check.") } } .ret$scaleC <- .scaleC if (exists("uif", envir = .ret)) { .ini <- as.data.frame(.ret$uif$ini)[!is.na(.ret$uif$ini$err), c("est", "err", "ntheta")] for (.i in seq_along(.ini$err)) { if (is.na(.ret$scaleC[.ini$ntheta[.i]])) { if (any(.ini$err[.i] == c("boxCox", "yeoJohnson", "pow2", "tbs", "tbsYj"))) { .ret$scaleC[.ini$ntheta[.i]] <- 1 } else if (any(.ini$err[.i] == c("prop", "add", "norm", "dnorm", "logn", "dlogn", "lnorm", "dlnorm"))) { .ret$scaleC[.ini$ntheta[.i]] <- 0.5 * abs(.ini$est[.i]) } } } for (.i in .ini$model$extraProps$powTheta) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- 1 } .ini <- as.data.frame(.ret$uif$ini) for (.i in .ini$model$extraProps$factorial) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i] + 1)) } for (.i in .ini$model$extraProps$gamma) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i])) } for (.i in .ini$model$extraProps$log) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- log(abs(.ini$est[.i])) * abs(.ini$est[.i]) } for (.i in .ret$logitThetas) { .b <- .ret$logitThetasLow[.i] .c <- .ret$logitThetasHi[.i] .a <- .ini$est[.i] if (is.na(.ret$scaleC[.i])) { .ret$scaleC[.i] <- 1 * (-.b + .c) * exp(-.a)/((1 + exp(-.a))^2 * (.b + 1 * (-.b + .c)/(1 + exp(-.a)))) } } } names(.ret$thetaIni) <- sprintf("THETA[%d]", seq_along(.ret$thetaIni)) if (is.null(etaMat) & !is.null(control$etaMat)) { .ret$etaMat <- control$etaMat } else { .ret$etaMat <- etaMat } .ret$setupTime <- (proc.time() - .pt)["elapsed"] if (exists("uif", envir = .ret)) { .tmp <- .ret$uif$logThetasList .ret$logThetas <- .tmp[[1]] .ret$logThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasList .ret$logitThetas <- .tmp[[1]] .ret$logitThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListLow .ret$logitThetasLow <- .tmp[[1]] .ret$logitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListHi .ret$logitThetasHi <- .tmp[[1]] .ret$logitThetasHiF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasList .ret$probitThetas <- .tmp[[1]] .ret$probitThetasF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListLow .ret$probitThetasLow <- .tmp[[1]] .ret$probitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListHi .ret$probitThetasHi <- .tmp[[1]] .ret$probitThetasHiF <- .tmp[[2]] } else { .ret$logThetasF <- integer(0) .ret$logitThetasF <- integer(0) .ret$logitThetasHiF <- numeric(0) .ret$logitThetasLowF <- numeric(0) .ret$logitThetas <- integer(0) .ret$logitThetasHi <- numeric(0) .ret$logitThetasLow <- numeric(0) .ret$probitThetasF <- integer(0) .ret$probitThetasHiF <- numeric(0) .ret$probitThetasLowF <- numeric(0) .ret$probitThetas <- integer(0) .ret$probitThetasHi <- numeric(0) .ret$probitThetasLow <- numeric(0) } if (exists("noLik", envir = .ret)) { if (!.ret$noLik) { .ret$.params <- c(sprintf("THETA[%d]", seq_along(.ret$thetaIni)), sprintf("ETA[%d]", seq(1, dim(.om0)[1]))) .ret$.thetan <- length(.ret$thetaIni) .ret$nobs <- sum(data$EVID == 0) } } .ret$control$printTop <- TRUE .ret$control$nF <- 0 .est0 <- .ret$thetaIni if (!is.null(.ret$model$pred.nolhs)) { .ret$control$predNeq <- length(.ret$model$pred.nolhs$state) } else { .ret$control$predNeq <- 0L } .fitFun <- function(.ret) { this.env <- environment() assign("err", "theta reset", this.env) while (this.env$err == "theta reset") { assign("err", "", this.env) .ret0 <- tryCatch({ foceiFitCpp_(.ret) }, error = function(e) { if (regexpr("theta reset", e$message) != -1) { assign("zeroOuter", FALSE, this.env) assign("zeroGrad", FALSE, this.env) if (regexpr("theta reset0", e$message) != -1) { assign("zeroGrad", TRUE, this.env) } else if (regexpr("theta resetZ", e$message) != -1) { assign("zeroOuter", TRUE, this.env) } assign("err", "theta reset", this.env) } else { assign("err", e$message, this.env) } }) if (this.env$err == "theta reset") { .nm <- names(.ret$thetaIni) .ret$thetaIni <- setNames(.thetaReset$thetaIni + 0, .nm) .ret$rxInv$theta <- .thetaReset$omegaTheta .ret$control$printTop <- FALSE .ret$etaMat <- .thetaReset$etaMat .ret$control$etaMat <- .thetaReset$etaMat .ret$control$maxInnerIterations <- .thetaReset$maxInnerIterations .ret$control$nF <- .thetaReset$nF .ret$control$gillRetC <- .thetaReset$gillRetC .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillDf <- .thetaReset$gillDf .ret$control$gillDf2 <- .thetaReset$gillDf2 .ret$control$gillErr <- .thetaReset$gillErr .ret$control$rEps <- .thetaReset$rEps .ret$control$aEps <- .thetaReset$aEps .ret$control$rEpsC <- .thetaReset$rEpsC .ret$control$aEpsC <- .thetaReset$aEpsC .ret$control$c1 <- .thetaReset$c1 .ret$control$c2 <- .thetaReset$c2 if (this.env$zeroOuter) { message("Posthoc reset") .ret$control$maxOuterIterations <- 0L } else if (this.env$zeroGrad) { message("Theta reset (zero gradient values); Switch to bobyqa") RxODE::rxReq("minqa") .ret$control$outerOptFun <- .bobyqa .ret$control$outerOpt <- -1L } else { message("Theta reset (ETA drift)") } } } if (this.env$err != "") { stop(this.env$err) } else { return(.ret0) } } .ret0 <- try(.fitFun(.ret)) .n <- 1 while (inherits(.ret0, "try-error") && control$maxOuterIterations != 0 && .n <= control$nRetries) { message(sprintf("Restart %s", .n)) .ret$control$nF <- 0 .estNew <- .est0 + 0.2 * .n * abs(.est0) * stats::runif(length(.est0)) - 0.1 * .n .estNew <- sapply(seq_along(.est0), function(.i) { if (.ret$thetaFixed[.i]) { return(.est0[.i]) } else if (.estNew[.i] < lower[.i]) { return(lower + (.Machine$double.eps)^(1/7)) } else if (.estNew[.i] > upper[.i]) { return(upper - (.Machine$double.eps)^(1/7)) } else { return(.estNew[.i]) } }) .ret$thetaIni <- .estNew .ret0 <- try(.fitFun(.ret)) .n <- .n + 1 } if (inherits(.ret0, "try-error")) stop("Could not fit data.") .ret <- .ret0 if (exists("parHistData", .ret)) { .tmp <- .ret$parHistData .tmp <- .tmp[.tmp$type == "Unscaled", names(.tmp) != "type"] .iter <- .tmp$iter .tmp <- .tmp[, names(.tmp) != "iter"] .ret$parHistStacked <- data.frame(stack(.tmp), iter = .iter) names(.ret$parHistStacked) <- c("val", "par", "iter") .ret$parHist <- data.frame(iter = .iter, .tmp) } if (.mixed) { .etas <- .ret$ranef .thetas <- .ret$fixef .pars <- .Call(`_nlmixr_nlmixrParameters`, .thetas, .etas) .ret$shrink <- .Call(`_nlmixr_calcShrinkOnly`, .ret$omega, .pars$eta.lst, length(.etas$ID)) .updateParFixed(.ret) } else { .updateParFixed(.ret) } if (!exists("table", .ret)) { .ret$table <- tableControl() } if (control$calcTables) { .ret <- addTable(.ret, updateObject = "no", keep = keep, drop = drop, table = .ret$table) } .ret})(data = dat, inits = .FoceiInits, PKpars = .pars, model = .mod, pred = function() { return(nlmixr_pred) }, err = uif$error, lower = uif$focei.lower, upper = uif$focei.upper, fixed = uif$focei.fixed, thetaNames = uif$focei.names, etaNames = uif$eta.names, control = control, env = env, keep = .keep, drop = .drop): Not all the covariates are in the dataset.
#> Error in (function (data, inits, PKpars, model = NULL, pred = NULL, err = NULL, lower = -Inf, upper = Inf, fixed = NULL, skipCov = NULL, control = foceiControl(), thetaNames = NULL, etaNames = NULL, etaMat = NULL, ..., env = NULL, keep = NULL, drop = NULL) { set.seed(control$seed) .pt <- proc.time() RxODE::.setWarnIdSort(FALSE) on.exit(RxODE::.setWarnIdSort(TRUE)) loadNamespace("n1qn1") if (!RxODE::rxIs(control, "foceiControl")) { control <- do.call(foceiControl, control) } if (is.null(env)) { .ret <- new.env(parent = emptyenv()) } else { .ret <- env } .ret$origData <- data .ret$etaNames <- etaNames .ret$thetaFixed <- fixed .ret$control <- control .ret$control$focei.mu.ref <- integer(0) if (is(model, "RxODE") || is(model, "character")) { .ret$ODEmodel <- TRUE if (class(pred) != "function") { stop("pred must be a function specifying the prediction variables in this model.") } } else { .ret$ODEmodel <- TRUE model <- RxODE::rxGetLin(PKpars) pred <- eval(parse(text = "function(){return(Central);}")) } .square <- function(x) x * x .ret$diagXformInv <- c(sqrt = ".square", log = "exp", identity = "identity")[control$diagXform] if (is.null(err)) { err <- eval(parse(text = paste0("function(){err", paste(inits$ERROR[[1]], collapse = ""), "}"))) } .covNames <- .parNames <- c() .ret$adjLik <- control$adjLik .mixed <- !is.null(inits$OMGA) && length(inits$OMGA) > 0 if (!exists("noLik", envir = .ret)) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ssAtol <- rep(control$ssAtol, length(RxODE::rxModelVars(model)$state)) .ssRtol <- rep(control$ssRtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = (control$derivMethod == 2L), pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, interaction = (control$interaction == 1L), only.numeric = !.mixed, run.internal = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol .ssAtol <- c(.ssAtol, rep(control$ssAtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssAtol))) .ssRtol <- c(.ssRtol, rep(control$ssRtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssRtol))) .ret$control$rxControl$ssAtol <- .ssAtol .ret$control$rxControl$ssRtol <- .ssRtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { if (.ret$noLik) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = FALSE, pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, run.internal = TRUE, only.numeric = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { .extraPars <- NULL } } .ret$skipCov <- skipCov if (is.null(skipCov)) { if (is.null(fixed)) { .tmp <- rep(FALSE, length(inits$THTA)) } else { if (length(fixed) < length(inits$THTA)) { .tmp <- c(fixed, rep(FALSE, length(inits$THTA) - length(fixed))) } else { .tmp <- fixed[1:length(inits$THTA)] } } if (exists("uif", envir = .ret)) { .uifErr <- .ret$uif$ini$err[!is.na(.ret$uif$ini$ntheta)] .uifErr <- sapply(.uifErr, function(x) { if (is.na(x)) { return(FALSE) } return(!any(x == c("pow2", "tbs", "tbsYj"))) }) .tmp <- (.tmp | .uifErr) } .ret$skipCov <- c(.tmp, rep(TRUE, length(.extraPars))) .ret$control$focei.mu.ref <- .ret$uif$focei.mu.ref } if (is.null(.extraPars)) { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA))) } else { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA)), sprintf("ERR[%s]", seq_along(.extraPars))) } if (!is.null(thetaNames) && (length(inits$THTA) + length(.extraPars)) == length(thetaNames)) { .nms <- thetaNames } .ret$thetaNames <- .nms .thetaReset$thetaNames <- .nms if (length(lower) == 1) { lower <- rep(lower, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { print(inits$THTA) print(lower) stop("Lower must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (length(upper) == 1) { upper <- rep(upper, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { stop("Upper must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (!is.null(.extraPars)) { .ret$model$extra.pars <- eval(call(control$diagXform, .ret$model$extra.pars)) if (length(.ret$model$extra.pars) > 0) { inits$THTA <- c(inits$THTA, .ret$model$extra.pars) .lowerErr <- rep(control$atol[1] * 10, length(.ret$model$extra.pars)) .upperErr <- rep(Inf, length(.ret$model$extra.pars)) lower <- c(lower, .lowerErr) upper <- c(upper, .upperErr) } } if (is.null(data$ID)) stop("\"ID\" not found in data") if (is.null(data$DV)) stop("\"DV\" not found in data") if (is.null(data$EVID)) data$EVID <- 0 if (is.null(data$AMT)) data$AMT <- 0 for (.v in c("TIME", "AMT", "DV", .covNames)) { data[[.v]] <- as.double(data[[.v]]) } .ret$dataSav <- data .ds <- data[data$EVID != 0 & data$EVID != 2, c("ID", "TIME", "AMT", "EVID", .covNames)] .w <- which(tolower(names(data)) == "limit") .limitName <- NULL if (length(.w) == 1L) { .limitName <- names(data)[.w] } .censName <- NULL .w <- which(tolower(names(data)) == "cens") if (length(.w) == 1L) { .censName <- names(data[.w]) } data <- data[data$EVID == 0 | data$EVID == 2, c("ID", "TIME", "DV", "EVID", .covNames, .limitName, .censName)] .w <- which(!(names(.ret$dataSav) %in% c(.covNames, keep))) names(.ret$dataSav)[.w] <- tolower(names(.ret$dataSav[.w])) if (.mixed) { .lh <- .parseOM(inits$OMGA) .nlh <- sapply(.lh, length) .osplt <- rep(1:length(.lh), .nlh) .lini <- list(inits$THTA, unlist(.lh)) .nlini <- sapply(.lini, length) .nsplt <- rep(1:length(.lini), .nlini) .om0 <- .genOM(.lh) if (length(etaNames) == dim(.om0)[1]) { .ret$etaNames <- .ret$etaNames } else { .ret$etaNames <- sprintf("ETA[%d]", seq(1, dim(.om0)[1])) } .ret$rxInv <- RxODE::rxSymInvCholCreate(mat = .om0, diag.xform = control$diagXform) .ret$xType <- .ret$rxInv$xType .om0a <- .om0 .om0a <- .om0a/control$diagOmegaBoundLower .om0b <- .om0 .om0b <- .om0b * control$diagOmegaBoundUpper .om0a <- RxODE::rxSymInvCholCreate(mat = .om0a, diag.xform = control$diagXform) .om0b <- RxODE::rxSymInvCholCreate(mat = .om0b, diag.xform = control$diagXform) .omdf <- data.frame(a = .om0a$theta, m = .ret$rxInv$theta, b = .om0b$theta, diag = .om0a$theta.diag) .omdf$lower <- with(.omdf, ifelse(a > b, b, a)) .omdf$lower <- with(.omdf, ifelse(lower == m, -Inf, lower)) .omdf$lower <- with(.omdf, ifelse(!diag, -Inf, lower)) .omdf$upper <- with(.omdf, ifelse(a < b, b, a)) .omdf$upper <- with(.omdf, ifelse(upper == m, Inf, upper)) .omdf$upper <- with(.omdf, ifelse(!diag, Inf, upper)) .ret$control$nomega <- length(.omdf$lower) .ret$control$neta <- sum(.omdf$diag) .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) lower <- c(lower, .omdf$lower) upper <- c(upper, .omdf$upper) } else { .ret$control$nomega <- 0 .ret$control$neta <- 0 .ret$xType <- -1 .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) } .ret$lower <- lower .ret$upper <- upper .ret$thetaIni <- inits$THTA .scaleC <- double(length(lower)) if (is.null(control$scaleC)) { .scaleC <- rep(NA_real_, length(lower)) } else { .scaleC <- as.double(control$scaleC) if (length(lower) > length(.scaleC)) { .scaleC <- c(.scaleC, rep(NA_real_, length(lower) - length(.scaleC))) } else if (length(lower) < length(.scaleC)) { .scaleC <- .scaleC[seq(1, length(lower))] warning("scaleC control option has more options than estimated population parameters, please check.") } } .ret$scaleC <- .scaleC if (exists("uif", envir = .ret)) { .ini <- as.data.frame(.ret$uif$ini)[!is.na(.ret$uif$ini$err), c("est", "err", "ntheta")] for (.i in seq_along(.ini$err)) { if (is.na(.ret$scaleC[.ini$ntheta[.i]])) { if (any(.ini$err[.i] == c("boxCox", "yeoJohnson", "pow2", "tbs", "tbsYj"))) { .ret$scaleC[.ini$ntheta[.i]] <- 1 } else if (any(.ini$err[.i] == c("prop", "add", "norm", "dnorm", "logn", "dlogn", "lnorm", "dlnorm"))) { .ret$scaleC[.ini$ntheta[.i]] <- 0.5 * abs(.ini$est[.i]) } } } for (.i in .ini$model$extraProps$powTheta) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- 1 } .ini <- as.data.frame(.ret$uif$ini) for (.i in .ini$model$extraProps$factorial) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i] + 1)) } for (.i in .ini$model$extraProps$gamma) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i])) } for (.i in .ini$model$extraProps$log) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- log(abs(.ini$est[.i])) * abs(.ini$est[.i]) } for (.i in .ret$logitThetas) { .b <- .ret$logitThetasLow[.i] .c <- .ret$logitThetasHi[.i] .a <- .ini$est[.i] if (is.na(.ret$scaleC[.i])) { .ret$scaleC[.i] <- 1 * (-.b + .c) * exp(-.a)/((1 + exp(-.a))^2 * (.b + 1 * (-.b + .c)/(1 + exp(-.a)))) } } } names(.ret$thetaIni) <- sprintf("THETA[%d]", seq_along(.ret$thetaIni)) if (is.null(etaMat) & !is.null(control$etaMat)) { .ret$etaMat <- control$etaMat } else { .ret$etaMat <- etaMat } .ret$setupTime <- (proc.time() - .pt)["elapsed"] if (exists("uif", envir = .ret)) { .tmp <- .ret$uif$logThetasList .ret$logThetas <- .tmp[[1]] .ret$logThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasList .ret$logitThetas <- .tmp[[1]] .ret$logitThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListLow .ret$logitThetasLow <- .tmp[[1]] .ret$logitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListHi .ret$logitThetasHi <- .tmp[[1]] .ret$logitThetasHiF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasList .ret$probitThetas <- .tmp[[1]] .ret$probitThetasF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListLow .ret$probitThetasLow <- .tmp[[1]] .ret$probitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListHi .ret$probitThetasHi <- .tmp[[1]] .ret$probitThetasHiF <- .tmp[[2]] } else { .ret$logThetasF <- integer(0) .ret$logitThetasF <- integer(0) .ret$logitThetasHiF <- numeric(0) .ret$logitThetasLowF <- numeric(0) .ret$logitThetas <- integer(0) .ret$logitThetasHi <- numeric(0) .ret$logitThetasLow <- numeric(0) .ret$probitThetasF <- integer(0) .ret$probitThetasHiF <- numeric(0) .ret$probitThetasLowF <- numeric(0) .ret$probitThetas <- integer(0) .ret$probitThetasHi <- numeric(0) .ret$probitThetasLow <- numeric(0) } if (exists("noLik", envir = .ret)) { if (!.ret$noLik) { .ret$.params <- c(sprintf("THETA[%d]", seq_along(.ret$thetaIni)), sprintf("ETA[%d]", seq(1, dim(.om0)[1]))) .ret$.thetan <- length(.ret$thetaIni) .ret$nobs <- sum(data$EVID == 0) } } .ret$control$printTop <- TRUE .ret$control$nF <- 0 .est0 <- .ret$thetaIni if (!is.null(.ret$model$pred.nolhs)) { .ret$control$predNeq <- length(.ret$model$pred.nolhs$state) } else { .ret$control$predNeq <- 0L } .fitFun <- function(.ret) { this.env <- environment() assign("err", "theta reset", this.env) while (this.env$err == "theta reset") { assign("err", "", this.env) .ret0 <- tryCatch({ foceiFitCpp_(.ret) }, error = function(e) { if (regexpr("theta reset", e$message) != -1) { assign("zeroOuter", FALSE, this.env) assign("zeroGrad", FALSE, this.env) if (regexpr("theta reset0", e$message) != -1) { assign("zeroGrad", TRUE, this.env) } else if (regexpr("theta resetZ", e$message) != -1) { assign("zeroOuter", TRUE, this.env) } assign("err", "theta reset", this.env) } else { assign("err", e$message, this.env) } }) if (this.env$err == "theta reset") { .nm <- names(.ret$thetaIni) .ret$thetaIni <- setNames(.thetaReset$thetaIni + 0, .nm) .ret$rxInv$theta <- .thetaReset$omegaTheta .ret$control$printTop <- FALSE .ret$etaMat <- .thetaReset$etaMat .ret$control$etaMat <- .thetaReset$etaMat .ret$control$maxInnerIterations <- .thetaReset$maxInnerIterations .ret$control$nF <- .thetaReset$nF .ret$control$gillRetC <- .thetaReset$gillRetC .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillDf <- .thetaReset$gillDf .ret$control$gillDf2 <- .thetaReset$gillDf2 .ret$control$gillErr <- .thetaReset$gillErr .ret$control$rEps <- .thetaReset$rEps .ret$control$aEps <- .thetaReset$aEps .ret$control$rEpsC <- .thetaReset$rEpsC .ret$control$aEpsC <- .thetaReset$aEpsC .ret$control$c1 <- .thetaReset$c1 .ret$control$c2 <- .thetaReset$c2 if (this.env$zeroOuter) { message("Posthoc reset") .ret$control$maxOuterIterations <- 0L } else if (this.env$zeroGrad) { message("Theta reset (zero gradient values); Switch to bobyqa") RxODE::rxReq("minqa") .ret$control$outerOptFun <- .bobyqa .ret$control$outerOpt <- -1L } else { message("Theta reset (ETA drift)") } } } if (this.env$err != "") { stop(this.env$err) } else { return(.ret0) } } .ret0 <- try(.fitFun(.ret)) .n <- 1 while (inherits(.ret0, "try-error") && control$maxOuterIterations != 0 && .n <= control$nRetries) { message(sprintf("Restart %s", .n)) .ret$control$nF <- 0 .estNew <- .est0 + 0.2 * .n * abs(.est0) * stats::runif(length(.est0)) - 0.1 * .n .estNew <- sapply(seq_along(.est0), function(.i) { if (.ret$thetaFixed[.i]) { return(.est0[.i]) } else if (.estNew[.i] < lower[.i]) { return(lower + (.Machine$double.eps)^(1/7)) } else if (.estNew[.i] > upper[.i]) { return(upper - (.Machine$double.eps)^(1/7)) } else { return(.estNew[.i]) } }) .ret$thetaIni <- .estNew .ret0 <- try(.fitFun(.ret)) .n <- .n + 1 } if (inherits(.ret0, "try-error")) stop("Could not fit data.") .ret <- .ret0 if (exists("parHistData", .ret)) { .tmp <- .ret$parHistData .tmp <- .tmp[.tmp$type == "Unscaled", names(.tmp) != "type"] .iter <- .tmp$iter .tmp <- .tmp[, names(.tmp) != "iter"] .ret$parHistStacked <- data.frame(stack(.tmp), iter = .iter) names(.ret$parHistStacked) <- c("val", "par", "iter") .ret$parHist <- data.frame(iter = .iter, .tmp) } if (.mixed) { .etas <- .ret$ranef .thetas <- .ret$fixef .pars <- .Call(`_nlmixr_nlmixrParameters`, .thetas, .etas) .ret$shrink <- .Call(`_nlmixr_calcShrinkOnly`, .ret$omega, .pars$eta.lst, length(.etas$ID)) .updateParFixed(.ret) } else { .updateParFixed(.ret) } if (!exists("table", .ret)) { .ret$table <- tableControl() } if (control$calcTables) { .ret <- addTable(.ret, updateObject = "no", keep = keep, drop = drop, table = .ret$table) } .ret})(data = dat, inits = .FoceiInits, PKpars = .pars, model = .mod, pred = function() { return(nlmixr_pred) }, err = uif$error, lower = uif$focei.lower, upper = uif$focei.upper, fixed = uif$focei.fixed, thetaNames = uif$focei.names, etaNames = uif$eta.names, control = control, env = env, keep = .keep, drop = .drop): Not all the covariates are in the dataset.
#> parameter labels from comments are typically ignored in non-interactive mode
#> Need to run with the source intact to parse comments
#>
#> → generate SAEM model
#> done
#> Error in configsaem(model = model, data = dat, inits = inits, mcmc = .mcmc, ODEopt = .ODEopt, seed = .seed, distribution = .dist, DEBUG = .DEBUG, addProp = .addProp, tol = .tol, itmax = .itmax, type = .type, powRange = .powRange, lambdaRange = .lambdaRange): covariate(s) not found: f_parent_to_A1
#> Timing stopped at: 1.271 0.123 1.393
f_nlmixr_fomc_sfo_focei_obs <- nlmixr(f_mmkin_obs["FOMC-SFO", ], est = "focei") +
#> parameter labels from comments are typically ignored in non-interactive mode
#> Need to run with the source intact to parse comments
#>
#> → generate SAEM model
#> done
#> Error in configsaem(model = model, data = dat, inits = inits, mcmc = .mcmc, ODEopt = .ODEopt, seed = .seed, distribution = .dist, DEBUG = .DEBUG, addProp = .addProp, tol = .tol, itmax = .itmax, type = .type, powRange = .powRange, lambdaRange = .lambdaRange): covariate(s) not found: f_parent_to_A1
#> Timing stopped at: 1.288 0.09 1.379
f_nlmixr_fomc_sfo_focei_obs <- nlmixr(f_mmkin_obs["FOMC-SFO", ], est = "focei")
#> parameter labels from comments are typically ignored in non-interactive mode
#> Need to run with the source intact to parse comments
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → calculate jacobian
#>
#> → calculate sensitivities
#>
#> → calculate ∂(f)/∂(η)
#>
#> → calculate ∂(R²)/∂(η)
#>
#> → finding duplicate expressions in inner model...
#>
#> → optimizing duplicate expressions in inner model...
#>
#> → finding duplicate expressions in EBE model...
#>
#> → optimizing duplicate expressions in EBE model...
#>
#> → compiling inner model...
#>
#> done
#> → finding duplicate expressions in FD model...
#>
#> → optimizing duplicate expressions in FD model...
#>
#> → compiling EBE model...
#>
#> done
#> → compiling events FD model...
#>
#> done
#> Model:
#> cmt(parent); #> cmt(A1); #> rx_expr_6~ETA[1]+THETA[1]; @@ -4661,8 +567,8 @@ obtained by fitting the same model to a list of datasets using beta=exp(rx_expr_8); #> f_parent=1/(1+exp(-(ETA[3]+THETA[3]))); #> tad=tad(); -#> dosenum=dosenum();
#> Error in (function (data, inits, PKpars, model = NULL, pred = NULL, err = NULL, lower = -Inf, upper = Inf, fixed = NULL, skipCov = NULL, control = foceiControl(), thetaNames = NULL, etaNames = NULL, etaMat = NULL, ..., env = NULL, keep = NULL, drop = NULL) { set.seed(control$seed) .pt <- proc.time() RxODE::.setWarnIdSort(FALSE) on.exit(RxODE::.setWarnIdSort(TRUE)) loadNamespace("n1qn1") if (!RxODE::rxIs(control, "foceiControl")) { control <- do.call(foceiControl, control) } if (is.null(env)) { .ret <- new.env(parent = emptyenv()) } else { .ret <- env } .ret$origData <- data .ret$etaNames <- etaNames .ret$thetaFixed <- fixed .ret$control <- control .ret$control$focei.mu.ref <- integer(0) if (is(model, "RxODE") || is(model, "character")) { .ret$ODEmodel <- TRUE if (class(pred) != "function") { stop("pred must be a function specifying the prediction variables in this model.") } } else { .ret$ODEmodel <- TRUE model <- RxODE::rxGetLin(PKpars) pred <- eval(parse(text = "function(){return(Central);}")) } .square <- function(x) x * x .ret$diagXformInv <- c(sqrt = ".square", log = "exp", identity = "identity")[control$diagXform] if (is.null(err)) { err <- eval(parse(text = paste0("function(){err", paste(inits$ERROR[[1]], collapse = ""), "}"))) } .covNames <- .parNames <- c() .ret$adjLik <- control$adjLik .mixed <- !is.null(inits$OMGA) && length(inits$OMGA) > 0 if (!exists("noLik", envir = .ret)) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ssAtol <- rep(control$ssAtol, length(RxODE::rxModelVars(model)$state)) .ssRtol <- rep(control$ssRtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = (control$derivMethod == 2L), pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, interaction = (control$interaction == 1L), only.numeric = !.mixed, run.internal = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol .ssAtol <- c(.ssAtol, rep(control$ssAtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssAtol))) .ssRtol <- c(.ssRtol, rep(control$ssRtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssRtol))) .ret$control$rxControl$ssAtol <- .ssAtol .ret$control$rxControl$ssRtol <- .ssRtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { if (.ret$noLik) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = FALSE, pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, run.internal = TRUE, only.numeric = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { .extraPars <- NULL } } .ret$skipCov <- skipCov if (is.null(skipCov)) { if (is.null(fixed)) { .tmp <- rep(FALSE, length(inits$THTA)) } else { if (length(fixed) < length(inits$THTA)) { .tmp <- c(fixed, rep(FALSE, length(inits$THTA) - length(fixed))) } else { .tmp <- fixed[1:length(inits$THTA)] } } if (exists("uif", envir = .ret)) { .uifErr <- .ret$uif$ini$err[!is.na(.ret$uif$ini$ntheta)] .uifErr <- sapply(.uifErr, function(x) { if (is.na(x)) { return(FALSE) } return(!any(x == c("pow2", "tbs", "tbsYj"))) }) .tmp <- (.tmp | .uifErr) } .ret$skipCov <- c(.tmp, rep(TRUE, length(.extraPars))) .ret$control$focei.mu.ref <- .ret$uif$focei.mu.ref } if (is.null(.extraPars)) { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA))) } else { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA)), sprintf("ERR[%s]", seq_along(.extraPars))) } if (!is.null(thetaNames) && (length(inits$THTA) + length(.extraPars)) == length(thetaNames)) { .nms <- thetaNames } .ret$thetaNames <- .nms .thetaReset$thetaNames <- .nms if (length(lower) == 1) { lower <- rep(lower, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { print(inits$THTA) print(lower) stop("Lower must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (length(upper) == 1) { upper <- rep(upper, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { stop("Upper must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (!is.null(.extraPars)) { .ret$model$extra.pars <- eval(call(control$diagXform, .ret$model$extra.pars)) if (length(.ret$model$extra.pars) > 0) { inits$THTA <- c(inits$THTA, .ret$model$extra.pars) .lowerErr <- rep(control$atol[1] * 10, length(.ret$model$extra.pars)) .upperErr <- rep(Inf, length(.ret$model$extra.pars)) lower <- c(lower, .lowerErr) upper <- c(upper, .upperErr) } } if (is.null(data$ID)) stop("\"ID\" not found in data") if (is.null(data$DV)) stop("\"DV\" not found in data") if (is.null(data$EVID)) data$EVID <- 0 if (is.null(data$AMT)) data$AMT <- 0 for (.v in c("TIME", "AMT", "DV", .covNames)) { data[[.v]] <- as.double(data[[.v]]) } .ret$dataSav <- data .ds <- data[data$EVID != 0 & data$EVID != 2, c("ID", "TIME", "AMT", "EVID", .covNames)] .w <- which(tolower(names(data)) == "limit") .limitName <- NULL if (length(.w) == 1L) { .limitName <- names(data)[.w] } .censName <- NULL .w <- which(tolower(names(data)) == "cens") if (length(.w) == 1L) { .censName <- names(data[.w]) } data <- data[data$EVID == 0 | data$EVID == 2, c("ID", "TIME", "DV", "EVID", .covNames, .limitName, .censName)] .w <- which(!(names(.ret$dataSav) %in% c(.covNames, keep))) names(.ret$dataSav)[.w] <- tolower(names(.ret$dataSav[.w])) if (.mixed) { .lh <- .parseOM(inits$OMGA) .nlh <- sapply(.lh, length) .osplt <- rep(1:length(.lh), .nlh) .lini <- list(inits$THTA, unlist(.lh)) .nlini <- sapply(.lini, length) .nsplt <- rep(1:length(.lini), .nlini) .om0 <- .genOM(.lh) if (length(etaNames) == dim(.om0)[1]) { .ret$etaNames <- .ret$etaNames } else { .ret$etaNames <- sprintf("ETA[%d]", seq(1, dim(.om0)[1])) } .ret$rxInv <- RxODE::rxSymInvCholCreate(mat = .om0, diag.xform = control$diagXform) .ret$xType <- .ret$rxInv$xType .om0a <- .om0 .om0a <- .om0a/control$diagOmegaBoundLower .om0b <- .om0 .om0b <- .om0b * control$diagOmegaBoundUpper .om0a <- RxODE::rxSymInvCholCreate(mat = .om0a, diag.xform = control$diagXform) .om0b <- RxODE::rxSymInvCholCreate(mat = .om0b, diag.xform = control$diagXform) .omdf <- data.frame(a = .om0a$theta, m = .ret$rxInv$theta, b = .om0b$theta, diag = .om0a$theta.diag) .omdf$lower <- with(.omdf, ifelse(a > b, b, a)) .omdf$lower <- with(.omdf, ifelse(lower == m, -Inf, lower)) .omdf$lower <- with(.omdf, ifelse(!diag, -Inf, lower)) .omdf$upper <- with(.omdf, ifelse(a < b, b, a)) .omdf$upper <- with(.omdf, ifelse(upper == m, Inf, upper)) .omdf$upper <- with(.omdf, ifelse(!diag, Inf, upper)) .ret$control$nomega <- length(.omdf$lower) .ret$control$neta <- sum(.omdf$diag) .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) lower <- c(lower, .omdf$lower) upper <- c(upper, .omdf$upper) } else { .ret$control$nomega <- 0 .ret$control$neta <- 0 .ret$xType <- -1 .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) } .ret$lower <- lower .ret$upper <- upper .ret$thetaIni <- inits$THTA .scaleC <- double(length(lower)) if (is.null(control$scaleC)) { .scaleC <- rep(NA_real_, length(lower)) } else { .scaleC <- as.double(control$scaleC) if (length(lower) > length(.scaleC)) { .scaleC <- c(.scaleC, rep(NA_real_, length(lower) - length(.scaleC))) } else if (length(lower) < length(.scaleC)) { .scaleC <- .scaleC[seq(1, length(lower))] warning("scaleC control option has more options than estimated population parameters, please check.") } } .ret$scaleC <- .scaleC if (exists("uif", envir = .ret)) { .ini <- as.data.frame(.ret$uif$ini)[!is.na(.ret$uif$ini$err), c("est", "err", "ntheta")] for (.i in seq_along(.ini$err)) { if (is.na(.ret$scaleC[.ini$ntheta[.i]])) { if (any(.ini$err[.i] == c("boxCox", "yeoJohnson", "pow2", "tbs", "tbsYj"))) { .ret$scaleC[.ini$ntheta[.i]] <- 1 } else if (any(.ini$err[.i] == c("prop", "add", "norm", "dnorm", "logn", "dlogn", "lnorm", "dlnorm"))) { .ret$scaleC[.ini$ntheta[.i]] <- 0.5 * abs(.ini$est[.i]) } } } for (.i in .ini$model$extraProps$powTheta) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- 1 } .ini <- as.data.frame(.ret$uif$ini) for (.i in .ini$model$extraProps$factorial) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i] + 1)) } for (.i in .ini$model$extraProps$gamma) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i])) } for (.i in .ini$model$extraProps$log) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- log(abs(.ini$est[.i])) * abs(.ini$est[.i]) } for (.i in .ret$logitThetas) { .b <- .ret$logitThetasLow[.i] .c <- .ret$logitThetasHi[.i] .a <- .ini$est[.i] if (is.na(.ret$scaleC[.i])) { .ret$scaleC[.i] <- 1 * (-.b + .c) * exp(-.a)/((1 + exp(-.a))^2 * (.b + 1 * (-.b + .c)/(1 + exp(-.a)))) } } } names(.ret$thetaIni) <- sprintf("THETA[%d]", seq_along(.ret$thetaIni)) if (is.null(etaMat) & !is.null(control$etaMat)) { .ret$etaMat <- control$etaMat } else { .ret$etaMat <- etaMat } .ret$setupTime <- (proc.time() - .pt)["elapsed"] if (exists("uif", envir = .ret)) { .tmp <- .ret$uif$logThetasList .ret$logThetas <- .tmp[[1]] .ret$logThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasList .ret$logitThetas <- .tmp[[1]] .ret$logitThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListLow .ret$logitThetasLow <- .tmp[[1]] .ret$logitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListHi .ret$logitThetasHi <- .tmp[[1]] .ret$logitThetasHiF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasList .ret$probitThetas <- .tmp[[1]] .ret$probitThetasF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListLow .ret$probitThetasLow <- .tmp[[1]] .ret$probitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListHi .ret$probitThetasHi <- .tmp[[1]] .ret$probitThetasHiF <- .tmp[[2]] } else { .ret$logThetasF <- integer(0) .ret$logitThetasF <- integer(0) .ret$logitThetasHiF <- numeric(0) .ret$logitThetasLowF <- numeric(0) .ret$logitThetas <- integer(0) .ret$logitThetasHi <- numeric(0) .ret$logitThetasLow <- numeric(0) .ret$probitThetasF <- integer(0) .ret$probitThetasHiF <- numeric(0) .ret$probitThetasLowF <- numeric(0) .ret$probitThetas <- integer(0) .ret$probitThetasHi <- numeric(0) .ret$probitThetasLow <- numeric(0) } if (exists("noLik", envir = .ret)) { if (!.ret$noLik) { .ret$.params <- c(sprintf("THETA[%d]", seq_along(.ret$thetaIni)), sprintf("ETA[%d]", seq(1, dim(.om0)[1]))) .ret$.thetan <- length(.ret$thetaIni) .ret$nobs <- sum(data$EVID == 0) } } .ret$control$printTop <- TRUE .ret$control$nF <- 0 .est0 <- .ret$thetaIni if (!is.null(.ret$model$pred.nolhs)) { .ret$control$predNeq <- length(.ret$model$pred.nolhs$state) } else { .ret$control$predNeq <- 0L } .fitFun <- function(.ret) { this.env <- environment() assign("err", "theta reset", this.env) while (this.env$err == "theta reset") { assign("err", "", this.env) .ret0 <- tryCatch({ foceiFitCpp_(.ret) }, error = function(e) { if (regexpr("theta reset", e$message) != -1) { assign("zeroOuter", FALSE, this.env) assign("zeroGrad", FALSE, this.env) if (regexpr("theta reset0", e$message) != -1) { assign("zeroGrad", TRUE, this.env) } else if (regexpr("theta resetZ", e$message) != -1) { assign("zeroOuter", TRUE, this.env) } assign("err", "theta reset", this.env) } else { assign("err", e$message, this.env) } }) if (this.env$err == "theta reset") { .nm <- names(.ret$thetaIni) .ret$thetaIni <- setNames(.thetaReset$thetaIni + 0, .nm) .ret$rxInv$theta <- .thetaReset$omegaTheta .ret$control$printTop <- FALSE .ret$etaMat <- .thetaReset$etaMat .ret$control$etaMat <- .thetaReset$etaMat .ret$control$maxInnerIterations <- .thetaReset$maxInnerIterations .ret$control$nF <- .thetaReset$nF .ret$control$gillRetC <- .thetaReset$gillRetC .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillDf <- .thetaReset$gillDf .ret$control$gillDf2 <- .thetaReset$gillDf2 .ret$control$gillErr <- .thetaReset$gillErr .ret$control$rEps <- .thetaReset$rEps .ret$control$aEps <- .thetaReset$aEps .ret$control$rEpsC <- .thetaReset$rEpsC .ret$control$aEpsC <- .thetaReset$aEpsC .ret$control$c1 <- .thetaReset$c1 .ret$control$c2 <- .thetaReset$c2 if (this.env$zeroOuter) { message("Posthoc reset") .ret$control$maxOuterIterations <- 0L } else if (this.env$zeroGrad) { message("Theta reset (zero gradient values); Switch to bobyqa") RxODE::rxReq("minqa") .ret$control$outerOptFun <- .bobyqa .ret$control$outerOpt <- -1L } else { message("Theta reset (ETA drift)") } } } if (this.env$err != "") { stop(this.env$err) } else { return(.ret0) } } .ret0 <- try(.fitFun(.ret)) .n <- 1 while (inherits(.ret0, "try-error") && control$maxOuterIterations != 0 && .n <= control$nRetries) { message(sprintf("Restart %s", .n)) .ret$control$nF <- 0 .estNew <- .est0 + 0.2 * .n * abs(.est0) * stats::runif(length(.est0)) - 0.1 * .n .estNew <- sapply(seq_along(.est0), function(.i) { if (.ret$thetaFixed[.i]) { return(.est0[.i]) } else if (.estNew[.i] < lower[.i]) { return(lower + (.Machine$double.eps)^(1/7)) } else if (.estNew[.i] > upper[.i]) { return(upper - (.Machine$double.eps)^(1/7)) } else { return(.estNew[.i]) } }) .ret$thetaIni <- .estNew .ret0 <- try(.fitFun(.ret)) .n <- .n + 1 } if (inherits(.ret0, "try-error")) stop("Could not fit data.") .ret <- .ret0 if (exists("parHistData", .ret)) { .tmp <- .ret$parHistData .tmp <- .tmp[.tmp$type == "Unscaled", names(.tmp) != "type"] .iter <- .tmp$iter .tmp <- .tmp[, names(.tmp) != "iter"] .ret$parHistStacked <- data.frame(stack(.tmp), iter = .iter) names(.ret$parHistStacked) <- c("val", "par", "iter") .ret$parHist <- data.frame(iter = .iter, .tmp) } if (.mixed) { .etas <- .ret$ranef .thetas <- .ret$fixef .pars <- .Call(`_nlmixr_nlmixrParameters`, .thetas, .etas) .ret$shrink <- .Call(`_nlmixr_calcShrinkOnly`, .ret$omega, .pars$eta.lst, length(.etas$ID)) .updateParFixed(.ret) } else { .updateParFixed(.ret) } if (!exists("table", .ret)) { .ret$table <- tableControl() } if (control$calcTables) { .ret <- addTable(.ret, updateObject = "no", keep = keep, drop = drop, table = .ret$table) } .ret})(data = dat, inits = .FoceiInits, PKpars = .pars, model = .mod, pred = function() { return(nlmixr_pred) }, err = uif$error, lower = uif$focei.lower, upper = uif$focei.upper, fixed = uif$focei.fixed, thetaNames = uif$focei.names, etaNames = uif$eta.names, control = control, env = env, keep = .keep, drop = .drop): Not all the covariates are in the dataset.
f_nlmixr_dfop_sfo_saem_obs <- nlmixr(f_mmkin_obs["DFOP-SFO", ], est = "saem") -
#> parameter labels from comments are typically ignored in non-interactive mode
#> Need to run with the source intact to parse comments
#>
#> → generate SAEM model
#> done
#> Error in configsaem(model = model, data = dat, inits = inits, mcmc = .mcmc, ODEopt = .ODEopt, seed = .seed, distribution = .dist, DEBUG = .DEBUG, addProp = .addProp, tol = .tol, itmax = .itmax, type = .type, powRange = .powRange, lambdaRange = .lambdaRange): covariate(s) not found: f_parent_to_A1
#> Timing stopped at: 1.384 0.092 1.477
f_nlmixr_dfop_sfo_focei_obs <- nlmixr(f_mmkin_obs["DFOP-SFO", ], est = "focei") +#> dosenum=dosenum();
#> Needed Covariates:
#> [1] "f_parent_to_A1" "CMT"
#> Error in (function (data, inits, PKpars, model = NULL, pred = NULL, err = NULL, lower = -Inf, upper = Inf, fixed = NULL, skipCov = NULL, control = foceiControl(), thetaNames = NULL, etaNames = NULL, etaMat = NULL, ..., env = NULL, keep = NULL, drop = NULL) { set.seed(control$seed) .pt <- proc.time() RxODE::.setWarnIdSort(FALSE) on.exit(RxODE::.setWarnIdSort(TRUE)) loadNamespace("n1qn1") if (!RxODE::rxIs(control, "foceiControl")) { control <- do.call(foceiControl, control) } if (is.null(env)) { .ret <- new.env(parent = emptyenv()) } else { .ret <- env } .ret$origData <- data .ret$etaNames <- etaNames .ret$thetaFixed <- fixed .ret$control <- control .ret$control$focei.mu.ref <- integer(0) if (is(model, "RxODE") || is(model, "character")) { .ret$ODEmodel <- TRUE if (class(pred) != "function") { stop("pred must be a function specifying the prediction variables in this model.") } } else { .ret$ODEmodel <- TRUE model <- RxODE::rxGetLin(PKpars) pred <- eval(parse(text = "function(){return(Central);}")) } .square <- function(x) x * x .ret$diagXformInv <- c(sqrt = ".square", log = "exp", identity = "identity")[control$diagXform] if (is.null(err)) { err <- eval(parse(text = paste0("function(){err", paste(inits$ERROR[[1]], collapse = ""), "}"))) } .covNames <- .parNames <- c() .ret$adjLik <- control$adjLik .mixed <- !is.null(inits$OMGA) && length(inits$OMGA) > 0 if (!exists("noLik", envir = .ret)) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ssAtol <- rep(control$ssAtol, length(RxODE::rxModelVars(model)$state)) .ssRtol <- rep(control$ssRtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = (control$derivMethod == 2L), pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, interaction = (control$interaction == 1L), only.numeric = !.mixed, run.internal = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol .ssAtol <- c(.ssAtol, rep(control$ssAtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssAtol))) .ssRtol <- c(.ssRtol, rep(control$ssRtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssRtol))) .ret$control$rxControl$ssAtol <- .ssAtol .ret$control$rxControl$ssRtol <- .ssRtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { if (.ret$noLik) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = FALSE, pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, run.internal = TRUE, only.numeric = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { .extraPars <- NULL } } .ret$skipCov <- skipCov if (is.null(skipCov)) { if (is.null(fixed)) { .tmp <- rep(FALSE, length(inits$THTA)) } else { if (length(fixed) < length(inits$THTA)) { .tmp <- c(fixed, rep(FALSE, length(inits$THTA) - length(fixed))) } else { .tmp <- fixed[1:length(inits$THTA)] } } if (exists("uif", envir = .ret)) { .uifErr <- .ret$uif$ini$err[!is.na(.ret$uif$ini$ntheta)] .uifErr <- sapply(.uifErr, function(x) { if (is.na(x)) { return(FALSE) } return(!any(x == c("pow2", "tbs", "tbsYj"))) }) .tmp <- (.tmp | .uifErr) } .ret$skipCov <- c(.tmp, rep(TRUE, length(.extraPars))) .ret$control$focei.mu.ref <- .ret$uif$focei.mu.ref } if (is.null(.extraPars)) { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA))) } else { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA)), sprintf("ERR[%s]", seq_along(.extraPars))) } if (!is.null(thetaNames) && (length(inits$THTA) + length(.extraPars)) == length(thetaNames)) { .nms <- thetaNames } .ret$thetaNames <- .nms .thetaReset$thetaNames <- .nms if (length(lower) == 1) { lower <- rep(lower, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { print(inits$THTA) print(lower) stop("Lower must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (length(upper) == 1) { upper <- rep(upper, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { stop("Upper must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (!is.null(.extraPars)) { .ret$model$extra.pars <- eval(call(control$diagXform, .ret$model$extra.pars)) if (length(.ret$model$extra.pars) > 0) { inits$THTA <- c(inits$THTA, .ret$model$extra.pars) .lowerErr <- rep(control$atol[1] * 10, length(.ret$model$extra.pars)) .upperErr <- rep(Inf, length(.ret$model$extra.pars)) lower <- c(lower, .lowerErr) upper <- c(upper, .upperErr) } } if (is.null(data$ID)) stop("\"ID\" not found in data") if (is.null(data$DV)) stop("\"DV\" not found in data") if (is.null(data$EVID)) data$EVID <- 0 if (is.null(data$AMT)) data$AMT <- 0 for (.v in c("TIME", "AMT", "DV", .covNames)) { data[[.v]] <- as.double(data[[.v]]) } .ret$dataSav <- data .ds <- data[data$EVID != 0 & data$EVID != 2, c("ID", "TIME", "AMT", "EVID", .covNames)] .w <- which(tolower(names(data)) == "limit") .limitName <- NULL if (length(.w) == 1L) { .limitName <- names(data)[.w] } .censName <- NULL .w <- which(tolower(names(data)) == "cens") if (length(.w) == 1L) { .censName <- names(data[.w]) } data <- data[data$EVID == 0 | data$EVID == 2, c("ID", "TIME", "DV", "EVID", .covNames, .limitName, .censName)] .w <- which(!(names(.ret$dataSav) %in% c(.covNames, keep))) names(.ret$dataSav)[.w] <- tolower(names(.ret$dataSav[.w])) if (.mixed) { .lh <- .parseOM(inits$OMGA) .nlh <- sapply(.lh, length) .osplt <- rep(1:length(.lh), .nlh) .lini <- list(inits$THTA, unlist(.lh)) .nlini <- sapply(.lini, length) .nsplt <- rep(1:length(.lini), .nlini) .om0 <- .genOM(.lh) if (length(etaNames) == dim(.om0)[1]) { .ret$etaNames <- .ret$etaNames } else { .ret$etaNames <- sprintf("ETA[%d]", seq(1, dim(.om0)[1])) } .ret$rxInv <- RxODE::rxSymInvCholCreate(mat = .om0, diag.xform = control$diagXform) .ret$xType <- .ret$rxInv$xType .om0a <- .om0 .om0a <- .om0a/control$diagOmegaBoundLower .om0b <- .om0 .om0b <- .om0b * control$diagOmegaBoundUpper .om0a <- RxODE::rxSymInvCholCreate(mat = .om0a, diag.xform = control$diagXform) .om0b <- RxODE::rxSymInvCholCreate(mat = .om0b, diag.xform = control$diagXform) .omdf <- data.frame(a = .om0a$theta, m = .ret$rxInv$theta, b = .om0b$theta, diag = .om0a$theta.diag) .omdf$lower <- with(.omdf, ifelse(a > b, b, a)) .omdf$lower <- with(.omdf, ifelse(lower == m, -Inf, lower)) .omdf$lower <- with(.omdf, ifelse(!diag, -Inf, lower)) .omdf$upper <- with(.omdf, ifelse(a < b, b, a)) .omdf$upper <- with(.omdf, ifelse(upper == m, Inf, upper)) .omdf$upper <- with(.omdf, ifelse(!diag, Inf, upper)) .ret$control$nomega <- length(.omdf$lower) .ret$control$neta <- sum(.omdf$diag) .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) lower <- c(lower, .omdf$lower) upper <- c(upper, .omdf$upper) } else { .ret$control$nomega <- 0 .ret$control$neta <- 0 .ret$xType <- -1 .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) } .ret$lower <- lower .ret$upper <- upper .ret$thetaIni <- inits$THTA .scaleC <- double(length(lower)) if (is.null(control$scaleC)) { .scaleC <- rep(NA_real_, length(lower)) } else { .scaleC <- as.double(control$scaleC) if (length(lower) > length(.scaleC)) { .scaleC <- c(.scaleC, rep(NA_real_, length(lower) - length(.scaleC))) } else if (length(lower) < length(.scaleC)) { .scaleC <- .scaleC[seq(1, length(lower))] warning("scaleC control option has more options than estimated population parameters, please check.") } } .ret$scaleC <- .scaleC if (exists("uif", envir = .ret)) { .ini <- as.data.frame(.ret$uif$ini)[!is.na(.ret$uif$ini$err), c("est", "err", "ntheta")] for (.i in seq_along(.ini$err)) { if (is.na(.ret$scaleC[.ini$ntheta[.i]])) { if (any(.ini$err[.i] == c("boxCox", "yeoJohnson", "pow2", "tbs", "tbsYj"))) { .ret$scaleC[.ini$ntheta[.i]] <- 1 } else if (any(.ini$err[.i] == c("prop", "add", "norm", "dnorm", "logn", "dlogn", "lnorm", "dlnorm"))) { .ret$scaleC[.ini$ntheta[.i]] <- 0.5 * abs(.ini$est[.i]) } } } for (.i in .ini$model$extraProps$powTheta) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- 1 } .ini <- as.data.frame(.ret$uif$ini) for (.i in .ini$model$extraProps$factorial) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i] + 1)) } for (.i in .ini$model$extraProps$gamma) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i])) } for (.i in .ini$model$extraProps$log) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- log(abs(.ini$est[.i])) * abs(.ini$est[.i]) } for (.i in .ret$logitThetas) { .b <- .ret$logitThetasLow[.i] .c <- .ret$logitThetasHi[.i] .a <- .ini$est[.i] if (is.na(.ret$scaleC[.i])) { .ret$scaleC[.i] <- 1 * (-.b + .c) * exp(-.a)/((1 + exp(-.a))^2 * (.b + 1 * (-.b + .c)/(1 + exp(-.a)))) } } } names(.ret$thetaIni) <- sprintf("THETA[%d]", seq_along(.ret$thetaIni)) if (is.null(etaMat) & !is.null(control$etaMat)) { .ret$etaMat <- control$etaMat } else { .ret$etaMat <- etaMat } .ret$setupTime <- (proc.time() - .pt)["elapsed"] if (exists("uif", envir = .ret)) { .tmp <- .ret$uif$logThetasList .ret$logThetas <- .tmp[[1]] .ret$logThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasList .ret$logitThetas <- .tmp[[1]] .ret$logitThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListLow .ret$logitThetasLow <- .tmp[[1]] .ret$logitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListHi .ret$logitThetasHi <- .tmp[[1]] .ret$logitThetasHiF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasList .ret$probitThetas <- .tmp[[1]] .ret$probitThetasF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListLow .ret$probitThetasLow <- .tmp[[1]] .ret$probitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListHi .ret$probitThetasHi <- .tmp[[1]] .ret$probitThetasHiF <- .tmp[[2]] } else { .ret$logThetasF <- integer(0) .ret$logitThetasF <- integer(0) .ret$logitThetasHiF <- numeric(0) .ret$logitThetasLowF <- numeric(0) .ret$logitThetas <- integer(0) .ret$logitThetasHi <- numeric(0) .ret$logitThetasLow <- numeric(0) .ret$probitThetasF <- integer(0) .ret$probitThetasHiF <- numeric(0) .ret$probitThetasLowF <- numeric(0) .ret$probitThetas <- integer(0) .ret$probitThetasHi <- numeric(0) .ret$probitThetasLow <- numeric(0) } if (exists("noLik", envir = .ret)) { if (!.ret$noLik) { .ret$.params <- c(sprintf("THETA[%d]", seq_along(.ret$thetaIni)), sprintf("ETA[%d]", seq(1, dim(.om0)[1]))) .ret$.thetan <- length(.ret$thetaIni) .ret$nobs <- sum(data$EVID == 0) } } .ret$control$printTop <- TRUE .ret$control$nF <- 0 .est0 <- .ret$thetaIni if (!is.null(.ret$model$pred.nolhs)) { .ret$control$predNeq <- length(.ret$model$pred.nolhs$state) } else { .ret$control$predNeq <- 0L } .fitFun <- function(.ret) { this.env <- environment() assign("err", "theta reset", this.env) while (this.env$err == "theta reset") { assign("err", "", this.env) .ret0 <- tryCatch({ foceiFitCpp_(.ret) }, error = function(e) { if (regexpr("theta reset", e$message) != -1) { assign("zeroOuter", FALSE, this.env) assign("zeroGrad", FALSE, this.env) if (regexpr("theta reset0", e$message) != -1) { assign("zeroGrad", TRUE, this.env) } else if (regexpr("theta resetZ", e$message) != -1) { assign("zeroOuter", TRUE, this.env) } assign("err", "theta reset", this.env) } else { assign("err", e$message, this.env) } }) if (this.env$err == "theta reset") { .nm <- names(.ret$thetaIni) .ret$thetaIni <- setNames(.thetaReset$thetaIni + 0, .nm) .ret$rxInv$theta <- .thetaReset$omegaTheta .ret$control$printTop <- FALSE .ret$etaMat <- .thetaReset$etaMat .ret$control$etaMat <- .thetaReset$etaMat .ret$control$maxInnerIterations <- .thetaReset$maxInnerIterations .ret$control$nF <- .thetaReset$nF .ret$control$gillRetC <- .thetaReset$gillRetC .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillDf <- .thetaReset$gillDf .ret$control$gillDf2 <- .thetaReset$gillDf2 .ret$control$gillErr <- .thetaReset$gillErr .ret$control$rEps <- .thetaReset$rEps .ret$control$aEps <- .thetaReset$aEps .ret$control$rEpsC <- .thetaReset$rEpsC .ret$control$aEpsC <- .thetaReset$aEpsC .ret$control$c1 <- .thetaReset$c1 .ret$control$c2 <- .thetaReset$c2 if (this.env$zeroOuter) { message("Posthoc reset") .ret$control$maxOuterIterations <- 0L } else if (this.env$zeroGrad) { message("Theta reset (zero gradient values); Switch to bobyqa") RxODE::rxReq("minqa") .ret$control$outerOptFun <- .bobyqa .ret$control$outerOpt <- -1L } else { message("Theta reset (ETA drift)") } } } if (this.env$err != "") { stop(this.env$err) } else { return(.ret0) } } .ret0 <- try(.fitFun(.ret)) .n <- 1 while (inherits(.ret0, "try-error") && control$maxOuterIterations != 0 && .n <= control$nRetries) { message(sprintf("Restart %s", .n)) .ret$control$nF <- 0 .estNew <- .est0 + 0.2 * .n * abs(.est0) * stats::runif(length(.est0)) - 0.1 * .n .estNew <- sapply(seq_along(.est0), function(.i) { if (.ret$thetaFixed[.i]) { return(.est0[.i]) } else if (.estNew[.i] < lower[.i]) { return(lower + (.Machine$double.eps)^(1/7)) } else if (.estNew[.i] > upper[.i]) { return(upper - (.Machine$double.eps)^(1/7)) } else { return(.estNew[.i]) } }) .ret$thetaIni <- .estNew .ret0 <- try(.fitFun(.ret)) .n <- .n + 1 } if (inherits(.ret0, "try-error")) stop("Could not fit data.") .ret <- .ret0 if (exists("parHistData", .ret)) { .tmp <- .ret$parHistData .tmp <- .tmp[.tmp$type == "Unscaled", names(.tmp) != "type"] .iter <- .tmp$iter .tmp <- .tmp[, names(.tmp) != "iter"] .ret$parHistStacked <- data.frame(stack(.tmp), iter = .iter) names(.ret$parHistStacked) <- c("val", "par", "iter") .ret$parHist <- data.frame(iter = .iter, .tmp) } if (.mixed) { .etas <- .ret$ranef .thetas <- .ret$fixef .pars <- .Call(`_nlmixr_nlmixrParameters`, .thetas, .etas) .ret$shrink <- .Call(`_nlmixr_calcShrinkOnly`, .ret$omega, .pars$eta.lst, length(.etas$ID)) .updateParFixed(.ret) } else { .updateParFixed(.ret) } if (!exists("table", .ret)) { .ret$table <- tableControl() } if (control$calcTables) { .ret <- addTable(.ret, updateObject = "no", keep = keep, drop = drop, table = .ret$table) } .ret})(data = dat, inits = .FoceiInits, PKpars = .pars, model = .mod, pred = function() { return(nlmixr_pred) }, err = uif$error, lower = uif$focei.lower, upper = uif$focei.upper, fixed = uif$focei.fixed, thetaNames = uif$focei.names, etaNames = uif$eta.names, control = control, env = env, keep = .keep, drop = .drop): Not all the covariates are in the dataset.
#> Timing stopped at: 6.666 0.38 7.044
f_nlmixr_dfop_sfo_saem_obs <- nlmixr(f_mmkin_obs["DFOP-SFO", ], est = "saem") +
#> parameter labels from comments are typically ignored in non-interactive mode
#> Need to run with the source intact to parse comments
#>
#> → generate SAEM model
#> done
#> Error in configsaem(model = model, data = dat, inits = inits, mcmc = .mcmc, ODEopt = .ODEopt, seed = .seed, distribution = .dist, DEBUG = .DEBUG, addProp = .addProp, tol = .tol, itmax = .itmax, type = .type, powRange = .powRange, lambdaRange = .lambdaRange): covariate(s) not found: f_parent_to_A1
#> Timing stopped at: 1.39 0.093 1.483
f_nlmixr_dfop_sfo_focei_obs <- nlmixr(f_mmkin_obs["DFOP-SFO", ], est = "focei")
#> parameter labels from comments are typically ignored in non-interactive mode
#> Need to run with the source intact to parse comments
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → calculate jacobian
#>
#> → calculate sensitivities
#>
#> → calculate ∂(f)/∂(η)
#>
#> → calculate ∂(R²)/∂(η)
#>
#> → finding duplicate expressions in inner model...
#>
#> → optimizing duplicate expressions in inner model...
#>
#> → finding duplicate expressions in EBE model...
#>
#> → optimizing duplicate expressions in EBE model...
#>
#> → compiling inner model...
#>
#> done
#> → finding duplicate expressions in FD model...
#>
#> → optimizing duplicate expressions in FD model...
#>
#> → compiling EBE model...
#>
#> done
#> → compiling events FD model...
#>
#> done
#> Model:
#> cmt(parent); #> cmt(A1); #> rx_expr_6~ETA[1]+THETA[1]; @@ -4719,7 +625,7 @@ obtained by fitting the same model to a list of datasets using f_parent=1/(1+exp(-(ETA[3]+THETA[3]))); #> g=1/(rx_expr_19); #> tad=tad(); -#> dosenum=dosenum();
#> Error in (function (data, inits, PKpars, model = NULL, pred = NULL, err = NULL, lower = -Inf, upper = Inf, fixed = NULL, skipCov = NULL, control = foceiControl(), thetaNames = NULL, etaNames = NULL, etaMat = NULL, ..., env = NULL, keep = NULL, drop = NULL) { set.seed(control$seed) .pt <- proc.time() RxODE::.setWarnIdSort(FALSE) on.exit(RxODE::.setWarnIdSort(TRUE)) loadNamespace("n1qn1") if (!RxODE::rxIs(control, "foceiControl")) { control <- do.call(foceiControl, control) } if (is.null(env)) { .ret <- new.env(parent = emptyenv()) } else { .ret <- env } .ret$origData <- data .ret$etaNames <- etaNames .ret$thetaFixed <- fixed .ret$control <- control .ret$control$focei.mu.ref <- integer(0) if (is(model, "RxODE") || is(model, "character")) { .ret$ODEmodel <- TRUE if (class(pred) != "function") { stop("pred must be a function specifying the prediction variables in this model.") } } else { .ret$ODEmodel <- TRUE model <- RxODE::rxGetLin(PKpars) pred <- eval(parse(text = "function(){return(Central);}")) } .square <- function(x) x * x .ret$diagXformInv <- c(sqrt = ".square", log = "exp", identity = "identity")[control$diagXform] if (is.null(err)) { err <- eval(parse(text = paste0("function(){err", paste(inits$ERROR[[1]], collapse = ""), "}"))) } .covNames <- .parNames <- c() .ret$adjLik <- control$adjLik .mixed <- !is.null(inits$OMGA) && length(inits$OMGA) > 0 if (!exists("noLik", envir = .ret)) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ssAtol <- rep(control$ssAtol, length(RxODE::rxModelVars(model)$state)) .ssRtol <- rep(control$ssRtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = (control$derivMethod == 2L), pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, interaction = (control$interaction == 1L), only.numeric = !.mixed, run.internal = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol .ssAtol <- c(.ssAtol, rep(control$ssAtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssAtol))) .ssRtol <- c(.ssRtol, rep(control$ssRtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssRtol))) .ret$control$rxControl$ssAtol <- .ssAtol .ret$control$rxControl$ssRtol <- .ssRtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { if (.ret$noLik) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = FALSE, pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, run.internal = TRUE, only.numeric = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { .extraPars <- NULL } } .ret$skipCov <- skipCov if (is.null(skipCov)) { if (is.null(fixed)) { .tmp <- rep(FALSE, length(inits$THTA)) } else { if (length(fixed) < length(inits$THTA)) { .tmp <- c(fixed, rep(FALSE, length(inits$THTA) - length(fixed))) } else { .tmp <- fixed[1:length(inits$THTA)] } } if (exists("uif", envir = .ret)) { .uifErr <- .ret$uif$ini$err[!is.na(.ret$uif$ini$ntheta)] .uifErr <- sapply(.uifErr, function(x) { if (is.na(x)) { return(FALSE) } return(!any(x == c("pow2", "tbs", "tbsYj"))) }) .tmp <- (.tmp | .uifErr) } .ret$skipCov <- c(.tmp, rep(TRUE, length(.extraPars))) .ret$control$focei.mu.ref <- .ret$uif$focei.mu.ref } if (is.null(.extraPars)) { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA))) } else { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA)), sprintf("ERR[%s]", seq_along(.extraPars))) } if (!is.null(thetaNames) && (length(inits$THTA) + length(.extraPars)) == length(thetaNames)) { .nms <- thetaNames } .ret$thetaNames <- .nms .thetaReset$thetaNames <- .nms if (length(lower) == 1) { lower <- rep(lower, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { print(inits$THTA) print(lower) stop("Lower must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (length(upper) == 1) { upper <- rep(upper, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { stop("Upper must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (!is.null(.extraPars)) { .ret$model$extra.pars <- eval(call(control$diagXform, .ret$model$extra.pars)) if (length(.ret$model$extra.pars) > 0) { inits$THTA <- c(inits$THTA, .ret$model$extra.pars) .lowerErr <- rep(control$atol[1] * 10, length(.ret$model$extra.pars)) .upperErr <- rep(Inf, length(.ret$model$extra.pars)) lower <- c(lower, .lowerErr) upper <- c(upper, .upperErr) } } if (is.null(data$ID)) stop("\"ID\" not found in data") if (is.null(data$DV)) stop("\"DV\" not found in data") if (is.null(data$EVID)) data$EVID <- 0 if (is.null(data$AMT)) data$AMT <- 0 for (.v in c("TIME", "AMT", "DV", .covNames)) { data[[.v]] <- as.double(data[[.v]]) } .ret$dataSav <- data .ds <- data[data$EVID != 0 & data$EVID != 2, c("ID", "TIME", "AMT", "EVID", .covNames)] .w <- which(tolower(names(data)) == "limit") .limitName <- NULL if (length(.w) == 1L) { .limitName <- names(data)[.w] } .censName <- NULL .w <- which(tolower(names(data)) == "cens") if (length(.w) == 1L) { .censName <- names(data[.w]) } data <- data[data$EVID == 0 | data$EVID == 2, c("ID", "TIME", "DV", "EVID", .covNames, .limitName, .censName)] .w <- which(!(names(.ret$dataSav) %in% c(.covNames, keep))) names(.ret$dataSav)[.w] <- tolower(names(.ret$dataSav[.w])) if (.mixed) { .lh <- .parseOM(inits$OMGA) .nlh <- sapply(.lh, length) .osplt <- rep(1:length(.lh), .nlh) .lini <- list(inits$THTA, unlist(.lh)) .nlini <- sapply(.lini, length) .nsplt <- rep(1:length(.lini), .nlini) .om0 <- .genOM(.lh) if (length(etaNames) == dim(.om0)[1]) { .ret$etaNames <- .ret$etaNames } else { .ret$etaNames <- sprintf("ETA[%d]", seq(1, dim(.om0)[1])) } .ret$rxInv <- RxODE::rxSymInvCholCreate(mat = .om0, diag.xform = control$diagXform) .ret$xType <- .ret$rxInv$xType .om0a <- .om0 .om0a <- .om0a/control$diagOmegaBoundLower .om0b <- .om0 .om0b <- .om0b * control$diagOmegaBoundUpper .om0a <- RxODE::rxSymInvCholCreate(mat = .om0a, diag.xform = control$diagXform) .om0b <- RxODE::rxSymInvCholCreate(mat = .om0b, diag.xform = control$diagXform) .omdf <- data.frame(a = .om0a$theta, m = .ret$rxInv$theta, b = .om0b$theta, diag = .om0a$theta.diag) .omdf$lower <- with(.omdf, ifelse(a > b, b, a)) .omdf$lower <- with(.omdf, ifelse(lower == m, -Inf, lower)) .omdf$lower <- with(.omdf, ifelse(!diag, -Inf, lower)) .omdf$upper <- with(.omdf, ifelse(a < b, b, a)) .omdf$upper <- with(.omdf, ifelse(upper == m, Inf, upper)) .omdf$upper <- with(.omdf, ifelse(!diag, Inf, upper)) .ret$control$nomega <- length(.omdf$lower) .ret$control$neta <- sum(.omdf$diag) .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) lower <- c(lower, .omdf$lower) upper <- c(upper, .omdf$upper) } else { .ret$control$nomega <- 0 .ret$control$neta <- 0 .ret$xType <- -1 .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) } .ret$lower <- lower .ret$upper <- upper .ret$thetaIni <- inits$THTA .scaleC <- double(length(lower)) if (is.null(control$scaleC)) { .scaleC <- rep(NA_real_, length(lower)) } else { .scaleC <- as.double(control$scaleC) if (length(lower) > length(.scaleC)) { .scaleC <- c(.scaleC, rep(NA_real_, length(lower) - length(.scaleC))) } else if (length(lower) < length(.scaleC)) { .scaleC <- .scaleC[seq(1, length(lower))] warning("scaleC control option has more options than estimated population parameters, please check.") } } .ret$scaleC <- .scaleC if (exists("uif", envir = .ret)) { .ini <- as.data.frame(.ret$uif$ini)[!is.na(.ret$uif$ini$err), c("est", "err", "ntheta")] for (.i in seq_along(.ini$err)) { if (is.na(.ret$scaleC[.ini$ntheta[.i]])) { if (any(.ini$err[.i] == c("boxCox", "yeoJohnson", "pow2", "tbs", "tbsYj"))) { .ret$scaleC[.ini$ntheta[.i]] <- 1 } else if (any(.ini$err[.i] == c("prop", "add", "norm", "dnorm", "logn", "dlogn", "lnorm", "dlnorm"))) { .ret$scaleC[.ini$ntheta[.i]] <- 0.5 * abs(.ini$est[.i]) } } } for (.i in .ini$model$extraProps$powTheta) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- 1 } .ini <- as.data.frame(.ret$uif$ini) for (.i in .ini$model$extraProps$factorial) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i] + 1)) } for (.i in .ini$model$extraProps$gamma) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i])) } for (.i in .ini$model$extraProps$log) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- log(abs(.ini$est[.i])) * abs(.ini$est[.i]) } for (.i in .ret$logitThetas) { .b <- .ret$logitThetasLow[.i] .c <- .ret$logitThetasHi[.i] .a <- .ini$est[.i] if (is.na(.ret$scaleC[.i])) { .ret$scaleC[.i] <- 1 * (-.b + .c) * exp(-.a)/((1 + exp(-.a))^2 * (.b + 1 * (-.b + .c)/(1 + exp(-.a)))) } } } names(.ret$thetaIni) <- sprintf("THETA[%d]", seq_along(.ret$thetaIni)) if (is.null(etaMat) & !is.null(control$etaMat)) { .ret$etaMat <- control$etaMat } else { .ret$etaMat <- etaMat } .ret$setupTime <- (proc.time() - .pt)["elapsed"] if (exists("uif", envir = .ret)) { .tmp <- .ret$uif$logThetasList .ret$logThetas <- .tmp[[1]] .ret$logThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasList .ret$logitThetas <- .tmp[[1]] .ret$logitThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListLow .ret$logitThetasLow <- .tmp[[1]] .ret$logitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListHi .ret$logitThetasHi <- .tmp[[1]] .ret$logitThetasHiF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasList .ret$probitThetas <- .tmp[[1]] .ret$probitThetasF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListLow .ret$probitThetasLow <- .tmp[[1]] .ret$probitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListHi .ret$probitThetasHi <- .tmp[[1]] .ret$probitThetasHiF <- .tmp[[2]] } else { .ret$logThetasF <- integer(0) .ret$logitThetasF <- integer(0) .ret$logitThetasHiF <- numeric(0) .ret$logitThetasLowF <- numeric(0) .ret$logitThetas <- integer(0) .ret$logitThetasHi <- numeric(0) .ret$logitThetasLow <- numeric(0) .ret$probitThetasF <- integer(0) .ret$probitThetasHiF <- numeric(0) .ret$probitThetasLowF <- numeric(0) .ret$probitThetas <- integer(0) .ret$probitThetasHi <- numeric(0) .ret$probitThetasLow <- numeric(0) } if (exists("noLik", envir = .ret)) { if (!.ret$noLik) { .ret$.params <- c(sprintf("THETA[%d]", seq_along(.ret$thetaIni)), sprintf("ETA[%d]", seq(1, dim(.om0)[1]))) .ret$.thetan <- length(.ret$thetaIni) .ret$nobs <- sum(data$EVID == 0) } } .ret$control$printTop <- TRUE .ret$control$nF <- 0 .est0 <- .ret$thetaIni if (!is.null(.ret$model$pred.nolhs)) { .ret$control$predNeq <- length(.ret$model$pred.nolhs$state) } else { .ret$control$predNeq <- 0L } .fitFun <- function(.ret) { this.env <- environment() assign("err", "theta reset", this.env) while (this.env$err == "theta reset") { assign("err", "", this.env) .ret0 <- tryCatch({ foceiFitCpp_(.ret) }, error = function(e) { if (regexpr("theta reset", e$message) != -1) { assign("zeroOuter", FALSE, this.env) assign("zeroGrad", FALSE, this.env) if (regexpr("theta reset0", e$message) != -1) { assign("zeroGrad", TRUE, this.env) } else if (regexpr("theta resetZ", e$message) != -1) { assign("zeroOuter", TRUE, this.env) } assign("err", "theta reset", this.env) } else { assign("err", e$message, this.env) } }) if (this.env$err == "theta reset") { .nm <- names(.ret$thetaIni) .ret$thetaIni <- setNames(.thetaReset$thetaIni + 0, .nm) .ret$rxInv$theta <- .thetaReset$omegaTheta .ret$control$printTop <- FALSE .ret$etaMat <- .thetaReset$etaMat .ret$control$etaMat <- .thetaReset$etaMat .ret$control$maxInnerIterations <- .thetaReset$maxInnerIterations .ret$control$nF <- .thetaReset$nF .ret$control$gillRetC <- .thetaReset$gillRetC .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillDf <- .thetaReset$gillDf .ret$control$gillDf2 <- .thetaReset$gillDf2 .ret$control$gillErr <- .thetaReset$gillErr .ret$control$rEps <- .thetaReset$rEps .ret$control$aEps <- .thetaReset$aEps .ret$control$rEpsC <- .thetaReset$rEpsC .ret$control$aEpsC <- .thetaReset$aEpsC .ret$control$c1 <- .thetaReset$c1 .ret$control$c2 <- .thetaReset$c2 if (this.env$zeroOuter) { message("Posthoc reset") .ret$control$maxOuterIterations <- 0L } else if (this.env$zeroGrad) { message("Theta reset (zero gradient values); Switch to bobyqa") RxODE::rxReq("minqa") .ret$control$outerOptFun <- .bobyqa .ret$control$outerOpt <- -1L } else { message("Theta reset (ETA drift)") } } } if (this.env$err != "") { stop(this.env$err) } else { return(.ret0) } } .ret0 <- try(.fitFun(.ret)) .n <- 1 while (inherits(.ret0, "try-error") && control$maxOuterIterations != 0 && .n <= control$nRetries) { message(sprintf("Restart %s", .n)) .ret$control$nF <- 0 .estNew <- .est0 + 0.2 * .n * abs(.est0) * stats::runif(length(.est0)) - 0.1 * .n .estNew <- sapply(seq_along(.est0), function(.i) { if (.ret$thetaFixed[.i]) { return(.est0[.i]) } else if (.estNew[.i] < lower[.i]) { return(lower + (.Machine$double.eps)^(1/7)) } else if (.estNew[.i] > upper[.i]) { return(upper - (.Machine$double.eps)^(1/7)) } else { return(.estNew[.i]) } }) .ret$thetaIni <- .estNew .ret0 <- try(.fitFun(.ret)) .n <- .n + 1 } if (inherits(.ret0, "try-error")) stop("Could not fit data.") .ret <- .ret0 if (exists("parHistData", .ret)) { .tmp <- .ret$parHistData .tmp <- .tmp[.tmp$type == "Unscaled", names(.tmp) != "type"] .iter <- .tmp$iter .tmp <- .tmp[, names(.tmp) != "iter"] .ret$parHistStacked <- data.frame(stack(.tmp), iter = .iter) names(.ret$parHistStacked) <- c("val", "par", "iter") .ret$parHist <- data.frame(iter = .iter, .tmp) } if (.mixed) { .etas <- .ret$ranef .thetas <- .ret$fixef .pars <- .Call(`_nlmixr_nlmixrParameters`, .thetas, .etas) .ret$shrink <- .Call(`_nlmixr_calcShrinkOnly`, .ret$omega, .pars$eta.lst, length(.etas$ID)) .updateParFixed(.ret) } else { .updateParFixed(.ret) } if (!exists("table", .ret)) { .ret$table <- tableControl() } if (control$calcTables) { .ret <- addTable(.ret, updateObject = "no", keep = keep, drop = drop, table = .ret$table) } .ret})(data = dat, inits = .FoceiInits, PKpars = .pars, model = .mod, pred = function() { return(nlmixr_pred) }, err = uif$error, lower = uif$focei.lower, upper = uif$focei.upper, fixed = uif$focei.fixed, thetaNames = uif$focei.names, etaNames = uif$eta.names, control = control, env = env, keep = .keep, drop = .drop): Not all the covariates are in the dataset.
#> Error in (function (data, inits, PKpars, model = NULL, pred = NULL, err = NULL, lower = -Inf, upper = Inf, fixed = NULL, skipCov = NULL, control = foceiControl(), thetaNames = NULL, etaNames = NULL, etaMat = NULL, ..., env = NULL, keep = NULL, drop = NULL) { set.seed(control$seed) .pt <- proc.time() RxODE::.setWarnIdSort(FALSE) on.exit(RxODE::.setWarnIdSort(TRUE)) loadNamespace("n1qn1") if (!RxODE::rxIs(control, "foceiControl")) { control <- do.call(foceiControl, control) } if (is.null(env)) { .ret <- new.env(parent = emptyenv()) } else { .ret <- env } .ret$origData <- data .ret$etaNames <- etaNames .ret$thetaFixed <- fixed .ret$control <- control .ret$control$focei.mu.ref <- integer(0) if (is(model, "RxODE") || is(model, "character")) { .ret$ODEmodel <- TRUE if (class(pred) != "function") { stop("pred must be a function specifying the prediction variables in this model.") } } else { .ret$ODEmodel <- TRUE model <- RxODE::rxGetLin(PKpars) pred <- eval(parse(text = "function(){return(Central);}")) } .square <- function(x) x * x .ret$diagXformInv <- c(sqrt = ".square", log = "exp", identity = "identity")[control$diagXform] if (is.null(err)) { err <- eval(parse(text = paste0("function(){err", paste(inits$ERROR[[1]], collapse = ""), "}"))) } .covNames <- .parNames <- c() .ret$adjLik <- control$adjLik .mixed <- !is.null(inits$OMGA) && length(inits$OMGA) > 0 if (!exists("noLik", envir = .ret)) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ssAtol <- rep(control$ssAtol, length(RxODE::rxModelVars(model)$state)) .ssRtol <- rep(control$ssRtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = (control$derivMethod == 2L), pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, interaction = (control$interaction == 1L), only.numeric = !.mixed, run.internal = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol .ssAtol <- c(.ssAtol, rep(control$ssAtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssAtol))) .ssRtol <- c(.ssRtol, rep(control$ssRtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssRtol))) .ret$control$rxControl$ssAtol <- .ssAtol .ret$control$rxControl$ssRtol <- .ssRtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { if (.ret$noLik) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = FALSE, pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, run.internal = TRUE, only.numeric = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { .extraPars <- NULL } } .ret$skipCov <- skipCov if (is.null(skipCov)) { if (is.null(fixed)) { .tmp <- rep(FALSE, length(inits$THTA)) } else { if (length(fixed) < length(inits$THTA)) { .tmp <- c(fixed, rep(FALSE, length(inits$THTA) - length(fixed))) } else { .tmp <- fixed[1:length(inits$THTA)] } } if (exists("uif", envir = .ret)) { .uifErr <- .ret$uif$ini$err[!is.na(.ret$uif$ini$ntheta)] .uifErr <- sapply(.uifErr, function(x) { if (is.na(x)) { return(FALSE) } return(!any(x == c("pow2", "tbs", "tbsYj"))) }) .tmp <- (.tmp | .uifErr) } .ret$skipCov <- c(.tmp, rep(TRUE, length(.extraPars))) .ret$control$focei.mu.ref <- .ret$uif$focei.mu.ref } if (is.null(.extraPars)) { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA))) } else { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA)), sprintf("ERR[%s]", seq_along(.extraPars))) } if (!is.null(thetaNames) && (length(inits$THTA) + length(.extraPars)) == length(thetaNames)) { .nms <- thetaNames } .ret$thetaNames <- .nms .thetaReset$thetaNames <- .nms if (length(lower) == 1) { lower <- rep(lower, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { print(inits$THTA) print(lower) stop("Lower must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (length(upper) == 1) { upper <- rep(upper, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { stop("Upper must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (!is.null(.extraPars)) { .ret$model$extra.pars <- eval(call(control$diagXform, .ret$model$extra.pars)) if (length(.ret$model$extra.pars) > 0) { inits$THTA <- c(inits$THTA, .ret$model$extra.pars) .lowerErr <- rep(control$atol[1] * 10, length(.ret$model$extra.pars)) .upperErr <- rep(Inf, length(.ret$model$extra.pars)) lower <- c(lower, .lowerErr) upper <- c(upper, .upperErr) } } if (is.null(data$ID)) stop("\"ID\" not found in data") if (is.null(data$DV)) stop("\"DV\" not found in data") if (is.null(data$EVID)) data$EVID <- 0 if (is.null(data$AMT)) data$AMT <- 0 for (.v in c("TIME", "AMT", "DV", .covNames)) { data[[.v]] <- as.double(data[[.v]]) } .ret$dataSav <- data .ds <- data[data$EVID != 0 & data$EVID != 2, c("ID", "TIME", "AMT", "EVID", .covNames)] .w <- which(tolower(names(data)) == "limit") .limitName <- NULL if (length(.w) == 1L) { .limitName <- names(data)[.w] } .censName <- NULL .w <- which(tolower(names(data)) == "cens") if (length(.w) == 1L) { .censName <- names(data[.w]) } data <- data[data$EVID == 0 | data$EVID == 2, c("ID", "TIME", "DV", "EVID", .covNames, .limitName, .censName)] .w <- which(!(names(.ret$dataSav) %in% c(.covNames, keep))) names(.ret$dataSav)[.w] <- tolower(names(.ret$dataSav[.w])) if (.mixed) { .lh <- .parseOM(inits$OMGA) .nlh <- sapply(.lh, length) .osplt <- rep(1:length(.lh), .nlh) .lini <- list(inits$THTA, unlist(.lh)) .nlini <- sapply(.lini, length) .nsplt <- rep(1:length(.lini), .nlini) .om0 <- .genOM(.lh) if (length(etaNames) == dim(.om0)[1]) { .ret$etaNames <- .ret$etaNames } else { .ret$etaNames <- sprintf("ETA[%d]", seq(1, dim(.om0)[1])) } .ret$rxInv <- RxODE::rxSymInvCholCreate(mat = .om0, diag.xform = control$diagXform) .ret$xType <- .ret$rxInv$xType .om0a <- .om0 .om0a <- .om0a/control$diagOmegaBoundLower .om0b <- .om0 .om0b <- .om0b * control$diagOmegaBoundUpper .om0a <- RxODE::rxSymInvCholCreate(mat = .om0a, diag.xform = control$diagXform) .om0b <- RxODE::rxSymInvCholCreate(mat = .om0b, diag.xform = control$diagXform) .omdf <- data.frame(a = .om0a$theta, m = .ret$rxInv$theta, b = .om0b$theta, diag = .om0a$theta.diag) .omdf$lower <- with(.omdf, ifelse(a > b, b, a)) .omdf$lower <- with(.omdf, ifelse(lower == m, -Inf, lower)) .omdf$lower <- with(.omdf, ifelse(!diag, -Inf, lower)) .omdf$upper <- with(.omdf, ifelse(a < b, b, a)) .omdf$upper <- with(.omdf, ifelse(upper == m, Inf, upper)) .omdf$upper <- with(.omdf, ifelse(!diag, Inf, upper)) .ret$control$nomega <- length(.omdf$lower) .ret$control$neta <- sum(.omdf$diag) .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) lower <- c(lower, .omdf$lower) upper <- c(upper, .omdf$upper) } else { .ret$control$nomega <- 0 .ret$control$neta <- 0 .ret$xType <- -1 .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) } .ret$lower <- lower .ret$upper <- upper .ret$thetaIni <- inits$THTA .scaleC <- double(length(lower)) if (is.null(control$scaleC)) { .scaleC <- rep(NA_real_, length(lower)) } else { .scaleC <- as.double(control$scaleC) if (length(lower) > length(.scaleC)) { .scaleC <- c(.scaleC, rep(NA_real_, length(lower) - length(.scaleC))) } else if (length(lower) < length(.scaleC)) { .scaleC <- .scaleC[seq(1, length(lower))] warning("scaleC control option has more options than estimated population parameters, please check.") } } .ret$scaleC <- .scaleC if (exists("uif", envir = .ret)) { .ini <- as.data.frame(.ret$uif$ini)[!is.na(.ret$uif$ini$err), c("est", "err", "ntheta")] for (.i in seq_along(.ini$err)) { if (is.na(.ret$scaleC[.ini$ntheta[.i]])) { if (any(.ini$err[.i] == c("boxCox", "yeoJohnson", "pow2", "tbs", "tbsYj"))) { .ret$scaleC[.ini$ntheta[.i]] <- 1 } else if (any(.ini$err[.i] == c("prop", "add", "norm", "dnorm", "logn", "dlogn", "lnorm", "dlnorm"))) { .ret$scaleC[.ini$ntheta[.i]] <- 0.5 * abs(.ini$est[.i]) } } } for (.i in .ini$model$extraProps$powTheta) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- 1 } .ini <- as.data.frame(.ret$uif$ini) for (.i in .ini$model$extraProps$factorial) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i] + 1)) } for (.i in .ini$model$extraProps$gamma) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i])) } for (.i in .ini$model$extraProps$log) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- log(abs(.ini$est[.i])) * abs(.ini$est[.i]) } for (.i in .ret$logitThetas) { .b <- .ret$logitThetasLow[.i] .c <- .ret$logitThetasHi[.i] .a <- .ini$est[.i] if (is.na(.ret$scaleC[.i])) { .ret$scaleC[.i] <- 1 * (-.b + .c) * exp(-.a)/((1 + exp(-.a))^2 * (.b + 1 * (-.b + .c)/(1 + exp(-.a)))) } } } names(.ret$thetaIni) <- sprintf("THETA[%d]", seq_along(.ret$thetaIni)) if (is.null(etaMat) & !is.null(control$etaMat)) { .ret$etaMat <- control$etaMat } else { .ret$etaMat <- etaMat } .ret$setupTime <- (proc.time() - .pt)["elapsed"] if (exists("uif", envir = .ret)) { .tmp <- .ret$uif$logThetasList .ret$logThetas <- .tmp[[1]] .ret$logThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasList .ret$logitThetas <- .tmp[[1]] .ret$logitThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListLow .ret$logitThetasLow <- .tmp[[1]] .ret$logitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListHi .ret$logitThetasHi <- .tmp[[1]] .ret$logitThetasHiF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasList .ret$probitThetas <- .tmp[[1]] .ret$probitThetasF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListLow .ret$probitThetasLow <- .tmp[[1]] .ret$probitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListHi .ret$probitThetasHi <- .tmp[[1]] .ret$probitThetasHiF <- .tmp[[2]] } else { .ret$logThetasF <- integer(0) .ret$logitThetasF <- integer(0) .ret$logitThetasHiF <- numeric(0) .ret$logitThetasLowF <- numeric(0) .ret$logitThetas <- integer(0) .ret$logitThetasHi <- numeric(0) .ret$logitThetasLow <- numeric(0) .ret$probitThetasF <- integer(0) .ret$probitThetasHiF <- numeric(0) .ret$probitThetasLowF <- numeric(0) .ret$probitThetas <- integer(0) .ret$probitThetasHi <- numeric(0) .ret$probitThetasLow <- numeric(0) } if (exists("noLik", envir = .ret)) { if (!.ret$noLik) { .ret$.params <- c(sprintf("THETA[%d]", seq_along(.ret$thetaIni)), sprintf("ETA[%d]", seq(1, dim(.om0)[1]))) .ret$.thetan <- length(.ret$thetaIni) .ret$nobs <- sum(data$EVID == 0) } } .ret$control$printTop <- TRUE .ret$control$nF <- 0 .est0 <- .ret$thetaIni if (!is.null(.ret$model$pred.nolhs)) { .ret$control$predNeq <- length(.ret$model$pred.nolhs$state) } else { .ret$control$predNeq <- 0L } .fitFun <- function(.ret) { this.env <- environment() assign("err", "theta reset", this.env) while (this.env$err == "theta reset") { assign("err", "", this.env) .ret0 <- tryCatch({ foceiFitCpp_(.ret) }, error = function(e) { if (regexpr("theta reset", e$message) != -1) { assign("zeroOuter", FALSE, this.env) assign("zeroGrad", FALSE, this.env) if (regexpr("theta reset0", e$message) != -1) { assign("zeroGrad", TRUE, this.env) } else if (regexpr("theta resetZ", e$message) != -1) { assign("zeroOuter", TRUE, this.env) } assign("err", "theta reset", this.env) } else { assign("err", e$message, this.env) } }) if (this.env$err == "theta reset") { .nm <- names(.ret$thetaIni) .ret$thetaIni <- setNames(.thetaReset$thetaIni + 0, .nm) .ret$rxInv$theta <- .thetaReset$omegaTheta .ret$control$printTop <- FALSE .ret$etaMat <- .thetaReset$etaMat .ret$control$etaMat <- .thetaReset$etaMat .ret$control$maxInnerIterations <- .thetaReset$maxInnerIterations .ret$control$nF <- .thetaReset$nF .ret$control$gillRetC <- .thetaReset$gillRetC .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillDf <- .thetaReset$gillDf .ret$control$gillDf2 <- .thetaReset$gillDf2 .ret$control$gillErr <- .thetaReset$gillErr .ret$control$rEps <- .thetaReset$rEps .ret$control$aEps <- .thetaReset$aEps .ret$control$rEpsC <- .thetaReset$rEpsC .ret$control$aEpsC <- .thetaReset$aEpsC .ret$control$c1 <- .thetaReset$c1 .ret$control$c2 <- .thetaReset$c2 if (this.env$zeroOuter) { message("Posthoc reset") .ret$control$maxOuterIterations <- 0L } else if (this.env$zeroGrad) { message("Theta reset (zero gradient values); Switch to bobyqa") RxODE::rxReq("minqa") .ret$control$outerOptFun <- .bobyqa .ret$control$outerOpt <- -1L } else { message("Theta reset (ETA drift)") } } } if (this.env$err != "") { stop(this.env$err) } else { return(.ret0) } } .ret0 <- try(.fitFun(.ret)) .n <- 1 while (inherits(.ret0, "try-error") && control$maxOuterIterations != 0 && .n <= control$nRetries) { message(sprintf("Restart %s", .n)) .ret$control$nF <- 0 .estNew <- .est0 + 0.2 * .n * abs(.est0) * stats::runif(length(.est0)) - 0.1 * .n .estNew <- sapply(seq_along(.est0), function(.i) { if (.ret$thetaFixed[.i]) { return(.est0[.i]) } else if (.estNew[.i] < lower[.i]) { return(lower + (.Machine$double.eps)^(1/7)) } else if (.estNew[.i] > upper[.i]) { return(upper - (.Machine$double.eps)^(1/7)) } else { return(.estNew[.i]) } }) .ret$thetaIni <- .estNew .ret0 <- try(.fitFun(.ret)) .n <- .n + 1 } if (inherits(.ret0, "try-error")) stop("Could not fit data.") .ret <- .ret0 if (exists("parHistData", .ret)) { .tmp <- .ret$parHistData .tmp <- .tmp[.tmp$type == "Unscaled", names(.tmp) != "type"] .iter <- .tmp$iter .tmp <- .tmp[, names(.tmp) != "iter"] .ret$parHistStacked <- data.frame(stack(.tmp), iter = .iter) names(.ret$parHistStacked) <- c("val", "par", "iter") .ret$parHist <- data.frame(iter = .iter, .tmp) } if (.mixed) { .etas <- .ret$ranef .thetas <- .ret$fixef .pars <- .Call(`_nlmixr_nlmixrParameters`, .thetas, .etas) .ret$shrink <- .Call(`_nlmixr_calcShrinkOnly`, .ret$omega, .pars$eta.lst, length(.etas$ID)) .updateParFixed(.ret) } else { .updateParFixed(.ret) } if (!exists("table", .ret)) { .ret$table <- tableControl() } if (control$calcTables) { .ret <- addTable(.ret, updateObject = "no", keep = keep, drop = drop, table = .ret$table) } .ret})(data = dat, inits = .FoceiInits, PKpars = .pars, model = .mod, pred = function() { return(nlmixr_pred) }, err = uif$error, lower = uif$focei.lower, upper = uif$focei.upper, fixed = uif$focei.fixed, thetaNames = uif$focei.names, etaNames = uif$eta.names, control = control, env = env, keep = .keep, drop = .drop): Not all the covariates are in the dataset.
#> Error in (function (data, inits, PKpars, model = NULL, pred = NULL, err = NULL, lower = -Inf, upper = Inf, fixed = NULL, skipCov = NULL, control = foceiControl(), thetaNames = NULL, etaNames = NULL, etaMat = NULL, ..., env = NULL, keep = NULL, drop = NULL) { set.seed(control$seed) .pt <- proc.time() RxODE::.setWarnIdSort(FALSE) on.exit(RxODE::.setWarnIdSort(TRUE)) loadNamespace("n1qn1") if (!RxODE::rxIs(control, "foceiControl")) { control <- do.call(foceiControl, control) } if (is.null(env)) { .ret <- new.env(parent = emptyenv()) } else { .ret <- env } .ret$origData <- data .ret$etaNames <- etaNames .ret$thetaFixed <- fixed .ret$control <- control .ret$control$focei.mu.ref <- integer(0) if (is(model, "RxODE") || is(model, "character")) { .ret$ODEmodel <- TRUE if (class(pred) != "function") { stop("pred must be a function specifying the prediction variables in this model.") } } else { .ret$ODEmodel <- TRUE model <- RxODE::rxGetLin(PKpars) pred <- eval(parse(text = "function(){return(Central);}")) } .square <- function(x) x * x .ret$diagXformInv <- c(sqrt = ".square", log = "exp", identity = "identity")[control$diagXform] if (is.null(err)) { err <- eval(parse(text = paste0("function(){err", paste(inits$ERROR[[1]], collapse = ""), "}"))) } .covNames <- .parNames <- c() .ret$adjLik <- control$adjLik .mixed <- !is.null(inits$OMGA) && length(inits$OMGA) > 0 if (!exists("noLik", envir = .ret)) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ssAtol <- rep(control$ssAtol, length(RxODE::rxModelVars(model)$state)) .ssRtol <- rep(control$ssRtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = (control$derivMethod == 2L), pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, interaction = (control$interaction == 1L), only.numeric = !.mixed, run.internal = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol .ssAtol <- c(.ssAtol, rep(control$ssAtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssAtol))) .ssRtol <- c(.ssRtol, rep(control$ssRtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssRtol))) .ret$control$rxControl$ssAtol <- .ssAtol .ret$control$rxControl$ssRtol <- .ssRtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { if (.ret$noLik) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = FALSE, pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, run.internal = TRUE, only.numeric = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { .extraPars <- NULL } } .ret$skipCov <- skipCov if (is.null(skipCov)) { if (is.null(fixed)) { .tmp <- rep(FALSE, length(inits$THTA)) } else { if (length(fixed) < length(inits$THTA)) { .tmp <- c(fixed, rep(FALSE, length(inits$THTA) - length(fixed))) } else { .tmp <- fixed[1:length(inits$THTA)] } } if (exists("uif", envir = .ret)) { .uifErr <- .ret$uif$ini$err[!is.na(.ret$uif$ini$ntheta)] .uifErr <- sapply(.uifErr, function(x) { if (is.na(x)) { return(FALSE) } return(!any(x == c("pow2", "tbs", "tbsYj"))) }) .tmp <- (.tmp | .uifErr) } .ret$skipCov <- c(.tmp, rep(TRUE, length(.extraPars))) .ret$control$focei.mu.ref <- .ret$uif$focei.mu.ref } if (is.null(.extraPars)) { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA))) } else { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA)), sprintf("ERR[%s]", seq_along(.extraPars))) } if (!is.null(thetaNames) && (length(inits$THTA) + length(.extraPars)) == length(thetaNames)) { .nms <- thetaNames } .ret$thetaNames <- .nms .thetaReset$thetaNames <- .nms if (length(lower) == 1) { lower <- rep(lower, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { print(inits$THTA) print(lower) stop("Lower must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (length(upper) == 1) { upper <- rep(upper, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { stop("Upper must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (!is.null(.extraPars)) { .ret$model$extra.pars <- eval(call(control$diagXform, .ret$model$extra.pars)) if (length(.ret$model$extra.pars) > 0) { inits$THTA <- c(inits$THTA, .ret$model$extra.pars) .lowerErr <- rep(control$atol[1] * 10, length(.ret$model$extra.pars)) .upperErr <- rep(Inf, length(.ret$model$extra.pars)) lower <- c(lower, .lowerErr) upper <- c(upper, .upperErr) } } if (is.null(data$ID)) stop("\"ID\" not found in data") if (is.null(data$DV)) stop("\"DV\" not found in data") if (is.null(data$EVID)) data$EVID <- 0 if (is.null(data$AMT)) data$AMT <- 0 for (.v in c("TIME", "AMT", "DV", .covNames)) { data[[.v]] <- as.double(data[[.v]]) } .ret$dataSav <- data .ds <- data[data$EVID != 0 & data$EVID != 2, c("ID", "TIME", "AMT", "EVID", .covNames)] .w <- which(tolower(names(data)) == "limit") .limitName <- NULL if (length(.w) == 1L) { .limitName <- names(data)[.w] } .censName <- NULL .w <- which(tolower(names(data)) == "cens") if (length(.w) == 1L) { .censName <- names(data[.w]) } data <- data[data$EVID == 0 | data$EVID == 2, c("ID", "TIME", "DV", "EVID", .covNames, .limitName, .censName)] .w <- which(!(names(.ret$dataSav) %in% c(.covNames, keep))) names(.ret$dataSav)[.w] <- tolower(names(.ret$dataSav[.w])) if (.mixed) { .lh <- .parseOM(inits$OMGA) .nlh <- sapply(.lh, length) .osplt <- rep(1:length(.lh), .nlh) .lini <- list(inits$THTA, unlist(.lh)) .nlini <- sapply(.lini, length) .nsplt <- rep(1:length(.lini), .nlini) .om0 <- .genOM(.lh) if (length(etaNames) == dim(.om0)[1]) { .ret$etaNames <- .ret$etaNames } else { .ret$etaNames <- sprintf("ETA[%d]", seq(1, dim(.om0)[1])) } .ret$rxInv <- RxODE::rxSymInvCholCreate(mat = .om0, diag.xform = control$diagXform) .ret$xType <- .ret$rxInv$xType .om0a <- .om0 .om0a <- .om0a/control$diagOmegaBoundLower .om0b <- .om0 .om0b <- .om0b * control$diagOmegaBoundUpper .om0a <- RxODE::rxSymInvCholCreate(mat = .om0a, diag.xform = control$diagXform) .om0b <- RxODE::rxSymInvCholCreate(mat = .om0b, diag.xform = control$diagXform) .omdf <- data.frame(a = .om0a$theta, m = .ret$rxInv$theta, b = .om0b$theta, diag = .om0a$theta.diag) .omdf$lower <- with(.omdf, ifelse(a > b, b, a)) .omdf$lower <- with(.omdf, ifelse(lower == m, -Inf, lower)) .omdf$lower <- with(.omdf, ifelse(!diag, -Inf, lower)) .omdf$upper <- with(.omdf, ifelse(a < b, b, a)) .omdf$upper <- with(.omdf, ifelse(upper == m, Inf, upper)) .omdf$upper <- with(.omdf, ifelse(!diag, Inf, upper)) .ret$control$nomega <- length(.omdf$lower) .ret$control$neta <- sum(.omdf$diag) .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) lower <- c(lower, .omdf$lower) upper <- c(upper, .omdf$upper) } else { .ret$control$nomega <- 0 .ret$control$neta <- 0 .ret$xType <- -1 .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) } .ret$lower <- lower .ret$upper <- upper .ret$thetaIni <- inits$THTA .scaleC <- double(length(lower)) if (is.null(control$scaleC)) { .scaleC <- rep(NA_real_, length(lower)) } else { .scaleC <- as.double(control$scaleC) if (length(lower) > length(.scaleC)) { .scaleC <- c(.scaleC, rep(NA_real_, length(lower) - length(.scaleC))) } else if (length(lower) < length(.scaleC)) { .scaleC <- .scaleC[seq(1, length(lower))] warning("scaleC control option has more options than estimated population parameters, please check.") } } .ret$scaleC <- .scaleC if (exists("uif", envir = .ret)) { .ini <- as.data.frame(.ret$uif$ini)[!is.na(.ret$uif$ini$err), c("est", "err", "ntheta")] for (.i in seq_along(.ini$err)) { if (is.na(.ret$scaleC[.ini$ntheta[.i]])) { if (any(.ini$err[.i] == c("boxCox", "yeoJohnson", "pow2", "tbs", "tbsYj"))) { .ret$scaleC[.ini$ntheta[.i]] <- 1 } else if (any(.ini$err[.i] == c("prop", "add", "norm", "dnorm", "logn", "dlogn", "lnorm", "dlnorm"))) { .ret$scaleC[.ini$ntheta[.i]] <- 0.5 * abs(.ini$est[.i]) } } } for (.i in .ini$model$extraProps$powTheta) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- 1 } .ini <- as.data.frame(.ret$uif$ini) for (.i in .ini$model$extraProps$factorial) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i] + 1)) } for (.i in .ini$model$extraProps$gamma) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i])) } for (.i in .ini$model$extraProps$log) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- log(abs(.ini$est[.i])) * abs(.ini$est[.i]) } for (.i in .ret$logitThetas) { .b <- .ret$logitThetasLow[.i] .c <- .ret$logitThetasHi[.i] .a <- .ini$est[.i] if (is.na(.ret$scaleC[.i])) { .ret$scaleC[.i] <- 1 * (-.b + .c) * exp(-.a)/((1 + exp(-.a))^2 * (.b + 1 * (-.b + .c)/(1 + exp(-.a)))) } } } names(.ret$thetaIni) <- sprintf("THETA[%d]", seq_along(.ret$thetaIni)) if (is.null(etaMat) & !is.null(control$etaMat)) { .ret$etaMat <- control$etaMat } else { .ret$etaMat <- etaMat } .ret$setupTime <- (proc.time() - .pt)["elapsed"] if (exists("uif", envir = .ret)) { .tmp <- .ret$uif$logThetasList .ret$logThetas <- .tmp[[1]] .ret$logThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasList .ret$logitThetas <- .tmp[[1]] .ret$logitThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListLow .ret$logitThetasLow <- .tmp[[1]] .ret$logitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListHi .ret$logitThetasHi <- .tmp[[1]] .ret$logitThetasHiF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasList .ret$probitThetas <- .tmp[[1]] .ret$probitThetasF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListLow .ret$probitThetasLow <- .tmp[[1]] .ret$probitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListHi .ret$probitThetasHi <- .tmp[[1]] .ret$probitThetasHiF <- .tmp[[2]] } else { .ret$logThetasF <- integer(0) .ret$logitThetasF <- integer(0) .ret$logitThetasHiF <- numeric(0) .ret$logitThetasLowF <- numeric(0) .ret$logitThetas <- integer(0) .ret$logitThetasHi <- numeric(0) .ret$logitThetasLow <- numeric(0) .ret$probitThetasF <- integer(0) .ret$probitThetasHiF <- numeric(0) .ret$probitThetasLowF <- numeric(0) .ret$probitThetas <- integer(0) .ret$probitThetasHi <- numeric(0) .ret$probitThetasLow <- numeric(0) } if (exists("noLik", envir = .ret)) { if (!.ret$noLik) { .ret$.params <- c(sprintf("THETA[%d]", seq_along(.ret$thetaIni)), sprintf("ETA[%d]", seq(1, dim(.om0)[1]))) .ret$.thetan <- length(.ret$thetaIni) .ret$nobs <- sum(data$EVID == 0) } } .ret$control$printTop <- TRUE .ret$control$nF <- 0 .est0 <- .ret$thetaIni if (!is.null(.ret$model$pred.nolhs)) { .ret$control$predNeq <- length(.ret$model$pred.nolhs$state) } else { .ret$control$predNeq <- 0L } .fitFun <- function(.ret) { this.env <- environment() assign("err", "theta reset", this.env) while (this.env$err == "theta reset") { assign("err", "", this.env) .ret0 <- tryCatch({ foceiFitCpp_(.ret) }, error = function(e) { if (regexpr("theta reset", e$message) != -1) { assign("zeroOuter", FALSE, this.env) assign("zeroGrad", FALSE, this.env) if (regexpr("theta reset0", e$message) != -1) { assign("zeroGrad", TRUE, this.env) } else if (regexpr("theta resetZ", e$message) != -1) { assign("zeroOuter", TRUE, this.env) } assign("err", "theta reset", this.env) } else { assign("err", e$message, this.env) } }) if (this.env$err == "theta reset") { .nm <- names(.ret$thetaIni) .ret$thetaIni <- setNames(.thetaReset$thetaIni + 0, .nm) .ret$rxInv$theta <- .thetaReset$omegaTheta .ret$control$printTop <- FALSE .ret$etaMat <- .thetaReset$etaMat .ret$control$etaMat <- .thetaReset$etaMat .ret$control$maxInnerIterations <- .thetaReset$maxInnerIterations .ret$control$nF <- .thetaReset$nF .ret$control$gillRetC <- .thetaReset$gillRetC .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillDf <- .thetaReset$gillDf .ret$control$gillDf2 <- .thetaReset$gillDf2 .ret$control$gillErr <- .thetaReset$gillErr .ret$control$rEps <- .thetaReset$rEps .ret$control$aEps <- .thetaReset$aEps .ret$control$rEpsC <- .thetaReset$rEpsC .ret$control$aEpsC <- .thetaReset$aEpsC .ret$control$c1 <- .thetaReset$c1 .ret$control$c2 <- .thetaReset$c2 if (this.env$zeroOuter) { message("Posthoc reset") .ret$control$maxOuterIterations <- 0L } else if (this.env$zeroGrad) { message("Theta reset (zero gradient values); Switch to bobyqa") RxODE::rxReq("minqa") .ret$control$outerOptFun <- .bobyqa .ret$control$outerOpt <- -1L } else { message("Theta reset (ETA drift)") } } } if (this.env$err != "") { stop(this.env$err) } else { return(.ret0) } } .ret0 <- try(.fitFun(.ret)) .n <- 1 while (inherits(.ret0, "try-error") && control$maxOuterIterations != 0 && .n <= control$nRetries) { message(sprintf("Restart %s", .n)) .ret$control$nF <- 0 .estNew <- .est0 + 0.2 * .n * abs(.est0) * stats::runif(length(.est0)) - 0.1 * .n .estNew <- sapply(seq_along(.est0), function(.i) { if (.ret$thetaFixed[.i]) { return(.est0[.i]) } else if (.estNew[.i] < lower[.i]) { return(lower + (.Machine$double.eps)^(1/7)) } else if (.estNew[.i] > upper[.i]) { return(upper - (.Machine$double.eps)^(1/7)) } else { return(.estNew[.i]) } }) .ret$thetaIni <- .estNew .ret0 <- try(.fitFun(.ret)) .n <- .n + 1 } if (inherits(.ret0, "try-error")) stop("Could not fit data.") .ret <- .ret0 if (exists("parHistData", .ret)) { .tmp <- .ret$parHistData .tmp <- .tmp[.tmp$type == "Unscaled", names(.tmp) != "type"] .iter <- .tmp$iter .tmp <- .tmp[, names(.tmp) != "iter"] .ret$parHistStacked <- data.frame(stack(.tmp), iter = .iter) names(.ret$parHistStacked) <- c("val", "par", "iter") .ret$parHist <- data.frame(iter = .iter, .tmp) } if (.mixed) { .etas <- .ret$ranef .thetas <- .ret$fixef .pars <- .Call(`_nlmixr_nlmixrParameters`, .thetas, .etas) .ret$shrink <- .Call(`_nlmixr_calcShrinkOnly`, .ret$omega, .pars$eta.lst, length(.etas$ID)) .updateParFixed(.ret) } else { .updateParFixed(.ret) } if (!exists("table", .ret)) { .ret$table <- tableControl() } if (control$calcTables) { .ret <- addTable(.ret, updateObject = "no", keep = keep, drop = drop, table = .ret$table) } .ret})(data = dat, inits = .FoceiInits, PKpars = .pars, model = .mod, pred = function() { return(nlmixr_pred) }, err = uif$error, lower = uif$focei.lower, upper = uif$focei.upper, fixed = uif$focei.fixed, thetaNames = uif$focei.names, etaNames = uif$eta.names, control = control, env = env, keep = .keep, drop = .drop): Not all the covariates are in the dataset.
f_nlmixr_dfop_sfo_focei_tc <- nlmixr(f_mmkin_tc["DFOP-SFO", ], est = "focei") +#> dosenum=dosenum();
#> Needed Covariates:
#> [1] "f_parent_to_A1" "CMT"
#> Error in (function (data, inits, PKpars, model = NULL, pred = NULL, err = NULL, lower = -Inf, upper = Inf, fixed = NULL, skipCov = NULL, control = foceiControl(), thetaNames = NULL, etaNames = NULL, etaMat = NULL, ..., env = NULL, keep = NULL, drop = NULL) { set.seed(control$seed) .pt <- proc.time() RxODE::.setWarnIdSort(FALSE) on.exit(RxODE::.setWarnIdSort(TRUE)) loadNamespace("n1qn1") if (!RxODE::rxIs(control, "foceiControl")) { control <- do.call(foceiControl, control) } if (is.null(env)) { .ret <- new.env(parent = emptyenv()) } else { .ret <- env } .ret$origData <- data .ret$etaNames <- etaNames .ret$thetaFixed <- fixed .ret$control <- control .ret$control$focei.mu.ref <- integer(0) if (is(model, "RxODE") || is(model, "character")) { .ret$ODEmodel <- TRUE if (class(pred) != "function") { stop("pred must be a function specifying the prediction variables in this model.") } } else { .ret$ODEmodel <- TRUE model <- RxODE::rxGetLin(PKpars) pred <- eval(parse(text = "function(){return(Central);}")) } .square <- function(x) x * x .ret$diagXformInv <- c(sqrt = ".square", log = "exp", identity = "identity")[control$diagXform] if (is.null(err)) { err <- eval(parse(text = paste0("function(){err", paste(inits$ERROR[[1]], collapse = ""), "}"))) } .covNames <- .parNames <- c() .ret$adjLik <- control$adjLik .mixed <- !is.null(inits$OMGA) && length(inits$OMGA) > 0 if (!exists("noLik", envir = .ret)) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ssAtol <- rep(control$ssAtol, length(RxODE::rxModelVars(model)$state)) .ssRtol <- rep(control$ssRtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = (control$derivMethod == 2L), pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, interaction = (control$interaction == 1L), only.numeric = !.mixed, run.internal = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol .ssAtol <- c(.ssAtol, rep(control$ssAtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssAtol))) .ssRtol <- c(.ssRtol, rep(control$ssRtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssRtol))) .ret$control$rxControl$ssAtol <- .ssAtol .ret$control$rxControl$ssRtol <- .ssRtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { if (.ret$noLik) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = FALSE, pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, run.internal = TRUE, only.numeric = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { .extraPars <- NULL } } .ret$skipCov <- skipCov if (is.null(skipCov)) { if (is.null(fixed)) { .tmp <- rep(FALSE, length(inits$THTA)) } else { if (length(fixed) < length(inits$THTA)) { .tmp <- c(fixed, rep(FALSE, length(inits$THTA) - length(fixed))) } else { .tmp <- fixed[1:length(inits$THTA)] } } if (exists("uif", envir = .ret)) { .uifErr <- .ret$uif$ini$err[!is.na(.ret$uif$ini$ntheta)] .uifErr <- sapply(.uifErr, function(x) { if (is.na(x)) { return(FALSE) } return(!any(x == c("pow2", "tbs", "tbsYj"))) }) .tmp <- (.tmp | .uifErr) } .ret$skipCov <- c(.tmp, rep(TRUE, length(.extraPars))) .ret$control$focei.mu.ref <- .ret$uif$focei.mu.ref } if (is.null(.extraPars)) { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA))) } else { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA)), sprintf("ERR[%s]", seq_along(.extraPars))) } if (!is.null(thetaNames) && (length(inits$THTA) + length(.extraPars)) == length(thetaNames)) { .nms <- thetaNames } .ret$thetaNames <- .nms .thetaReset$thetaNames <- .nms if (length(lower) == 1) { lower <- rep(lower, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { print(inits$THTA) print(lower) stop("Lower must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (length(upper) == 1) { upper <- rep(upper, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { stop("Upper must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (!is.null(.extraPars)) { .ret$model$extra.pars <- eval(call(control$diagXform, .ret$model$extra.pars)) if (length(.ret$model$extra.pars) > 0) { inits$THTA <- c(inits$THTA, .ret$model$extra.pars) .lowerErr <- rep(control$atol[1] * 10, length(.ret$model$extra.pars)) .upperErr <- rep(Inf, length(.ret$model$extra.pars)) lower <- c(lower, .lowerErr) upper <- c(upper, .upperErr) } } if (is.null(data$ID)) stop("\"ID\" not found in data") if (is.null(data$DV)) stop("\"DV\" not found in data") if (is.null(data$EVID)) data$EVID <- 0 if (is.null(data$AMT)) data$AMT <- 0 for (.v in c("TIME", "AMT", "DV", .covNames)) { data[[.v]] <- as.double(data[[.v]]) } .ret$dataSav <- data .ds <- data[data$EVID != 0 & data$EVID != 2, c("ID", "TIME", "AMT", "EVID", .covNames)] .w <- which(tolower(names(data)) == "limit") .limitName <- NULL if (length(.w) == 1L) { .limitName <- names(data)[.w] } .censName <- NULL .w <- which(tolower(names(data)) == "cens") if (length(.w) == 1L) { .censName <- names(data[.w]) } data <- data[data$EVID == 0 | data$EVID == 2, c("ID", "TIME", "DV", "EVID", .covNames, .limitName, .censName)] .w <- which(!(names(.ret$dataSav) %in% c(.covNames, keep))) names(.ret$dataSav)[.w] <- tolower(names(.ret$dataSav[.w])) if (.mixed) { .lh <- .parseOM(inits$OMGA) .nlh <- sapply(.lh, length) .osplt <- rep(1:length(.lh), .nlh) .lini <- list(inits$THTA, unlist(.lh)) .nlini <- sapply(.lini, length) .nsplt <- rep(1:length(.lini), .nlini) .om0 <- .genOM(.lh) if (length(etaNames) == dim(.om0)[1]) { .ret$etaNames <- .ret$etaNames } else { .ret$etaNames <- sprintf("ETA[%d]", seq(1, dim(.om0)[1])) } .ret$rxInv <- RxODE::rxSymInvCholCreate(mat = .om0, diag.xform = control$diagXform) .ret$xType <- .ret$rxInv$xType .om0a <- .om0 .om0a <- .om0a/control$diagOmegaBoundLower .om0b <- .om0 .om0b <- .om0b * control$diagOmegaBoundUpper .om0a <- RxODE::rxSymInvCholCreate(mat = .om0a, diag.xform = control$diagXform) .om0b <- RxODE::rxSymInvCholCreate(mat = .om0b, diag.xform = control$diagXform) .omdf <- data.frame(a = .om0a$theta, m = .ret$rxInv$theta, b = .om0b$theta, diag = .om0a$theta.diag) .omdf$lower <- with(.omdf, ifelse(a > b, b, a)) .omdf$lower <- with(.omdf, ifelse(lower == m, -Inf, lower)) .omdf$lower <- with(.omdf, ifelse(!diag, -Inf, lower)) .omdf$upper <- with(.omdf, ifelse(a < b, b, a)) .omdf$upper <- with(.omdf, ifelse(upper == m, Inf, upper)) .omdf$upper <- with(.omdf, ifelse(!diag, Inf, upper)) .ret$control$nomega <- length(.omdf$lower) .ret$control$neta <- sum(.omdf$diag) .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) lower <- c(lower, .omdf$lower) upper <- c(upper, .omdf$upper) } else { .ret$control$nomega <- 0 .ret$control$neta <- 0 .ret$xType <- -1 .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) } .ret$lower <- lower .ret$upper <- upper .ret$thetaIni <- inits$THTA .scaleC <- double(length(lower)) if (is.null(control$scaleC)) { .scaleC <- rep(NA_real_, length(lower)) } else { .scaleC <- as.double(control$scaleC) if (length(lower) > length(.scaleC)) { .scaleC <- c(.scaleC, rep(NA_real_, length(lower) - length(.scaleC))) } else if (length(lower) < length(.scaleC)) { .scaleC <- .scaleC[seq(1, length(lower))] warning("scaleC control option has more options than estimated population parameters, please check.") } } .ret$scaleC <- .scaleC if (exists("uif", envir = .ret)) { .ini <- as.data.frame(.ret$uif$ini)[!is.na(.ret$uif$ini$err), c("est", "err", "ntheta")] for (.i in seq_along(.ini$err)) { if (is.na(.ret$scaleC[.ini$ntheta[.i]])) { if (any(.ini$err[.i] == c("boxCox", "yeoJohnson", "pow2", "tbs", "tbsYj"))) { .ret$scaleC[.ini$ntheta[.i]] <- 1 } else if (any(.ini$err[.i] == c("prop", "add", "norm", "dnorm", "logn", "dlogn", "lnorm", "dlnorm"))) { .ret$scaleC[.ini$ntheta[.i]] <- 0.5 * abs(.ini$est[.i]) } } } for (.i in .ini$model$extraProps$powTheta) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- 1 } .ini <- as.data.frame(.ret$uif$ini) for (.i in .ini$model$extraProps$factorial) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i] + 1)) } for (.i in .ini$model$extraProps$gamma) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i])) } for (.i in .ini$model$extraProps$log) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- log(abs(.ini$est[.i])) * abs(.ini$est[.i]) } for (.i in .ret$logitThetas) { .b <- .ret$logitThetasLow[.i] .c <- .ret$logitThetasHi[.i] .a <- .ini$est[.i] if (is.na(.ret$scaleC[.i])) { .ret$scaleC[.i] <- 1 * (-.b + .c) * exp(-.a)/((1 + exp(-.a))^2 * (.b + 1 * (-.b + .c)/(1 + exp(-.a)))) } } } names(.ret$thetaIni) <- sprintf("THETA[%d]", seq_along(.ret$thetaIni)) if (is.null(etaMat) & !is.null(control$etaMat)) { .ret$etaMat <- control$etaMat } else { .ret$etaMat <- etaMat } .ret$setupTime <- (proc.time() - .pt)["elapsed"] if (exists("uif", envir = .ret)) { .tmp <- .ret$uif$logThetasList .ret$logThetas <- .tmp[[1]] .ret$logThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasList .ret$logitThetas <- .tmp[[1]] .ret$logitThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListLow .ret$logitThetasLow <- .tmp[[1]] .ret$logitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListHi .ret$logitThetasHi <- .tmp[[1]] .ret$logitThetasHiF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasList .ret$probitThetas <- .tmp[[1]] .ret$probitThetasF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListLow .ret$probitThetasLow <- .tmp[[1]] .ret$probitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListHi .ret$probitThetasHi <- .tmp[[1]] .ret$probitThetasHiF <- .tmp[[2]] } else { .ret$logThetasF <- integer(0) .ret$logitThetasF <- integer(0) .ret$logitThetasHiF <- numeric(0) .ret$logitThetasLowF <- numeric(0) .ret$logitThetas <- integer(0) .ret$logitThetasHi <- numeric(0) .ret$logitThetasLow <- numeric(0) .ret$probitThetasF <- integer(0) .ret$probitThetasHiF <- numeric(0) .ret$probitThetasLowF <- numeric(0) .ret$probitThetas <- integer(0) .ret$probitThetasHi <- numeric(0) .ret$probitThetasLow <- numeric(0) } if (exists("noLik", envir = .ret)) { if (!.ret$noLik) { .ret$.params <- c(sprintf("THETA[%d]", seq_along(.ret$thetaIni)), sprintf("ETA[%d]", seq(1, dim(.om0)[1]))) .ret$.thetan <- length(.ret$thetaIni) .ret$nobs <- sum(data$EVID == 0) } } .ret$control$printTop <- TRUE .ret$control$nF <- 0 .est0 <- .ret$thetaIni if (!is.null(.ret$model$pred.nolhs)) { .ret$control$predNeq <- length(.ret$model$pred.nolhs$state) } else { .ret$control$predNeq <- 0L } .fitFun <- function(.ret) { this.env <- environment() assign("err", "theta reset", this.env) while (this.env$err == "theta reset") { assign("err", "", this.env) .ret0 <- tryCatch({ foceiFitCpp_(.ret) }, error = function(e) { if (regexpr("theta reset", e$message) != -1) { assign("zeroOuter", FALSE, this.env) assign("zeroGrad", FALSE, this.env) if (regexpr("theta reset0", e$message) != -1) { assign("zeroGrad", TRUE, this.env) } else if (regexpr("theta resetZ", e$message) != -1) { assign("zeroOuter", TRUE, this.env) } assign("err", "theta reset", this.env) } else { assign("err", e$message, this.env) } }) if (this.env$err == "theta reset") { .nm <- names(.ret$thetaIni) .ret$thetaIni <- setNames(.thetaReset$thetaIni + 0, .nm) .ret$rxInv$theta <- .thetaReset$omegaTheta .ret$control$printTop <- FALSE .ret$etaMat <- .thetaReset$etaMat .ret$control$etaMat <- .thetaReset$etaMat .ret$control$maxInnerIterations <- .thetaReset$maxInnerIterations .ret$control$nF <- .thetaReset$nF .ret$control$gillRetC <- .thetaReset$gillRetC .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillDf <- .thetaReset$gillDf .ret$control$gillDf2 <- .thetaReset$gillDf2 .ret$control$gillErr <- .thetaReset$gillErr .ret$control$rEps <- .thetaReset$rEps .ret$control$aEps <- .thetaReset$aEps .ret$control$rEpsC <- .thetaReset$rEpsC .ret$control$aEpsC <- .thetaReset$aEpsC .ret$control$c1 <- .thetaReset$c1 .ret$control$c2 <- .thetaReset$c2 if (this.env$zeroOuter) { message("Posthoc reset") .ret$control$maxOuterIterations <- 0L } else if (this.env$zeroGrad) { message("Theta reset (zero gradient values); Switch to bobyqa") RxODE::rxReq("minqa") .ret$control$outerOptFun <- .bobyqa .ret$control$outerOpt <- -1L } else { message("Theta reset (ETA drift)") } } } if (this.env$err != "") { stop(this.env$err) } else { return(.ret0) } } .ret0 <- try(.fitFun(.ret)) .n <- 1 while (inherits(.ret0, "try-error") && control$maxOuterIterations != 0 && .n <= control$nRetries) { message(sprintf("Restart %s", .n)) .ret$control$nF <- 0 .estNew <- .est0 + 0.2 * .n * abs(.est0) * stats::runif(length(.est0)) - 0.1 * .n .estNew <- sapply(seq_along(.est0), function(.i) { if (.ret$thetaFixed[.i]) { return(.est0[.i]) } else if (.estNew[.i] < lower[.i]) { return(lower + (.Machine$double.eps)^(1/7)) } else if (.estNew[.i] > upper[.i]) { return(upper - (.Machine$double.eps)^(1/7)) } else { return(.estNew[.i]) } }) .ret$thetaIni <- .estNew .ret0 <- try(.fitFun(.ret)) .n <- .n + 1 } if (inherits(.ret0, "try-error")) stop("Could not fit data.") .ret <- .ret0 if (exists("parHistData", .ret)) { .tmp <- .ret$parHistData .tmp <- .tmp[.tmp$type == "Unscaled", names(.tmp) != "type"] .iter <- .tmp$iter .tmp <- .tmp[, names(.tmp) != "iter"] .ret$parHistStacked <- data.frame(stack(.tmp), iter = .iter) names(.ret$parHistStacked) <- c("val", "par", "iter") .ret$parHist <- data.frame(iter = .iter, .tmp) } if (.mixed) { .etas <- .ret$ranef .thetas <- .ret$fixef .pars <- .Call(`_nlmixr_nlmixrParameters`, .thetas, .etas) .ret$shrink <- .Call(`_nlmixr_calcShrinkOnly`, .ret$omega, .pars$eta.lst, length(.etas$ID)) .updateParFixed(.ret) } else { .updateParFixed(.ret) } if (!exists("table", .ret)) { .ret$table <- tableControl() } if (control$calcTables) { .ret <- addTable(.ret, updateObject = "no", keep = keep, drop = drop, table = .ret$table) } .ret})(data = dat, inits = .FoceiInits, PKpars = .pars, model = .mod, pred = function() { return(nlmixr_pred) }, err = uif$error, lower = uif$focei.lower, upper = uif$focei.upper, fixed = uif$focei.fixed, thetaNames = uif$focei.names, etaNames = uif$eta.names, control = control, env = env, keep = .keep, drop = .drop): Not all the covariates are in the dataset.
#> Timing stopped at: 8.455 0.377 8.841
f_nlmixr_dfop_sfo_focei_tc <- nlmixr(f_mmkin_tc["DFOP-SFO", ], est = "focei")
#> parameter labels from comments are typically ignored in non-interactive mode
#> Need to run with the source intact to parse comments
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → calculate jacobian
#>
#> → calculate sensitivities
#>
#> → calculate ∂(f)/∂(η)
#>
#> → calculate ∂(R²)/∂(η)
#>
#> → finding duplicate expressions in inner model...
#>
#> → optimizing duplicate expressions in inner model...
#>
#> → finding duplicate expressions in EBE model...
#>
#> → optimizing duplicate expressions in EBE model...
#>
#> → compiling inner model...
#>
#> done
#> → finding duplicate expressions in FD model...
#>
#> → optimizing duplicate expressions in FD model...
#>
#> → compiling EBE model...
#>
#> done
#> → compiling events FD model...
#>
#> done
#> Model:
#> cmt(parent); #> cmt(A1); #> rx_expr_6~ETA[1]+THETA[1]; @@ -4832,12 +738,12 @@ obtained by fitting the same model to a list of datasets using f_parent=1/(1+exp(-(ETA[3]+THETA[3]))); #> g=1/(rx_expr_21); #> tad=tad(); -#> dosenum=dosenum();
#> Error in (function (data, inits, PKpars, model = NULL, pred = NULL, err = NULL, lower = -Inf, upper = Inf, fixed = NULL, skipCov = NULL, control = foceiControl(), thetaNames = NULL, etaNames = NULL, etaMat = NULL, ..., env = NULL, keep = NULL, drop = NULL) { set.seed(control$seed) .pt <- proc.time() RxODE::.setWarnIdSort(FALSE) on.exit(RxODE::.setWarnIdSort(TRUE)) loadNamespace("n1qn1") if (!RxODE::rxIs(control, "foceiControl")) { control <- do.call(foceiControl, control) } if (is.null(env)) { .ret <- new.env(parent = emptyenv()) } else { .ret <- env } .ret$origData <- data .ret$etaNames <- etaNames .ret$thetaFixed <- fixed .ret$control <- control .ret$control$focei.mu.ref <- integer(0) if (is(model, "RxODE") || is(model, "character")) { .ret$ODEmodel <- TRUE if (class(pred) != "function") { stop("pred must be a function specifying the prediction variables in this model.") } } else { .ret$ODEmodel <- TRUE model <- RxODE::rxGetLin(PKpars) pred <- eval(parse(text = "function(){return(Central);}")) } .square <- function(x) x * x .ret$diagXformInv <- c(sqrt = ".square", log = "exp", identity = "identity")[control$diagXform] if (is.null(err)) { err <- eval(parse(text = paste0("function(){err", paste(inits$ERROR[[1]], collapse = ""), "}"))) } .covNames <- .parNames <- c() .ret$adjLik <- control$adjLik .mixed <- !is.null(inits$OMGA) && length(inits$OMGA) > 0 if (!exists("noLik", envir = .ret)) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ssAtol <- rep(control$ssAtol, length(RxODE::rxModelVars(model)$state)) .ssRtol <- rep(control$ssRtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = (control$derivMethod == 2L), pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, interaction = (control$interaction == 1L), only.numeric = !.mixed, run.internal = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol .ssAtol <- c(.ssAtol, rep(control$ssAtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssAtol))) .ssRtol <- c(.ssRtol, rep(control$ssRtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssRtol))) .ret$control$rxControl$ssAtol <- .ssAtol .ret$control$rxControl$ssRtol <- .ssRtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { if (.ret$noLik) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = FALSE, pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, run.internal = TRUE, only.numeric = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { .extraPars <- NULL } } .ret$skipCov <- skipCov if (is.null(skipCov)) { if (is.null(fixed)) { .tmp <- rep(FALSE, length(inits$THTA)) } else { if (length(fixed) < length(inits$THTA)) { .tmp <- c(fixed, rep(FALSE, length(inits$THTA) - length(fixed))) } else { .tmp <- fixed[1:length(inits$THTA)] } } if (exists("uif", envir = .ret)) { .uifErr <- .ret$uif$ini$err[!is.na(.ret$uif$ini$ntheta)] .uifErr <- sapply(.uifErr, function(x) { if (is.na(x)) { return(FALSE) } return(!any(x == c("pow2", "tbs", "tbsYj"))) }) .tmp <- (.tmp | .uifErr) } .ret$skipCov <- c(.tmp, rep(TRUE, length(.extraPars))) .ret$control$focei.mu.ref <- .ret$uif$focei.mu.ref } if (is.null(.extraPars)) { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA))) } else { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA)), sprintf("ERR[%s]", seq_along(.extraPars))) } if (!is.null(thetaNames) && (length(inits$THTA) + length(.extraPars)) == length(thetaNames)) { .nms <- thetaNames } .ret$thetaNames <- .nms .thetaReset$thetaNames <- .nms if (length(lower) == 1) { lower <- rep(lower, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { print(inits$THTA) print(lower) stop("Lower must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (length(upper) == 1) { upper <- rep(upper, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { stop("Upper must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (!is.null(.extraPars)) { .ret$model$extra.pars <- eval(call(control$diagXform, .ret$model$extra.pars)) if (length(.ret$model$extra.pars) > 0) { inits$THTA <- c(inits$THTA, .ret$model$extra.pars) .lowerErr <- rep(control$atol[1] * 10, length(.ret$model$extra.pars)) .upperErr <- rep(Inf, length(.ret$model$extra.pars)) lower <- c(lower, .lowerErr) upper <- c(upper, .upperErr) } } if (is.null(data$ID)) stop("\"ID\" not found in data") if (is.null(data$DV)) stop("\"DV\" not found in data") if (is.null(data$EVID)) data$EVID <- 0 if (is.null(data$AMT)) data$AMT <- 0 for (.v in c("TIME", "AMT", "DV", .covNames)) { data[[.v]] <- as.double(data[[.v]]) } .ret$dataSav <- data .ds <- data[data$EVID != 0 & data$EVID != 2, c("ID", "TIME", "AMT", "EVID", .covNames)] .w <- which(tolower(names(data)) == "limit") .limitName <- NULL if (length(.w) == 1L) { .limitName <- names(data)[.w] } .censName <- NULL .w <- which(tolower(names(data)) == "cens") if (length(.w) == 1L) { .censName <- names(data[.w]) } data <- data[data$EVID == 0 | data$EVID == 2, c("ID", "TIME", "DV", "EVID", .covNames, .limitName, .censName)] .w <- which(!(names(.ret$dataSav) %in% c(.covNames, keep))) names(.ret$dataSav)[.w] <- tolower(names(.ret$dataSav[.w])) if (.mixed) { .lh <- .parseOM(inits$OMGA) .nlh <- sapply(.lh, length) .osplt <- rep(1:length(.lh), .nlh) .lini <- list(inits$THTA, unlist(.lh)) .nlini <- sapply(.lini, length) .nsplt <- rep(1:length(.lini), .nlini) .om0 <- .genOM(.lh) if (length(etaNames) == dim(.om0)[1]) { .ret$etaNames <- .ret$etaNames } else { .ret$etaNames <- sprintf("ETA[%d]", seq(1, dim(.om0)[1])) } .ret$rxInv <- RxODE::rxSymInvCholCreate(mat = .om0, diag.xform = control$diagXform) .ret$xType <- .ret$rxInv$xType .om0a <- .om0 .om0a <- .om0a/control$diagOmegaBoundLower .om0b <- .om0 .om0b <- .om0b * control$diagOmegaBoundUpper .om0a <- RxODE::rxSymInvCholCreate(mat = .om0a, diag.xform = control$diagXform) .om0b <- RxODE::rxSymInvCholCreate(mat = .om0b, diag.xform = control$diagXform) .omdf <- data.frame(a = .om0a$theta, m = .ret$rxInv$theta, b = .om0b$theta, diag = .om0a$theta.diag) .omdf$lower <- with(.omdf, ifelse(a > b, b, a)) .omdf$lower <- with(.omdf, ifelse(lower == m, -Inf, lower)) .omdf$lower <- with(.omdf, ifelse(!diag, -Inf, lower)) .omdf$upper <- with(.omdf, ifelse(a < b, b, a)) .omdf$upper <- with(.omdf, ifelse(upper == m, Inf, upper)) .omdf$upper <- with(.omdf, ifelse(!diag, Inf, upper)) .ret$control$nomega <- length(.omdf$lower) .ret$control$neta <- sum(.omdf$diag) .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) lower <- c(lower, .omdf$lower) upper <- c(upper, .omdf$upper) } else { .ret$control$nomega <- 0 .ret$control$neta <- 0 .ret$xType <- -1 .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) } .ret$lower <- lower .ret$upper <- upper .ret$thetaIni <- inits$THTA .scaleC <- double(length(lower)) if (is.null(control$scaleC)) { .scaleC <- rep(NA_real_, length(lower)) } else { .scaleC <- as.double(control$scaleC) if (length(lower) > length(.scaleC)) { .scaleC <- c(.scaleC, rep(NA_real_, length(lower) - length(.scaleC))) } else if (length(lower) < length(.scaleC)) { .scaleC <- .scaleC[seq(1, length(lower))] warning("scaleC control option has more options than estimated population parameters, please check.") } } .ret$scaleC <- .scaleC if (exists("uif", envir = .ret)) { .ini <- as.data.frame(.ret$uif$ini)[!is.na(.ret$uif$ini$err), c("est", "err", "ntheta")] for (.i in seq_along(.ini$err)) { if (is.na(.ret$scaleC[.ini$ntheta[.i]])) { if (any(.ini$err[.i] == c("boxCox", "yeoJohnson", "pow2", "tbs", "tbsYj"))) { .ret$scaleC[.ini$ntheta[.i]] <- 1 } else if (any(.ini$err[.i] == c("prop", "add", "norm", "dnorm", "logn", "dlogn", "lnorm", "dlnorm"))) { .ret$scaleC[.ini$ntheta[.i]] <- 0.5 * abs(.ini$est[.i]) } } } for (.i in .ini$model$extraProps$powTheta) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- 1 } .ini <- as.data.frame(.ret$uif$ini) for (.i in .ini$model$extraProps$factorial) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i] + 1)) } for (.i in .ini$model$extraProps$gamma) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i])) } for (.i in .ini$model$extraProps$log) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- log(abs(.ini$est[.i])) * abs(.ini$est[.i]) } for (.i in .ret$logitThetas) { .b <- .ret$logitThetasLow[.i] .c <- .ret$logitThetasHi[.i] .a <- .ini$est[.i] if (is.na(.ret$scaleC[.i])) { .ret$scaleC[.i] <- 1 * (-.b + .c) * exp(-.a)/((1 + exp(-.a))^2 * (.b + 1 * (-.b + .c)/(1 + exp(-.a)))) } } } names(.ret$thetaIni) <- sprintf("THETA[%d]", seq_along(.ret$thetaIni)) if (is.null(etaMat) & !is.null(control$etaMat)) { .ret$etaMat <- control$etaMat } else { .ret$etaMat <- etaMat } .ret$setupTime <- (proc.time() - .pt)["elapsed"] if (exists("uif", envir = .ret)) { .tmp <- .ret$uif$logThetasList .ret$logThetas <- .tmp[[1]] .ret$logThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasList .ret$logitThetas <- .tmp[[1]] .ret$logitThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListLow .ret$logitThetasLow <- .tmp[[1]] .ret$logitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListHi .ret$logitThetasHi <- .tmp[[1]] .ret$logitThetasHiF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasList .ret$probitThetas <- .tmp[[1]] .ret$probitThetasF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListLow .ret$probitThetasLow <- .tmp[[1]] .ret$probitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListHi .ret$probitThetasHi <- .tmp[[1]] .ret$probitThetasHiF <- .tmp[[2]] } else { .ret$logThetasF <- integer(0) .ret$logitThetasF <- integer(0) .ret$logitThetasHiF <- numeric(0) .ret$logitThetasLowF <- numeric(0) .ret$logitThetas <- integer(0) .ret$logitThetasHi <- numeric(0) .ret$logitThetasLow <- numeric(0) .ret$probitThetasF <- integer(0) .ret$probitThetasHiF <- numeric(0) .ret$probitThetasLowF <- numeric(0) .ret$probitThetas <- integer(0) .ret$probitThetasHi <- numeric(0) .ret$probitThetasLow <- numeric(0) } if (exists("noLik", envir = .ret)) { if (!.ret$noLik) { .ret$.params <- c(sprintf("THETA[%d]", seq_along(.ret$thetaIni)), sprintf("ETA[%d]", seq(1, dim(.om0)[1]))) .ret$.thetan <- length(.ret$thetaIni) .ret$nobs <- sum(data$EVID == 0) } } .ret$control$printTop <- TRUE .ret$control$nF <- 0 .est0 <- .ret$thetaIni if (!is.null(.ret$model$pred.nolhs)) { .ret$control$predNeq <- length(.ret$model$pred.nolhs$state) } else { .ret$control$predNeq <- 0L } .fitFun <- function(.ret) { this.env <- environment() assign("err", "theta reset", this.env) while (this.env$err == "theta reset") { assign("err", "", this.env) .ret0 <- tryCatch({ foceiFitCpp_(.ret) }, error = function(e) { if (regexpr("theta reset", e$message) != -1) { assign("zeroOuter", FALSE, this.env) assign("zeroGrad", FALSE, this.env) if (regexpr("theta reset0", e$message) != -1) { assign("zeroGrad", TRUE, this.env) } else if (regexpr("theta resetZ", e$message) != -1) { assign("zeroOuter", TRUE, this.env) } assign("err", "theta reset", this.env) } else { assign("err", e$message, this.env) } }) if (this.env$err == "theta reset") { .nm <- names(.ret$thetaIni) .ret$thetaIni <- setNames(.thetaReset$thetaIni + 0, .nm) .ret$rxInv$theta <- .thetaReset$omegaTheta .ret$control$printTop <- FALSE .ret$etaMat <- .thetaReset$etaMat .ret$control$etaMat <- .thetaReset$etaMat .ret$control$maxInnerIterations <- .thetaReset$maxInnerIterations .ret$control$nF <- .thetaReset$nF .ret$control$gillRetC <- .thetaReset$gillRetC .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillDf <- .thetaReset$gillDf .ret$control$gillDf2 <- .thetaReset$gillDf2 .ret$control$gillErr <- .thetaReset$gillErr .ret$control$rEps <- .thetaReset$rEps .ret$control$aEps <- .thetaReset$aEps .ret$control$rEpsC <- .thetaReset$rEpsC .ret$control$aEpsC <- .thetaReset$aEpsC .ret$control$c1 <- .thetaReset$c1 .ret$control$c2 <- .thetaReset$c2 if (this.env$zeroOuter) { message("Posthoc reset") .ret$control$maxOuterIterations <- 0L } else if (this.env$zeroGrad) { message("Theta reset (zero gradient values); Switch to bobyqa") RxODE::rxReq("minqa") .ret$control$outerOptFun <- .bobyqa .ret$control$outerOpt <- -1L } else { message("Theta reset (ETA drift)") } } } if (this.env$err != "") { stop(this.env$err) } else { return(.ret0) } } .ret0 <- try(.fitFun(.ret)) .n <- 1 while (inherits(.ret0, "try-error") && control$maxOuterIterations != 0 && .n <= control$nRetries) { message(sprintf("Restart %s", .n)) .ret$control$nF <- 0 .estNew <- .est0 + 0.2 * .n * abs(.est0) * stats::runif(length(.est0)) - 0.1 * .n .estNew <- sapply(seq_along(.est0), function(.i) { if (.ret$thetaFixed[.i]) { return(.est0[.i]) } else if (.estNew[.i] < lower[.i]) { return(lower + (.Machine$double.eps)^(1/7)) } else if (.estNew[.i] > upper[.i]) { return(upper - (.Machine$double.eps)^(1/7)) } else { return(.estNew[.i]) } }) .ret$thetaIni <- .estNew .ret0 <- try(.fitFun(.ret)) .n <- .n + 1 } if (inherits(.ret0, "try-error")) stop("Could not fit data.") .ret <- .ret0 if (exists("parHistData", .ret)) { .tmp <- .ret$parHistData .tmp <- .tmp[.tmp$type == "Unscaled", names(.tmp) != "type"] .iter <- .tmp$iter .tmp <- .tmp[, names(.tmp) != "iter"] .ret$parHistStacked <- data.frame(stack(.tmp), iter = .iter) names(.ret$parHistStacked) <- c("val", "par", "iter") .ret$parHist <- data.frame(iter = .iter, .tmp) } if (.mixed) { .etas <- .ret$ranef .thetas <- .ret$fixef .pars <- .Call(`_nlmixr_nlmixrParameters`, .thetas, .etas) .ret$shrink <- .Call(`_nlmixr_calcShrinkOnly`, .ret$omega, .pars$eta.lst, length(.etas$ID)) .updateParFixed(.ret) } else { .updateParFixed(.ret) } if (!exists("table", .ret)) { .ret$table <- tableControl() } if (control$calcTables) { .ret <- addTable(.ret, updateObject = "no", keep = keep, drop = drop, table = .ret$table) } .ret})(data = dat, inits = .FoceiInits, PKpars = .pars, model = .mod, pred = function() { return(nlmixr_pred) }, err = uif$error, lower = uif$focei.lower, upper = uif$focei.upper, fixed = uif$focei.fixed, thetaNames = uif$focei.names, etaNames = uif$eta.names, control = control, env = env, keep = .keep, drop = .drop): Not all the covariates are in the dataset.
#> Error in (function (data, inits, PKpars, model = NULL, pred = NULL, err = NULL, lower = -Inf, upper = Inf, fixed = NULL, skipCov = NULL, control = foceiControl(), thetaNames = NULL, etaNames = NULL, etaMat = NULL, ..., env = NULL, keep = NULL, drop = NULL) { set.seed(control$seed) .pt <- proc.time() RxODE::.setWarnIdSort(FALSE) on.exit(RxODE::.setWarnIdSort(TRUE)) loadNamespace("n1qn1") if (!RxODE::rxIs(control, "foceiControl")) { control <- do.call(foceiControl, control) } if (is.null(env)) { .ret <- new.env(parent = emptyenv()) } else { .ret <- env } .ret$origData <- data .ret$etaNames <- etaNames .ret$thetaFixed <- fixed .ret$control <- control .ret$control$focei.mu.ref <- integer(0) if (is(model, "RxODE") || is(model, "character")) { .ret$ODEmodel <- TRUE if (class(pred) != "function") { stop("pred must be a function specifying the prediction variables in this model.") } } else { .ret$ODEmodel <- TRUE model <- RxODE::rxGetLin(PKpars) pred <- eval(parse(text = "function(){return(Central);}")) } .square <- function(x) x * x .ret$diagXformInv <- c(sqrt = ".square", log = "exp", identity = "identity")[control$diagXform] if (is.null(err)) { err <- eval(parse(text = paste0("function(){err", paste(inits$ERROR[[1]], collapse = ""), "}"))) } .covNames <- .parNames <- c() .ret$adjLik <- control$adjLik .mixed <- !is.null(inits$OMGA) && length(inits$OMGA) > 0 if (!exists("noLik", envir = .ret)) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ssAtol <- rep(control$ssAtol, length(RxODE::rxModelVars(model)$state)) .ssRtol <- rep(control$ssRtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = (control$derivMethod == 2L), pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, interaction = (control$interaction == 1L), only.numeric = !.mixed, run.internal = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol .ssAtol <- c(.ssAtol, rep(control$ssAtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssAtol))) .ssRtol <- c(.ssRtol, rep(control$ssRtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssRtol))) .ret$control$rxControl$ssAtol <- .ssAtol .ret$control$rxControl$ssRtol <- .ssRtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { if (.ret$noLik) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = FALSE, pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, run.internal = TRUE, only.numeric = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { .extraPars <- NULL } } .ret$skipCov <- skipCov if (is.null(skipCov)) { if (is.null(fixed)) { .tmp <- rep(FALSE, length(inits$THTA)) } else { if (length(fixed) < length(inits$THTA)) { .tmp <- c(fixed, rep(FALSE, length(inits$THTA) - length(fixed))) } else { .tmp <- fixed[1:length(inits$THTA)] } } if (exists("uif", envir = .ret)) { .uifErr <- .ret$uif$ini$err[!is.na(.ret$uif$ini$ntheta)] .uifErr <- sapply(.uifErr, function(x) { if (is.na(x)) { return(FALSE) } return(!any(x == c("pow2", "tbs", "tbsYj"))) }) .tmp <- (.tmp | .uifErr) } .ret$skipCov <- c(.tmp, rep(TRUE, length(.extraPars))) .ret$control$focei.mu.ref <- .ret$uif$focei.mu.ref } if (is.null(.extraPars)) { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA))) } else { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA)), sprintf("ERR[%s]", seq_along(.extraPars))) } if (!is.null(thetaNames) && (length(inits$THTA) + length(.extraPars)) == length(thetaNames)) { .nms <- thetaNames } .ret$thetaNames <- .nms .thetaReset$thetaNames <- .nms if (length(lower) == 1) { lower <- rep(lower, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { print(inits$THTA) print(lower) stop("Lower must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (length(upper) == 1) { upper <- rep(upper, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { stop("Upper must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (!is.null(.extraPars)) { .ret$model$extra.pars <- eval(call(control$diagXform, .ret$model$extra.pars)) if (length(.ret$model$extra.pars) > 0) { inits$THTA <- c(inits$THTA, .ret$model$extra.pars) .lowerErr <- rep(control$atol[1] * 10, length(.ret$model$extra.pars)) .upperErr <- rep(Inf, length(.ret$model$extra.pars)) lower <- c(lower, .lowerErr) upper <- c(upper, .upperErr) } } if (is.null(data$ID)) stop("\"ID\" not found in data") if (is.null(data$DV)) stop("\"DV\" not found in data") if (is.null(data$EVID)) data$EVID <- 0 if (is.null(data$AMT)) data$AMT <- 0 for (.v in c("TIME", "AMT", "DV", .covNames)) { data[[.v]] <- as.double(data[[.v]]) } .ret$dataSav <- data .ds <- data[data$EVID != 0 & data$EVID != 2, c("ID", "TIME", "AMT", "EVID", .covNames)] .w <- which(tolower(names(data)) == "limit") .limitName <- NULL if (length(.w) == 1L) { .limitName <- names(data)[.w] } .censName <- NULL .w <- which(tolower(names(data)) == "cens") if (length(.w) == 1L) { .censName <- names(data[.w]) } data <- data[data$EVID == 0 | data$EVID == 2, c("ID", "TIME", "DV", "EVID", .covNames, .limitName, .censName)] .w <- which(!(names(.ret$dataSav) %in% c(.covNames, keep))) names(.ret$dataSav)[.w] <- tolower(names(.ret$dataSav[.w])) if (.mixed) { .lh <- .parseOM(inits$OMGA) .nlh <- sapply(.lh, length) .osplt <- rep(1:length(.lh), .nlh) .lini <- list(inits$THTA, unlist(.lh)) .nlini <- sapply(.lini, length) .nsplt <- rep(1:length(.lini), .nlini) .om0 <- .genOM(.lh) if (length(etaNames) == dim(.om0)[1]) { .ret$etaNames <- .ret$etaNames } else { .ret$etaNames <- sprintf("ETA[%d]", seq(1, dim(.om0)[1])) } .ret$rxInv <- RxODE::rxSymInvCholCreate(mat = .om0, diag.xform = control$diagXform) .ret$xType <- .ret$rxInv$xType .om0a <- .om0 .om0a <- .om0a/control$diagOmegaBoundLower .om0b <- .om0 .om0b <- .om0b * control$diagOmegaBoundUpper .om0a <- RxODE::rxSymInvCholCreate(mat = .om0a, diag.xform = control$diagXform) .om0b <- RxODE::rxSymInvCholCreate(mat = .om0b, diag.xform = control$diagXform) .omdf <- data.frame(a = .om0a$theta, m = .ret$rxInv$theta, b = .om0b$theta, diag = .om0a$theta.diag) .omdf$lower <- with(.omdf, ifelse(a > b, b, a)) .omdf$lower <- with(.omdf, ifelse(lower == m, -Inf, lower)) .omdf$lower <- with(.omdf, ifelse(!diag, -Inf, lower)) .omdf$upper <- with(.omdf, ifelse(a < b, b, a)) .omdf$upper <- with(.omdf, ifelse(upper == m, Inf, upper)) .omdf$upper <- with(.omdf, ifelse(!diag, Inf, upper)) .ret$control$nomega <- length(.omdf$lower) .ret$control$neta <- sum(.omdf$diag) .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) lower <- c(lower, .omdf$lower) upper <- c(upper, .omdf$upper) } else { .ret$control$nomega <- 0 .ret$control$neta <- 0 .ret$xType <- -1 .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) } .ret$lower <- lower .ret$upper <- upper .ret$thetaIni <- inits$THTA .scaleC <- double(length(lower)) if (is.null(control$scaleC)) { .scaleC <- rep(NA_real_, length(lower)) } else { .scaleC <- as.double(control$scaleC) if (length(lower) > length(.scaleC)) { .scaleC <- c(.scaleC, rep(NA_real_, length(lower) - length(.scaleC))) } else if (length(lower) < length(.scaleC)) { .scaleC <- .scaleC[seq(1, length(lower))] warning("scaleC control option has more options than estimated population parameters, please check.") } } .ret$scaleC <- .scaleC if (exists("uif", envir = .ret)) { .ini <- as.data.frame(.ret$uif$ini)[!is.na(.ret$uif$ini$err), c("est", "err", "ntheta")] for (.i in seq_along(.ini$err)) { if (is.na(.ret$scaleC[.ini$ntheta[.i]])) { if (any(.ini$err[.i] == c("boxCox", "yeoJohnson", "pow2", "tbs", "tbsYj"))) { .ret$scaleC[.ini$ntheta[.i]] <- 1 } else if (any(.ini$err[.i] == c("prop", "add", "norm", "dnorm", "logn", "dlogn", "lnorm", "dlnorm"))) { .ret$scaleC[.ini$ntheta[.i]] <- 0.5 * abs(.ini$est[.i]) } } } for (.i in .ini$model$extraProps$powTheta) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- 1 } .ini <- as.data.frame(.ret$uif$ini) for (.i in .ini$model$extraProps$factorial) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i] + 1)) } for (.i in .ini$model$extraProps$gamma) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i])) } for (.i in .ini$model$extraProps$log) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- log(abs(.ini$est[.i])) * abs(.ini$est[.i]) } for (.i in .ret$logitThetas) { .b <- .ret$logitThetasLow[.i] .c <- .ret$logitThetasHi[.i] .a <- .ini$est[.i] if (is.na(.ret$scaleC[.i])) { .ret$scaleC[.i] <- 1 * (-.b + .c) * exp(-.a)/((1 + exp(-.a))^2 * (.b + 1 * (-.b + .c)/(1 + exp(-.a)))) } } } names(.ret$thetaIni) <- sprintf("THETA[%d]", seq_along(.ret$thetaIni)) if (is.null(etaMat) & !is.null(control$etaMat)) { .ret$etaMat <- control$etaMat } else { .ret$etaMat <- etaMat } .ret$setupTime <- (proc.time() - .pt)["elapsed"] if (exists("uif", envir = .ret)) { .tmp <- .ret$uif$logThetasList .ret$logThetas <- .tmp[[1]] .ret$logThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasList .ret$logitThetas <- .tmp[[1]] .ret$logitThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListLow .ret$logitThetasLow <- .tmp[[1]] .ret$logitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListHi .ret$logitThetasHi <- .tmp[[1]] .ret$logitThetasHiF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasList .ret$probitThetas <- .tmp[[1]] .ret$probitThetasF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListLow .ret$probitThetasLow <- .tmp[[1]] .ret$probitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListHi .ret$probitThetasHi <- .tmp[[1]] .ret$probitThetasHiF <- .tmp[[2]] } else { .ret$logThetasF <- integer(0) .ret$logitThetasF <- integer(0) .ret$logitThetasHiF <- numeric(0) .ret$logitThetasLowF <- numeric(0) .ret$logitThetas <- integer(0) .ret$logitThetasHi <- numeric(0) .ret$logitThetasLow <- numeric(0) .ret$probitThetasF <- integer(0) .ret$probitThetasHiF <- numeric(0) .ret$probitThetasLowF <- numeric(0) .ret$probitThetas <- integer(0) .ret$probitThetasHi <- numeric(0) .ret$probitThetasLow <- numeric(0) } if (exists("noLik", envir = .ret)) { if (!.ret$noLik) { .ret$.params <- c(sprintf("THETA[%d]", seq_along(.ret$thetaIni)), sprintf("ETA[%d]", seq(1, dim(.om0)[1]))) .ret$.thetan <- length(.ret$thetaIni) .ret$nobs <- sum(data$EVID == 0) } } .ret$control$printTop <- TRUE .ret$control$nF <- 0 .est0 <- .ret$thetaIni if (!is.null(.ret$model$pred.nolhs)) { .ret$control$predNeq <- length(.ret$model$pred.nolhs$state) } else { .ret$control$predNeq <- 0L } .fitFun <- function(.ret) { this.env <- environment() assign("err", "theta reset", this.env) while (this.env$err == "theta reset") { assign("err", "", this.env) .ret0 <- tryCatch({ foceiFitCpp_(.ret) }, error = function(e) { if (regexpr("theta reset", e$message) != -1) { assign("zeroOuter", FALSE, this.env) assign("zeroGrad", FALSE, this.env) if (regexpr("theta reset0", e$message) != -1) { assign("zeroGrad", TRUE, this.env) } else if (regexpr("theta resetZ", e$message) != -1) { assign("zeroOuter", TRUE, this.env) } assign("err", "theta reset", this.env) } else { assign("err", e$message, this.env) } }) if (this.env$err == "theta reset") { .nm <- names(.ret$thetaIni) .ret$thetaIni <- setNames(.thetaReset$thetaIni + 0, .nm) .ret$rxInv$theta <- .thetaReset$omegaTheta .ret$control$printTop <- FALSE .ret$etaMat <- .thetaReset$etaMat .ret$control$etaMat <- .thetaReset$etaMat .ret$control$maxInnerIterations <- .thetaReset$maxInnerIterations .ret$control$nF <- .thetaReset$nF .ret$control$gillRetC <- .thetaReset$gillRetC .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillDf <- .thetaReset$gillDf .ret$control$gillDf2 <- .thetaReset$gillDf2 .ret$control$gillErr <- .thetaReset$gillErr .ret$control$rEps <- .thetaReset$rEps .ret$control$aEps <- .thetaReset$aEps .ret$control$rEpsC <- .thetaReset$rEpsC .ret$control$aEpsC <- .thetaReset$aEpsC .ret$control$c1 <- .thetaReset$c1 .ret$control$c2 <- .thetaReset$c2 if (this.env$zeroOuter) { message("Posthoc reset") .ret$control$maxOuterIterations <- 0L } else if (this.env$zeroGrad) { message("Theta reset (zero gradient values); Switch to bobyqa") RxODE::rxReq("minqa") .ret$control$outerOptFun <- .bobyqa .ret$control$outerOpt <- -1L } else { message("Theta reset (ETA drift)") } } } if (this.env$err != "") { stop(this.env$err) } else { return(.ret0) } } .ret0 <- try(.fitFun(.ret)) .n <- 1 while (inherits(.ret0, "try-error") && control$maxOuterIterations != 0 && .n <= control$nRetries) { message(sprintf("Restart %s", .n)) .ret$control$nF <- 0 .estNew <- .est0 + 0.2 * .n * abs(.est0) * stats::runif(length(.est0)) - 0.1 * .n .estNew <- sapply(seq_along(.est0), function(.i) { if (.ret$thetaFixed[.i]) { return(.est0[.i]) } else if (.estNew[.i] < lower[.i]) { return(lower + (.Machine$double.eps)^(1/7)) } else if (.estNew[.i] > upper[.i]) { return(upper - (.Machine$double.eps)^(1/7)) } else { return(.estNew[.i]) } }) .ret$thetaIni <- .estNew .ret0 <- try(.fitFun(.ret)) .n <- .n + 1 } if (inherits(.ret0, "try-error")) stop("Could not fit data.") .ret <- .ret0 if (exists("parHistData", .ret)) { .tmp <- .ret$parHistData .tmp <- .tmp[.tmp$type == "Unscaled", names(.tmp) != "type"] .iter <- .tmp$iter .tmp <- .tmp[, names(.tmp) != "iter"] .ret$parHistStacked <- data.frame(stack(.tmp), iter = .iter) names(.ret$parHistStacked) <- c("val", "par", "iter") .ret$parHist <- data.frame(iter = .iter, .tmp) } if (.mixed) { .etas <- .ret$ranef .thetas <- .ret$fixef .pars <- .Call(`_nlmixr_nlmixrParameters`, .thetas, .etas) .ret$shrink <- .Call(`_nlmixr_calcShrinkOnly`, .ret$omega, .pars$eta.lst, length(.etas$ID)) .updateParFixed(.ret) } else { .updateParFixed(.ret) } if (!exists("table", .ret)) { .ret$table <- tableControl() } if (control$calcTables) { .ret <- addTable(.ret, updateObject = "no", keep = keep, drop = drop, table = .ret$table) } .ret})(data = dat, inits = .FoceiInits, PKpars = .pars, model = .mod, pred = function() { return(nlmixr_pred) }, err = uif$error, lower = uif$focei.lower, upper = uif$focei.upper, fixed = uif$focei.fixed, thetaNames = uif$focei.names, etaNames = uif$eta.names, control = control, env = env, keep = .keep, drop = .drop): Not all the covariates are in the dataset.
#> parameter labels from comments are typically ignored in non-interactive mode
#> Need to run with the source intact to parse comments
#>
#> Error in configsaem(model = model, data = dat, inits = inits, mcmc = .mcmc, ODEopt = .ODEopt, seed = .seed, distribution = .dist, DEBUG = .DEBUG, addProp = .addProp, tol = .tol, itmax = .itmax, type = .type, powRange = .powRange, lambdaRange = .lambdaRange): covariate(s) not found: f_parent_to_A1
#> Timing stopped at: 0.782 0.02 0.803
f_nlmixr_fomc_sfo_focei_obs_tc <- nlmixr(f_mmkin_tc["FOMC-SFO", ], est = "focei", +
#> parameter labels from comments are typically ignored in non-interactive mode
#> Need to run with the source intact to parse comments
#>
#> Error in configsaem(model = model, data = dat, inits = inits, mcmc = .mcmc, ODEopt = .ODEopt, seed = .seed, distribution = .dist, DEBUG = .DEBUG, addProp = .addProp, tol = .tol, itmax = .itmax, type = .type, powRange = .powRange, lambdaRange = .lambdaRange): covariate(s) not found: f_parent_to_A1
#> Timing stopped at: 0.775 0.024 0.799
f_nlmixr_fomc_sfo_focei_obs_tc <- nlmixr(f_mmkin_tc["FOMC-SFO", ], est = "focei", error_model = "obs_tc")
#> parameter labels from comments are typically ignored in non-interactive mode
#> Need to run with the source intact to parse comments
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → calculate jacobian
#>
#> → calculate sensitivities
#>
#> → calculate ∂(f)/∂(η)
#>
#> → calculate ∂(R²)/∂(η)
#>
#> → finding duplicate expressions in inner model...
#>
#> → optimizing duplicate expressions in inner model...
#>
#> → finding duplicate expressions in EBE model...
#>
#> → optimizing duplicate expressions in EBE model...
#>
#> → compiling inner model...
#>
#> done
#> → finding duplicate expressions in FD model...
#>
#> → optimizing duplicate expressions in FD model...
#>
#> → compiling EBE model...
#>
#> done
#> → compiling events FD model...
#>
#> done
#> Model:
#> cmt(parent); #> cmt(A1); @@ -4889,9 +795,9 @@ obtained by fitting the same model to a list of datasets using beta=exp(rx_expr_8); #> f_parent=1/(1+exp(-(ETA[3]+THETA[3]))); #> tad=tad(); -#> dosenum=dosenum();
#> Error in (function (data, inits, PKpars, model = NULL, pred = NULL, err = NULL, lower = -Inf, upper = Inf, fixed = NULL, skipCov = NULL, control = foceiControl(), thetaNames = NULL, etaNames = NULL, etaMat = NULL, ..., env = NULL, keep = NULL, drop = NULL) { set.seed(control$seed) .pt <- proc.time() RxODE::.setWarnIdSort(FALSE) on.exit(RxODE::.setWarnIdSort(TRUE)) loadNamespace("n1qn1") if (!RxODE::rxIs(control, "foceiControl")) { control <- do.call(foceiControl, control) } if (is.null(env)) { .ret <- new.env(parent = emptyenv()) } else { .ret <- env } .ret$origData <- data .ret$etaNames <- etaNames .ret$thetaFixed <- fixed .ret$control <- control .ret$control$focei.mu.ref <- integer(0) if (is(model, "RxODE") || is(model, "character")) { .ret$ODEmodel <- TRUE if (class(pred) != "function") { stop("pred must be a function specifying the prediction variables in this model.") } } else { .ret$ODEmodel <- TRUE model <- RxODE::rxGetLin(PKpars) pred <- eval(parse(text = "function(){return(Central);}")) } .square <- function(x) x * x .ret$diagXformInv <- c(sqrt = ".square", log = "exp", identity = "identity")[control$diagXform] if (is.null(err)) { err <- eval(parse(text = paste0("function(){err", paste(inits$ERROR[[1]], collapse = ""), "}"))) } .covNames <- .parNames <- c() .ret$adjLik <- control$adjLik .mixed <- !is.null(inits$OMGA) && length(inits$OMGA) > 0 if (!exists("noLik", envir = .ret)) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ssAtol <- rep(control$ssAtol, length(RxODE::rxModelVars(model)$state)) .ssRtol <- rep(control$ssRtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = (control$derivMethod == 2L), pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, interaction = (control$interaction == 1L), only.numeric = !.mixed, run.internal = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol .ssAtol <- c(.ssAtol, rep(control$ssAtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssAtol))) .ssRtol <- c(.ssRtol, rep(control$ssRtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssRtol))) .ret$control$rxControl$ssAtol <- .ssAtol .ret$control$rxControl$ssRtol <- .ssRtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { if (.ret$noLik) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = FALSE, pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, run.internal = TRUE, only.numeric = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { .extraPars <- NULL } } .ret$skipCov <- skipCov if (is.null(skipCov)) { if (is.null(fixed)) { .tmp <- rep(FALSE, length(inits$THTA)) } else { if (length(fixed) < length(inits$THTA)) { .tmp <- c(fixed, rep(FALSE, length(inits$THTA) - length(fixed))) } else { .tmp <- fixed[1:length(inits$THTA)] } } if (exists("uif", envir = .ret)) { .uifErr <- .ret$uif$ini$err[!is.na(.ret$uif$ini$ntheta)] .uifErr <- sapply(.uifErr, function(x) { if (is.na(x)) { return(FALSE) } return(!any(x == c("pow2", "tbs", "tbsYj"))) }) .tmp <- (.tmp | .uifErr) } .ret$skipCov <- c(.tmp, rep(TRUE, length(.extraPars))) .ret$control$focei.mu.ref <- .ret$uif$focei.mu.ref } if (is.null(.extraPars)) { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA))) } else { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA)), sprintf("ERR[%s]", seq_along(.extraPars))) } if (!is.null(thetaNames) && (length(inits$THTA) + length(.extraPars)) == length(thetaNames)) { .nms <- thetaNames } .ret$thetaNames <- .nms .thetaReset$thetaNames <- .nms if (length(lower) == 1) { lower <- rep(lower, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { print(inits$THTA) print(lower) stop("Lower must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (length(upper) == 1) { upper <- rep(upper, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { stop("Upper must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (!is.null(.extraPars)) { .ret$model$extra.pars <- eval(call(control$diagXform, .ret$model$extra.pars)) if (length(.ret$model$extra.pars) > 0) { inits$THTA <- c(inits$THTA, .ret$model$extra.pars) .lowerErr <- rep(control$atol[1] * 10, length(.ret$model$extra.pars)) .upperErr <- rep(Inf, length(.ret$model$extra.pars)) lower <- c(lower, .lowerErr) upper <- c(upper, .upperErr) } } if (is.null(data$ID)) stop("\"ID\" not found in data") if (is.null(data$DV)) stop("\"DV\" not found in data") if (is.null(data$EVID)) data$EVID <- 0 if (is.null(data$AMT)) data$AMT <- 0 for (.v in c("TIME", "AMT", "DV", .covNames)) { data[[.v]] <- as.double(data[[.v]]) } .ret$dataSav <- data .ds <- data[data$EVID != 0 & data$EVID != 2, c("ID", "TIME", "AMT", "EVID", .covNames)] .w <- which(tolower(names(data)) == "limit") .limitName <- NULL if (length(.w) == 1L) { .limitName <- names(data)[.w] } .censName <- NULL .w <- which(tolower(names(data)) == "cens") if (length(.w) == 1L) { .censName <- names(data[.w]) } data <- data[data$EVID == 0 | data$EVID == 2, c("ID", "TIME", "DV", "EVID", .covNames, .limitName, .censName)] .w <- which(!(names(.ret$dataSav) %in% c(.covNames, keep))) names(.ret$dataSav)[.w] <- tolower(names(.ret$dataSav[.w])) if (.mixed) { .lh <- .parseOM(inits$OMGA) .nlh <- sapply(.lh, length) .osplt <- rep(1:length(.lh), .nlh) .lini <- list(inits$THTA, unlist(.lh)) .nlini <- sapply(.lini, length) .nsplt <- rep(1:length(.lini), .nlini) .om0 <- .genOM(.lh) if (length(etaNames) == dim(.om0)[1]) { .ret$etaNames <- .ret$etaNames } else { .ret$etaNames <- sprintf("ETA[%d]", seq(1, dim(.om0)[1])) } .ret$rxInv <- RxODE::rxSymInvCholCreate(mat = .om0, diag.xform = control$diagXform) .ret$xType <- .ret$rxInv$xType .om0a <- .om0 .om0a <- .om0a/control$diagOmegaBoundLower .om0b <- .om0 .om0b <- .om0b * control$diagOmegaBoundUpper .om0a <- RxODE::rxSymInvCholCreate(mat = .om0a, diag.xform = control$diagXform) .om0b <- RxODE::rxSymInvCholCreate(mat = .om0b, diag.xform = control$diagXform) .omdf <- data.frame(a = .om0a$theta, m = .ret$rxInv$theta, b = .om0b$theta, diag = .om0a$theta.diag) .omdf$lower <- with(.omdf, ifelse(a > b, b, a)) .omdf$lower <- with(.omdf, ifelse(lower == m, -Inf, lower)) .omdf$lower <- with(.omdf, ifelse(!diag, -Inf, lower)) .omdf$upper <- with(.omdf, ifelse(a < b, b, a)) .omdf$upper <- with(.omdf, ifelse(upper == m, Inf, upper)) .omdf$upper <- with(.omdf, ifelse(!diag, Inf, upper)) .ret$control$nomega <- length(.omdf$lower) .ret$control$neta <- sum(.omdf$diag) .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) lower <- c(lower, .omdf$lower) upper <- c(upper, .omdf$upper) } else { .ret$control$nomega <- 0 .ret$control$neta <- 0 .ret$xType <- -1 .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) } .ret$lower <- lower .ret$upper <- upper .ret$thetaIni <- inits$THTA .scaleC <- double(length(lower)) if (is.null(control$scaleC)) { .scaleC <- rep(NA_real_, length(lower)) } else { .scaleC <- as.double(control$scaleC) if (length(lower) > length(.scaleC)) { .scaleC <- c(.scaleC, rep(NA_real_, length(lower) - length(.scaleC))) } else if (length(lower) < length(.scaleC)) { .scaleC <- .scaleC[seq(1, length(lower))] warning("scaleC control option has more options than estimated population parameters, please check.") } } .ret$scaleC <- .scaleC if (exists("uif", envir = .ret)) { .ini <- as.data.frame(.ret$uif$ini)[!is.na(.ret$uif$ini$err), c("est", "err", "ntheta")] for (.i in seq_along(.ini$err)) { if (is.na(.ret$scaleC[.ini$ntheta[.i]])) { if (any(.ini$err[.i] == c("boxCox", "yeoJohnson", "pow2", "tbs", "tbsYj"))) { .ret$scaleC[.ini$ntheta[.i]] <- 1 } else if (any(.ini$err[.i] == c("prop", "add", "norm", "dnorm", "logn", "dlogn", "lnorm", "dlnorm"))) { .ret$scaleC[.ini$ntheta[.i]] <- 0.5 * abs(.ini$est[.i]) } } } for (.i in .ini$model$extraProps$powTheta) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- 1 } .ini <- as.data.frame(.ret$uif$ini) for (.i in .ini$model$extraProps$factorial) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i] + 1)) } for (.i in .ini$model$extraProps$gamma) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i])) } for (.i in .ini$model$extraProps$log) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- log(abs(.ini$est[.i])) * abs(.ini$est[.i]) } for (.i in .ret$logitThetas) { .b <- .ret$logitThetasLow[.i] .c <- .ret$logitThetasHi[.i] .a <- .ini$est[.i] if (is.na(.ret$scaleC[.i])) { .ret$scaleC[.i] <- 1 * (-.b + .c) * exp(-.a)/((1 + exp(-.a))^2 * (.b + 1 * (-.b + .c)/(1 + exp(-.a)))) } } } names(.ret$thetaIni) <- sprintf("THETA[%d]", seq_along(.ret$thetaIni)) if (is.null(etaMat) & !is.null(control$etaMat)) { .ret$etaMat <- control$etaMat } else { .ret$etaMat <- etaMat } .ret$setupTime <- (proc.time() - .pt)["elapsed"] if (exists("uif", envir = .ret)) { .tmp <- .ret$uif$logThetasList .ret$logThetas <- .tmp[[1]] .ret$logThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasList .ret$logitThetas <- .tmp[[1]] .ret$logitThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListLow .ret$logitThetasLow <- .tmp[[1]] .ret$logitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListHi .ret$logitThetasHi <- .tmp[[1]] .ret$logitThetasHiF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasList .ret$probitThetas <- .tmp[[1]] .ret$probitThetasF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListLow .ret$probitThetasLow <- .tmp[[1]] .ret$probitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListHi .ret$probitThetasHi <- .tmp[[1]] .ret$probitThetasHiF <- .tmp[[2]] } else { .ret$logThetasF <- integer(0) .ret$logitThetasF <- integer(0) .ret$logitThetasHiF <- numeric(0) .ret$logitThetasLowF <- numeric(0) .ret$logitThetas <- integer(0) .ret$logitThetasHi <- numeric(0) .ret$logitThetasLow <- numeric(0) .ret$probitThetasF <- integer(0) .ret$probitThetasHiF <- numeric(0) .ret$probitThetasLowF <- numeric(0) .ret$probitThetas <- integer(0) .ret$probitThetasHi <- numeric(0) .ret$probitThetasLow <- numeric(0) } if (exists("noLik", envir = .ret)) { if (!.ret$noLik) { .ret$.params <- c(sprintf("THETA[%d]", seq_along(.ret$thetaIni)), sprintf("ETA[%d]", seq(1, dim(.om0)[1]))) .ret$.thetan <- length(.ret$thetaIni) .ret$nobs <- sum(data$EVID == 0) } } .ret$control$printTop <- TRUE .ret$control$nF <- 0 .est0 <- .ret$thetaIni if (!is.null(.ret$model$pred.nolhs)) { .ret$control$predNeq <- length(.ret$model$pred.nolhs$state) } else { .ret$control$predNeq <- 0L } .fitFun <- function(.ret) { this.env <- environment() assign("err", "theta reset", this.env) while (this.env$err == "theta reset") { assign("err", "", this.env) .ret0 <- tryCatch({ foceiFitCpp_(.ret) }, error = function(e) { if (regexpr("theta reset", e$message) != -1) { assign("zeroOuter", FALSE, this.env) assign("zeroGrad", FALSE, this.env) if (regexpr("theta reset0", e$message) != -1) { assign("zeroGrad", TRUE, this.env) } else if (regexpr("theta resetZ", e$message) != -1) { assign("zeroOuter", TRUE, this.env) } assign("err", "theta reset", this.env) } else { assign("err", e$message, this.env) } }) if (this.env$err == "theta reset") { .nm <- names(.ret$thetaIni) .ret$thetaIni <- setNames(.thetaReset$thetaIni + 0, .nm) .ret$rxInv$theta <- .thetaReset$omegaTheta .ret$control$printTop <- FALSE .ret$etaMat <- .thetaReset$etaMat .ret$control$etaMat <- .thetaReset$etaMat .ret$control$maxInnerIterations <- .thetaReset$maxInnerIterations .ret$control$nF <- .thetaReset$nF .ret$control$gillRetC <- .thetaReset$gillRetC .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillDf <- .thetaReset$gillDf .ret$control$gillDf2 <- .thetaReset$gillDf2 .ret$control$gillErr <- .thetaReset$gillErr .ret$control$rEps <- .thetaReset$rEps .ret$control$aEps <- .thetaReset$aEps .ret$control$rEpsC <- .thetaReset$rEpsC .ret$control$aEpsC <- .thetaReset$aEpsC .ret$control$c1 <- .thetaReset$c1 .ret$control$c2 <- .thetaReset$c2 if (this.env$zeroOuter) { message("Posthoc reset") .ret$control$maxOuterIterations <- 0L } else if (this.env$zeroGrad) { message("Theta reset (zero gradient values); Switch to bobyqa") RxODE::rxReq("minqa") .ret$control$outerOptFun <- .bobyqa .ret$control$outerOpt <- -1L } else { message("Theta reset (ETA drift)") } } } if (this.env$err != "") { stop(this.env$err) } else { return(.ret0) } } .ret0 <- try(.fitFun(.ret)) .n <- 1 while (inherits(.ret0, "try-error") && control$maxOuterIterations != 0 && .n <= control$nRetries) { message(sprintf("Restart %s", .n)) .ret$control$nF <- 0 .estNew <- .est0 + 0.2 * .n * abs(.est0) * stats::runif(length(.est0)) - 0.1 * .n .estNew <- sapply(seq_along(.est0), function(.i) { if (.ret$thetaFixed[.i]) { return(.est0[.i]) } else if (.estNew[.i] < lower[.i]) { return(lower + (.Machine$double.eps)^(1/7)) } else if (.estNew[.i] > upper[.i]) { return(upper - (.Machine$double.eps)^(1/7)) } else { return(.estNew[.i]) } }) .ret$thetaIni <- .estNew .ret0 <- try(.fitFun(.ret)) .n <- .n + 1 } if (inherits(.ret0, "try-error")) stop("Could not fit data.") .ret <- .ret0 if (exists("parHistData", .ret)) { .tmp <- .ret$parHistData .tmp <- .tmp[.tmp$type == "Unscaled", names(.tmp) != "type"] .iter <- .tmp$iter .tmp <- .tmp[, names(.tmp) != "iter"] .ret$parHistStacked <- data.frame(stack(.tmp), iter = .iter) names(.ret$parHistStacked) <- c("val", "par", "iter") .ret$parHist <- data.frame(iter = .iter, .tmp) } if (.mixed) { .etas <- .ret$ranef .thetas <- .ret$fixef .pars <- .Call(`_nlmixr_nlmixrParameters`, .thetas, .etas) .ret$shrink <- .Call(`_nlmixr_calcShrinkOnly`, .ret$omega, .pars$eta.lst, length(.etas$ID)) .updateParFixed(.ret) } else { .updateParFixed(.ret) } if (!exists("table", .ret)) { .ret$table <- tableControl() } if (control$calcTables) { .ret <- addTable(.ret, updateObject = "no", keep = keep, drop = drop, table = .ret$table) } .ret})(data = dat, inits = .FoceiInits, PKpars = .pars, model = .mod, pred = function() { return(nlmixr_pred) }, err = uif$error, lower = uif$focei.lower, upper = uif$focei.upper, fixed = uif$focei.fixed, thetaNames = uif$focei.names, etaNames = uif$eta.names, control = control, env = env, keep = .keep, drop = .drop): Not all the covariates are in the dataset.
f_nlmixr_dfop_sfo_saem_obs_tc <- nlmixr(f_mmkin_tc["DFOP-SFO", ], est = "saem", +#> dosenum=dosenum();
#> Needed Covariates:
#> [1] "f_parent_to_A1" "CMT"
#> Error in (function (data, inits, PKpars, model = NULL, pred = NULL, err = NULL, lower = -Inf, upper = Inf, fixed = NULL, skipCov = NULL, control = foceiControl(), thetaNames = NULL, etaNames = NULL, etaMat = NULL, ..., env = NULL, keep = NULL, drop = NULL) { set.seed(control$seed) .pt <- proc.time() RxODE::.setWarnIdSort(FALSE) on.exit(RxODE::.setWarnIdSort(TRUE)) loadNamespace("n1qn1") if (!RxODE::rxIs(control, "foceiControl")) { control <- do.call(foceiControl, control) } if (is.null(env)) { .ret <- new.env(parent = emptyenv()) } else { .ret <- env } .ret$origData <- data .ret$etaNames <- etaNames .ret$thetaFixed <- fixed .ret$control <- control .ret$control$focei.mu.ref <- integer(0) if (is(model, "RxODE") || is(model, "character")) { .ret$ODEmodel <- TRUE if (class(pred) != "function") { stop("pred must be a function specifying the prediction variables in this model.") } } else { .ret$ODEmodel <- TRUE model <- RxODE::rxGetLin(PKpars) pred <- eval(parse(text = "function(){return(Central);}")) } .square <- function(x) x * x .ret$diagXformInv <- c(sqrt = ".square", log = "exp", identity = "identity")[control$diagXform] if (is.null(err)) { err <- eval(parse(text = paste0("function(){err", paste(inits$ERROR[[1]], collapse = ""), "}"))) } .covNames <- .parNames <- c() .ret$adjLik <- control$adjLik .mixed <- !is.null(inits$OMGA) && length(inits$OMGA) > 0 if (!exists("noLik", envir = .ret)) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ssAtol <- rep(control$ssAtol, length(RxODE::rxModelVars(model)$state)) .ssRtol <- rep(control$ssRtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = (control$derivMethod == 2L), pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, interaction = (control$interaction == 1L), only.numeric = !.mixed, run.internal = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol .ssAtol <- c(.ssAtol, rep(control$ssAtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssAtol))) .ssRtol <- c(.ssRtol, rep(control$ssRtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssRtol))) .ret$control$rxControl$ssAtol <- .ssAtol .ret$control$rxControl$ssRtol <- .ssRtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { if (.ret$noLik) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = FALSE, pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, run.internal = TRUE, only.numeric = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { .extraPars <- NULL } } .ret$skipCov <- skipCov if (is.null(skipCov)) { if (is.null(fixed)) { .tmp <- rep(FALSE, length(inits$THTA)) } else { if (length(fixed) < length(inits$THTA)) { .tmp <- c(fixed, rep(FALSE, length(inits$THTA) - length(fixed))) } else { .tmp <- fixed[1:length(inits$THTA)] } } if (exists("uif", envir = .ret)) { .uifErr <- .ret$uif$ini$err[!is.na(.ret$uif$ini$ntheta)] .uifErr <- sapply(.uifErr, function(x) { if (is.na(x)) { return(FALSE) } return(!any(x == c("pow2", "tbs", "tbsYj"))) }) .tmp <- (.tmp | .uifErr) } .ret$skipCov <- c(.tmp, rep(TRUE, length(.extraPars))) .ret$control$focei.mu.ref <- .ret$uif$focei.mu.ref } if (is.null(.extraPars)) { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA))) } else { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA)), sprintf("ERR[%s]", seq_along(.extraPars))) } if (!is.null(thetaNames) && (length(inits$THTA) + length(.extraPars)) == length(thetaNames)) { .nms <- thetaNames } .ret$thetaNames <- .nms .thetaReset$thetaNames <- .nms if (length(lower) == 1) { lower <- rep(lower, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { print(inits$THTA) print(lower) stop("Lower must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (length(upper) == 1) { upper <- rep(upper, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { stop("Upper must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (!is.null(.extraPars)) { .ret$model$extra.pars <- eval(call(control$diagXform, .ret$model$extra.pars)) if (length(.ret$model$extra.pars) > 0) { inits$THTA <- c(inits$THTA, .ret$model$extra.pars) .lowerErr <- rep(control$atol[1] * 10, length(.ret$model$extra.pars)) .upperErr <- rep(Inf, length(.ret$model$extra.pars)) lower <- c(lower, .lowerErr) upper <- c(upper, .upperErr) } } if (is.null(data$ID)) stop("\"ID\" not found in data") if (is.null(data$DV)) stop("\"DV\" not found in data") if (is.null(data$EVID)) data$EVID <- 0 if (is.null(data$AMT)) data$AMT <- 0 for (.v in c("TIME", "AMT", "DV", .covNames)) { data[[.v]] <- as.double(data[[.v]]) } .ret$dataSav <- data .ds <- data[data$EVID != 0 & data$EVID != 2, c("ID", "TIME", "AMT", "EVID", .covNames)] .w <- which(tolower(names(data)) == "limit") .limitName <- NULL if (length(.w) == 1L) { .limitName <- names(data)[.w] } .censName <- NULL .w <- which(tolower(names(data)) == "cens") if (length(.w) == 1L) { .censName <- names(data[.w]) } data <- data[data$EVID == 0 | data$EVID == 2, c("ID", "TIME", "DV", "EVID", .covNames, .limitName, .censName)] .w <- which(!(names(.ret$dataSav) %in% c(.covNames, keep))) names(.ret$dataSav)[.w] <- tolower(names(.ret$dataSav[.w])) if (.mixed) { .lh <- .parseOM(inits$OMGA) .nlh <- sapply(.lh, length) .osplt <- rep(1:length(.lh), .nlh) .lini <- list(inits$THTA, unlist(.lh)) .nlini <- sapply(.lini, length) .nsplt <- rep(1:length(.lini), .nlini) .om0 <- .genOM(.lh) if (length(etaNames) == dim(.om0)[1]) { .ret$etaNames <- .ret$etaNames } else { .ret$etaNames <- sprintf("ETA[%d]", seq(1, dim(.om0)[1])) } .ret$rxInv <- RxODE::rxSymInvCholCreate(mat = .om0, diag.xform = control$diagXform) .ret$xType <- .ret$rxInv$xType .om0a <- .om0 .om0a <- .om0a/control$diagOmegaBoundLower .om0b <- .om0 .om0b <- .om0b * control$diagOmegaBoundUpper .om0a <- RxODE::rxSymInvCholCreate(mat = .om0a, diag.xform = control$diagXform) .om0b <- RxODE::rxSymInvCholCreate(mat = .om0b, diag.xform = control$diagXform) .omdf <- data.frame(a = .om0a$theta, m = .ret$rxInv$theta, b = .om0b$theta, diag = .om0a$theta.diag) .omdf$lower <- with(.omdf, ifelse(a > b, b, a)) .omdf$lower <- with(.omdf, ifelse(lower == m, -Inf, lower)) .omdf$lower <- with(.omdf, ifelse(!diag, -Inf, lower)) .omdf$upper <- with(.omdf, ifelse(a < b, b, a)) .omdf$upper <- with(.omdf, ifelse(upper == m, Inf, upper)) .omdf$upper <- with(.omdf, ifelse(!diag, Inf, upper)) .ret$control$nomega <- length(.omdf$lower) .ret$control$neta <- sum(.omdf$diag) .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) lower <- c(lower, .omdf$lower) upper <- c(upper, .omdf$upper) } else { .ret$control$nomega <- 0 .ret$control$neta <- 0 .ret$xType <- -1 .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) } .ret$lower <- lower .ret$upper <- upper .ret$thetaIni <- inits$THTA .scaleC <- double(length(lower)) if (is.null(control$scaleC)) { .scaleC <- rep(NA_real_, length(lower)) } else { .scaleC <- as.double(control$scaleC) if (length(lower) > length(.scaleC)) { .scaleC <- c(.scaleC, rep(NA_real_, length(lower) - length(.scaleC))) } else if (length(lower) < length(.scaleC)) { .scaleC <- .scaleC[seq(1, length(lower))] warning("scaleC control option has more options than estimated population parameters, please check.") } } .ret$scaleC <- .scaleC if (exists("uif", envir = .ret)) { .ini <- as.data.frame(.ret$uif$ini)[!is.na(.ret$uif$ini$err), c("est", "err", "ntheta")] for (.i in seq_along(.ini$err)) { if (is.na(.ret$scaleC[.ini$ntheta[.i]])) { if (any(.ini$err[.i] == c("boxCox", "yeoJohnson", "pow2", "tbs", "tbsYj"))) { .ret$scaleC[.ini$ntheta[.i]] <- 1 } else if (any(.ini$err[.i] == c("prop", "add", "norm", "dnorm", "logn", "dlogn", "lnorm", "dlnorm"))) { .ret$scaleC[.ini$ntheta[.i]] <- 0.5 * abs(.ini$est[.i]) } } } for (.i in .ini$model$extraProps$powTheta) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- 1 } .ini <- as.data.frame(.ret$uif$ini) for (.i in .ini$model$extraProps$factorial) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i] + 1)) } for (.i in .ini$model$extraProps$gamma) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i])) } for (.i in .ini$model$extraProps$log) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- log(abs(.ini$est[.i])) * abs(.ini$est[.i]) } for (.i in .ret$logitThetas) { .b <- .ret$logitThetasLow[.i] .c <- .ret$logitThetasHi[.i] .a <- .ini$est[.i] if (is.na(.ret$scaleC[.i])) { .ret$scaleC[.i] <- 1 * (-.b + .c) * exp(-.a)/((1 + exp(-.a))^2 * (.b + 1 * (-.b + .c)/(1 + exp(-.a)))) } } } names(.ret$thetaIni) <- sprintf("THETA[%d]", seq_along(.ret$thetaIni)) if (is.null(etaMat) & !is.null(control$etaMat)) { .ret$etaMat <- control$etaMat } else { .ret$etaMat <- etaMat } .ret$setupTime <- (proc.time() - .pt)["elapsed"] if (exists("uif", envir = .ret)) { .tmp <- .ret$uif$logThetasList .ret$logThetas <- .tmp[[1]] .ret$logThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasList .ret$logitThetas <- .tmp[[1]] .ret$logitThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListLow .ret$logitThetasLow <- .tmp[[1]] .ret$logitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListHi .ret$logitThetasHi <- .tmp[[1]] .ret$logitThetasHiF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasList .ret$probitThetas <- .tmp[[1]] .ret$probitThetasF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListLow .ret$probitThetasLow <- .tmp[[1]] .ret$probitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListHi .ret$probitThetasHi <- .tmp[[1]] .ret$probitThetasHiF <- .tmp[[2]] } else { .ret$logThetasF <- integer(0) .ret$logitThetasF <- integer(0) .ret$logitThetasHiF <- numeric(0) .ret$logitThetasLowF <- numeric(0) .ret$logitThetas <- integer(0) .ret$logitThetasHi <- numeric(0) .ret$logitThetasLow <- numeric(0) .ret$probitThetasF <- integer(0) .ret$probitThetasHiF <- numeric(0) .ret$probitThetasLowF <- numeric(0) .ret$probitThetas <- integer(0) .ret$probitThetasHi <- numeric(0) .ret$probitThetasLow <- numeric(0) } if (exists("noLik", envir = .ret)) { if (!.ret$noLik) { .ret$.params <- c(sprintf("THETA[%d]", seq_along(.ret$thetaIni)), sprintf("ETA[%d]", seq(1, dim(.om0)[1]))) .ret$.thetan <- length(.ret$thetaIni) .ret$nobs <- sum(data$EVID == 0) } } .ret$control$printTop <- TRUE .ret$control$nF <- 0 .est0 <- .ret$thetaIni if (!is.null(.ret$model$pred.nolhs)) { .ret$control$predNeq <- length(.ret$model$pred.nolhs$state) } else { .ret$control$predNeq <- 0L } .fitFun <- function(.ret) { this.env <- environment() assign("err", "theta reset", this.env) while (this.env$err == "theta reset") { assign("err", "", this.env) .ret0 <- tryCatch({ foceiFitCpp_(.ret) }, error = function(e) { if (regexpr("theta reset", e$message) != -1) { assign("zeroOuter", FALSE, this.env) assign("zeroGrad", FALSE, this.env) if (regexpr("theta reset0", e$message) != -1) { assign("zeroGrad", TRUE, this.env) } else if (regexpr("theta resetZ", e$message) != -1) { assign("zeroOuter", TRUE, this.env) } assign("err", "theta reset", this.env) } else { assign("err", e$message, this.env) } }) if (this.env$err == "theta reset") { .nm <- names(.ret$thetaIni) .ret$thetaIni <- setNames(.thetaReset$thetaIni + 0, .nm) .ret$rxInv$theta <- .thetaReset$omegaTheta .ret$control$printTop <- FALSE .ret$etaMat <- .thetaReset$etaMat .ret$control$etaMat <- .thetaReset$etaMat .ret$control$maxInnerIterations <- .thetaReset$maxInnerIterations .ret$control$nF <- .thetaReset$nF .ret$control$gillRetC <- .thetaReset$gillRetC .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillDf <- .thetaReset$gillDf .ret$control$gillDf2 <- .thetaReset$gillDf2 .ret$control$gillErr <- .thetaReset$gillErr .ret$control$rEps <- .thetaReset$rEps .ret$control$aEps <- .thetaReset$aEps .ret$control$rEpsC <- .thetaReset$rEpsC .ret$control$aEpsC <- .thetaReset$aEpsC .ret$control$c1 <- .thetaReset$c1 .ret$control$c2 <- .thetaReset$c2 if (this.env$zeroOuter) { message("Posthoc reset") .ret$control$maxOuterIterations <- 0L } else if (this.env$zeroGrad) { message("Theta reset (zero gradient values); Switch to bobyqa") RxODE::rxReq("minqa") .ret$control$outerOptFun <- .bobyqa .ret$control$outerOpt <- -1L } else { message("Theta reset (ETA drift)") } } } if (this.env$err != "") { stop(this.env$err) } else { return(.ret0) } } .ret0 <- try(.fitFun(.ret)) .n <- 1 while (inherits(.ret0, "try-error") && control$maxOuterIterations != 0 && .n <= control$nRetries) { message(sprintf("Restart %s", .n)) .ret$control$nF <- 0 .estNew <- .est0 + 0.2 * .n * abs(.est0) * stats::runif(length(.est0)) - 0.1 * .n .estNew <- sapply(seq_along(.est0), function(.i) { if (.ret$thetaFixed[.i]) { return(.est0[.i]) } else if (.estNew[.i] < lower[.i]) { return(lower + (.Machine$double.eps)^(1/7)) } else if (.estNew[.i] > upper[.i]) { return(upper - (.Machine$double.eps)^(1/7)) } else { return(.estNew[.i]) } }) .ret$thetaIni <- .estNew .ret0 <- try(.fitFun(.ret)) .n <- .n + 1 } if (inherits(.ret0, "try-error")) stop("Could not fit data.") .ret <- .ret0 if (exists("parHistData", .ret)) { .tmp <- .ret$parHistData .tmp <- .tmp[.tmp$type == "Unscaled", names(.tmp) != "type"] .iter <- .tmp$iter .tmp <- .tmp[, names(.tmp) != "iter"] .ret$parHistStacked <- data.frame(stack(.tmp), iter = .iter) names(.ret$parHistStacked) <- c("val", "par", "iter") .ret$parHist <- data.frame(iter = .iter, .tmp) } if (.mixed) { .etas <- .ret$ranef .thetas <- .ret$fixef .pars <- .Call(`_nlmixr_nlmixrParameters`, .thetas, .etas) .ret$shrink <- .Call(`_nlmixr_calcShrinkOnly`, .ret$omega, .pars$eta.lst, length(.etas$ID)) .updateParFixed(.ret) } else { .updateParFixed(.ret) } if (!exists("table", .ret)) { .ret$table <- tableControl() } if (control$calcTables) { .ret <- addTable(.ret, updateObject = "no", keep = keep, drop = drop, table = .ret$table) } .ret})(data = dat, inits = .FoceiInits, PKpars = .pars, model = .mod, pred = function() { return(nlmixr_pred) }, err = uif$error, lower = uif$focei.lower, upper = uif$focei.upper, fixed = uif$focei.fixed, thetaNames = uif$focei.names, etaNames = uif$eta.names, control = control, env = env, keep = .keep, drop = .drop): Not all the covariates are in the dataset.
#> Timing stopped at: 8.173 0.386 8.556
f_nlmixr_dfop_sfo_saem_obs_tc <- nlmixr(f_mmkin_tc["DFOP-SFO", ], est = "saem", error_model = "obs_tc") -
#> parameter labels from comments are typically ignored in non-interactive mode
#> Need to run with the source intact to parse comments
#>
#> Error in configsaem(model = model, data = dat, inits = inits, mcmc = .mcmc, ODEopt = .ODEopt, seed = .seed, distribution = .dist, DEBUG = .DEBUG, addProp = .addProp, tol = .tol, itmax = .itmax, type = .type, powRange = .powRange, lambdaRange = .lambdaRange): covariate(s) not found: f_parent_to_A1
#> Timing stopped at: 0.824 0.024 0.851
f_nlmixr_dfop_sfo_focei_obs_tc <- nlmixr(f_mmkin_tc["DFOP-SFO", ], est = "focei", +
#> parameter labels from comments are typically ignored in non-interactive mode
#> Need to run with the source intact to parse comments
#>
#> Error in configsaem(model = model, data = dat, inits = inits, mcmc = .mcmc, ODEopt = .ODEopt, seed = .seed, distribution = .dist, DEBUG = .DEBUG, addProp = .addProp, tol = .tol, itmax = .itmax, type = .type, powRange = .powRange, lambdaRange = .lambdaRange): covariate(s) not found: f_parent_to_A1
#> Timing stopped at: 0.799 0.044 0.842
f_nlmixr_dfop_sfo_focei_obs_tc <- nlmixr(f_mmkin_tc["DFOP-SFO", ], est = "focei", error_model = "obs_tc")
#> parameter labels from comments are typically ignored in non-interactive mode
#> Need to run with the source intact to parse comments
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> done
#> → loading into symengine environment...
#> done
#> → calculate jacobian
#>
#> → calculate sensitivities
#>
#> → calculate ∂(f)/∂(η)
#>
#> → calculate ∂(R²)/∂(η)
#>
#> → finding duplicate expressions in inner model...
#>
#> → optimizing duplicate expressions in inner model...
#>
#> → finding duplicate expressions in EBE model...
#>
#> → optimizing duplicate expressions in EBE model...
#>
#> → compiling inner model...
#>
#> done
#> → finding duplicate expressions in FD model...
#>
#> → optimizing duplicate expressions in FD model...
#>
#> → compiling EBE model...
#>
#> done
#> → compiling events FD model...
#>
#> done
#> Model:
#> cmt(parent); #> cmt(A1); @@ -4951,7 +857,7 @@ obtained by fitting the same model to a list of datasets using f_parent=1/(1+exp(-(ETA[3]+THETA[3]))); #> g=1/(rx_expr_19); #> tad=tad(); -#> dosenum=dosenum();
#> Error in (function (data, inits, PKpars, model = NULL, pred = NULL, err = NULL, lower = -Inf, upper = Inf, fixed = NULL, skipCov = NULL, control = foceiControl(), thetaNames = NULL, etaNames = NULL, etaMat = NULL, ..., env = NULL, keep = NULL, drop = NULL) { set.seed(control$seed) .pt <- proc.time() RxODE::.setWarnIdSort(FALSE) on.exit(RxODE::.setWarnIdSort(TRUE)) loadNamespace("n1qn1") if (!RxODE::rxIs(control, "foceiControl")) { control <- do.call(foceiControl, control) } if (is.null(env)) { .ret <- new.env(parent = emptyenv()) } else { .ret <- env } .ret$origData <- data .ret$etaNames <- etaNames .ret$thetaFixed <- fixed .ret$control <- control .ret$control$focei.mu.ref <- integer(0) if (is(model, "RxODE") || is(model, "character")) { .ret$ODEmodel <- TRUE if (class(pred) != "function") { stop("pred must be a function specifying the prediction variables in this model.") } } else { .ret$ODEmodel <- TRUE model <- RxODE::rxGetLin(PKpars) pred <- eval(parse(text = "function(){return(Central);}")) } .square <- function(x) x * x .ret$diagXformInv <- c(sqrt = ".square", log = "exp", identity = "identity")[control$diagXform] if (is.null(err)) { err <- eval(parse(text = paste0("function(){err", paste(inits$ERROR[[1]], collapse = ""), "}"))) } .covNames <- .parNames <- c() .ret$adjLik <- control$adjLik .mixed <- !is.null(inits$OMGA) && length(inits$OMGA) > 0 if (!exists("noLik", envir = .ret)) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ssAtol <- rep(control$ssAtol, length(RxODE::rxModelVars(model)$state)) .ssRtol <- rep(control$ssRtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = (control$derivMethod == 2L), pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, interaction = (control$interaction == 1L), only.numeric = !.mixed, run.internal = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol .ssAtol <- c(.ssAtol, rep(control$ssAtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssAtol))) .ssRtol <- c(.ssRtol, rep(control$ssRtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssRtol))) .ret$control$rxControl$ssAtol <- .ssAtol .ret$control$rxControl$ssRtol <- .ssRtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { if (.ret$noLik) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = FALSE, pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, run.internal = TRUE, only.numeric = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { .extraPars <- NULL } } .ret$skipCov <- skipCov if (is.null(skipCov)) { if (is.null(fixed)) { .tmp <- rep(FALSE, length(inits$THTA)) } else { if (length(fixed) < length(inits$THTA)) { .tmp <- c(fixed, rep(FALSE, length(inits$THTA) - length(fixed))) } else { .tmp <- fixed[1:length(inits$THTA)] } } if (exists("uif", envir = .ret)) { .uifErr <- .ret$uif$ini$err[!is.na(.ret$uif$ini$ntheta)] .uifErr <- sapply(.uifErr, function(x) { if (is.na(x)) { return(FALSE) } return(!any(x == c("pow2", "tbs", "tbsYj"))) }) .tmp <- (.tmp | .uifErr) } .ret$skipCov <- c(.tmp, rep(TRUE, length(.extraPars))) .ret$control$focei.mu.ref <- .ret$uif$focei.mu.ref } if (is.null(.extraPars)) { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA))) } else { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA)), sprintf("ERR[%s]", seq_along(.extraPars))) } if (!is.null(thetaNames) && (length(inits$THTA) + length(.extraPars)) == length(thetaNames)) { .nms <- thetaNames } .ret$thetaNames <- .nms .thetaReset$thetaNames <- .nms if (length(lower) == 1) { lower <- rep(lower, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { print(inits$THTA) print(lower) stop("Lower must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (length(upper) == 1) { upper <- rep(upper, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { stop("Upper must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (!is.null(.extraPars)) { .ret$model$extra.pars <- eval(call(control$diagXform, .ret$model$extra.pars)) if (length(.ret$model$extra.pars) > 0) { inits$THTA <- c(inits$THTA, .ret$model$extra.pars) .lowerErr <- rep(control$atol[1] * 10, length(.ret$model$extra.pars)) .upperErr <- rep(Inf, length(.ret$model$extra.pars)) lower <- c(lower, .lowerErr) upper <- c(upper, .upperErr) } } if (is.null(data$ID)) stop("\"ID\" not found in data") if (is.null(data$DV)) stop("\"DV\" not found in data") if (is.null(data$EVID)) data$EVID <- 0 if (is.null(data$AMT)) data$AMT <- 0 for (.v in c("TIME", "AMT", "DV", .covNames)) { data[[.v]] <- as.double(data[[.v]]) } .ret$dataSav <- data .ds <- data[data$EVID != 0 & data$EVID != 2, c("ID", "TIME", "AMT", "EVID", .covNames)] .w <- which(tolower(names(data)) == "limit") .limitName <- NULL if (length(.w) == 1L) { .limitName <- names(data)[.w] } .censName <- NULL .w <- which(tolower(names(data)) == "cens") if (length(.w) == 1L) { .censName <- names(data[.w]) } data <- data[data$EVID == 0 | data$EVID == 2, c("ID", "TIME", "DV", "EVID", .covNames, .limitName, .censName)] .w <- which(!(names(.ret$dataSav) %in% c(.covNames, keep))) names(.ret$dataSav)[.w] <- tolower(names(.ret$dataSav[.w])) if (.mixed) { .lh <- .parseOM(inits$OMGA) .nlh <- sapply(.lh, length) .osplt <- rep(1:length(.lh), .nlh) .lini <- list(inits$THTA, unlist(.lh)) .nlini <- sapply(.lini, length) .nsplt <- rep(1:length(.lini), .nlini) .om0 <- .genOM(.lh) if (length(etaNames) == dim(.om0)[1]) { .ret$etaNames <- .ret$etaNames } else { .ret$etaNames <- sprintf("ETA[%d]", seq(1, dim(.om0)[1])) } .ret$rxInv <- RxODE::rxSymInvCholCreate(mat = .om0, diag.xform = control$diagXform) .ret$xType <- .ret$rxInv$xType .om0a <- .om0 .om0a <- .om0a/control$diagOmegaBoundLower .om0b <- .om0 .om0b <- .om0b * control$diagOmegaBoundUpper .om0a <- RxODE::rxSymInvCholCreate(mat = .om0a, diag.xform = control$diagXform) .om0b <- RxODE::rxSymInvCholCreate(mat = .om0b, diag.xform = control$diagXform) .omdf <- data.frame(a = .om0a$theta, m = .ret$rxInv$theta, b = .om0b$theta, diag = .om0a$theta.diag) .omdf$lower <- with(.omdf, ifelse(a > b, b, a)) .omdf$lower <- with(.omdf, ifelse(lower == m, -Inf, lower)) .omdf$lower <- with(.omdf, ifelse(!diag, -Inf, lower)) .omdf$upper <- with(.omdf, ifelse(a < b, b, a)) .omdf$upper <- with(.omdf, ifelse(upper == m, Inf, upper)) .omdf$upper <- with(.omdf, ifelse(!diag, Inf, upper)) .ret$control$nomega <- length(.omdf$lower) .ret$control$neta <- sum(.omdf$diag) .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) lower <- c(lower, .omdf$lower) upper <- c(upper, .omdf$upper) } else { .ret$control$nomega <- 0 .ret$control$neta <- 0 .ret$xType <- -1 .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) } .ret$lower <- lower .ret$upper <- upper .ret$thetaIni <- inits$THTA .scaleC <- double(length(lower)) if (is.null(control$scaleC)) { .scaleC <- rep(NA_real_, length(lower)) } else { .scaleC <- as.double(control$scaleC) if (length(lower) > length(.scaleC)) { .scaleC <- c(.scaleC, rep(NA_real_, length(lower) - length(.scaleC))) } else if (length(lower) < length(.scaleC)) { .scaleC <- .scaleC[seq(1, length(lower))] warning("scaleC control option has more options than estimated population parameters, please check.") } } .ret$scaleC <- .scaleC if (exists("uif", envir = .ret)) { .ini <- as.data.frame(.ret$uif$ini)[!is.na(.ret$uif$ini$err), c("est", "err", "ntheta")] for (.i in seq_along(.ini$err)) { if (is.na(.ret$scaleC[.ini$ntheta[.i]])) { if (any(.ini$err[.i] == c("boxCox", "yeoJohnson", "pow2", "tbs", "tbsYj"))) { .ret$scaleC[.ini$ntheta[.i]] <- 1 } else if (any(.ini$err[.i] == c("prop", "add", "norm", "dnorm", "logn", "dlogn", "lnorm", "dlnorm"))) { .ret$scaleC[.ini$ntheta[.i]] <- 0.5 * abs(.ini$est[.i]) } } } for (.i in .ini$model$extraProps$powTheta) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- 1 } .ini <- as.data.frame(.ret$uif$ini) for (.i in .ini$model$extraProps$factorial) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i] + 1)) } for (.i in .ini$model$extraProps$gamma) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i])) } for (.i in .ini$model$extraProps$log) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- log(abs(.ini$est[.i])) * abs(.ini$est[.i]) } for (.i in .ret$logitThetas) { .b <- .ret$logitThetasLow[.i] .c <- .ret$logitThetasHi[.i] .a <- .ini$est[.i] if (is.na(.ret$scaleC[.i])) { .ret$scaleC[.i] <- 1 * (-.b + .c) * exp(-.a)/((1 + exp(-.a))^2 * (.b + 1 * (-.b + .c)/(1 + exp(-.a)))) } } } names(.ret$thetaIni) <- sprintf("THETA[%d]", seq_along(.ret$thetaIni)) if (is.null(etaMat) & !is.null(control$etaMat)) { .ret$etaMat <- control$etaMat } else { .ret$etaMat <- etaMat } .ret$setupTime <- (proc.time() - .pt)["elapsed"] if (exists("uif", envir = .ret)) { .tmp <- .ret$uif$logThetasList .ret$logThetas <- .tmp[[1]] .ret$logThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasList .ret$logitThetas <- .tmp[[1]] .ret$logitThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListLow .ret$logitThetasLow <- .tmp[[1]] .ret$logitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListHi .ret$logitThetasHi <- .tmp[[1]] .ret$logitThetasHiF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasList .ret$probitThetas <- .tmp[[1]] .ret$probitThetasF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListLow .ret$probitThetasLow <- .tmp[[1]] .ret$probitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListHi .ret$probitThetasHi <- .tmp[[1]] .ret$probitThetasHiF <- .tmp[[2]] } else { .ret$logThetasF <- integer(0) .ret$logitThetasF <- integer(0) .ret$logitThetasHiF <- numeric(0) .ret$logitThetasLowF <- numeric(0) .ret$logitThetas <- integer(0) .ret$logitThetasHi <- numeric(0) .ret$logitThetasLow <- numeric(0) .ret$probitThetasF <- integer(0) .ret$probitThetasHiF <- numeric(0) .ret$probitThetasLowF <- numeric(0) .ret$probitThetas <- integer(0) .ret$probitThetasHi <- numeric(0) .ret$probitThetasLow <- numeric(0) } if (exists("noLik", envir = .ret)) { if (!.ret$noLik) { .ret$.params <- c(sprintf("THETA[%d]", seq_along(.ret$thetaIni)), sprintf("ETA[%d]", seq(1, dim(.om0)[1]))) .ret$.thetan <- length(.ret$thetaIni) .ret$nobs <- sum(data$EVID == 0) } } .ret$control$printTop <- TRUE .ret$control$nF <- 0 .est0 <- .ret$thetaIni if (!is.null(.ret$model$pred.nolhs)) { .ret$control$predNeq <- length(.ret$model$pred.nolhs$state) } else { .ret$control$predNeq <- 0L } .fitFun <- function(.ret) { this.env <- environment() assign("err", "theta reset", this.env) while (this.env$err == "theta reset") { assign("err", "", this.env) .ret0 <- tryCatch({ foceiFitCpp_(.ret) }, error = function(e) { if (regexpr("theta reset", e$message) != -1) { assign("zeroOuter", FALSE, this.env) assign("zeroGrad", FALSE, this.env) if (regexpr("theta reset0", e$message) != -1) { assign("zeroGrad", TRUE, this.env) } else if (regexpr("theta resetZ", e$message) != -1) { assign("zeroOuter", TRUE, this.env) } assign("err", "theta reset", this.env) } else { assign("err", e$message, this.env) } }) if (this.env$err == "theta reset") { .nm <- names(.ret$thetaIni) .ret$thetaIni <- setNames(.thetaReset$thetaIni + 0, .nm) .ret$rxInv$theta <- .thetaReset$omegaTheta .ret$control$printTop <- FALSE .ret$etaMat <- .thetaReset$etaMat .ret$control$etaMat <- .thetaReset$etaMat .ret$control$maxInnerIterations <- .thetaReset$maxInnerIterations .ret$control$nF <- .thetaReset$nF .ret$control$gillRetC <- .thetaReset$gillRetC .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillDf <- .thetaReset$gillDf .ret$control$gillDf2 <- .thetaReset$gillDf2 .ret$control$gillErr <- .thetaReset$gillErr .ret$control$rEps <- .thetaReset$rEps .ret$control$aEps <- .thetaReset$aEps .ret$control$rEpsC <- .thetaReset$rEpsC .ret$control$aEpsC <- .thetaReset$aEpsC .ret$control$c1 <- .thetaReset$c1 .ret$control$c2 <- .thetaReset$c2 if (this.env$zeroOuter) { message("Posthoc reset") .ret$control$maxOuterIterations <- 0L } else if (this.env$zeroGrad) { message("Theta reset (zero gradient values); Switch to bobyqa") RxODE::rxReq("minqa") .ret$control$outerOptFun <- .bobyqa .ret$control$outerOpt <- -1L } else { message("Theta reset (ETA drift)") } } } if (this.env$err != "") { stop(this.env$err) } else { return(.ret0) } } .ret0 <- try(.fitFun(.ret)) .n <- 1 while (inherits(.ret0, "try-error") && control$maxOuterIterations != 0 && .n <= control$nRetries) { message(sprintf("Restart %s", .n)) .ret$control$nF <- 0 .estNew <- .est0 + 0.2 * .n * abs(.est0) * stats::runif(length(.est0)) - 0.1 * .n .estNew <- sapply(seq_along(.est0), function(.i) { if (.ret$thetaFixed[.i]) { return(.est0[.i]) } else if (.estNew[.i] < lower[.i]) { return(lower + (.Machine$double.eps)^(1/7)) } else if (.estNew[.i] > upper[.i]) { return(upper - (.Machine$double.eps)^(1/7)) } else { return(.estNew[.i]) } }) .ret$thetaIni <- .estNew .ret0 <- try(.fitFun(.ret)) .n <- .n + 1 } if (inherits(.ret0, "try-error")) stop("Could not fit data.") .ret <- .ret0 if (exists("parHistData", .ret)) { .tmp <- .ret$parHistData .tmp <- .tmp[.tmp$type == "Unscaled", names(.tmp) != "type"] .iter <- .tmp$iter .tmp <- .tmp[, names(.tmp) != "iter"] .ret$parHistStacked <- data.frame(stack(.tmp), iter = .iter) names(.ret$parHistStacked) <- c("val", "par", "iter") .ret$parHist <- data.frame(iter = .iter, .tmp) } if (.mixed) { .etas <- .ret$ranef .thetas <- .ret$fixef .pars <- .Call(`_nlmixr_nlmixrParameters`, .thetas, .etas) .ret$shrink <- .Call(`_nlmixr_calcShrinkOnly`, .ret$omega, .pars$eta.lst, length(.etas$ID)) .updateParFixed(.ret) } else { .updateParFixed(.ret) } if (!exists("table", .ret)) { .ret$table <- tableControl() } if (control$calcTables) { .ret <- addTable(.ret, updateObject = "no", keep = keep, drop = drop, table = .ret$table) } .ret})(data = dat, inits = .FoceiInits, PKpars = .pars, model = .mod, pred = function() { return(nlmixr_pred) }, err = uif$error, lower = uif$focei.lower, upper = uif$focei.upper, fixed = uif$focei.fixed, thetaNames = uif$focei.names, etaNames = uif$eta.names, control = control, env = env, keep = .keep, drop = .drop): Not all the covariates are in the dataset.
#> Error in (function (data, inits, PKpars, model = NULL, pred = NULL, err = NULL, lower = -Inf, upper = Inf, fixed = NULL, skipCov = NULL, control = foceiControl(), thetaNames = NULL, etaNames = NULL, etaMat = NULL, ..., env = NULL, keep = NULL, drop = NULL) { set.seed(control$seed) .pt <- proc.time() RxODE::.setWarnIdSort(FALSE) on.exit(RxODE::.setWarnIdSort(TRUE)) loadNamespace("n1qn1") if (!RxODE::rxIs(control, "foceiControl")) { control <- do.call(foceiControl, control) } if (is.null(env)) { .ret <- new.env(parent = emptyenv()) } else { .ret <- env } .ret$origData <- data .ret$etaNames <- etaNames .ret$thetaFixed <- fixed .ret$control <- control .ret$control$focei.mu.ref <- integer(0) if (is(model, "RxODE") || is(model, "character")) { .ret$ODEmodel <- TRUE if (class(pred) != "function") { stop("pred must be a function specifying the prediction variables in this model.") } } else { .ret$ODEmodel <- TRUE model <- RxODE::rxGetLin(PKpars) pred <- eval(parse(text = "function(){return(Central);}")) } .square <- function(x) x * x .ret$diagXformInv <- c(sqrt = ".square", log = "exp", identity = "identity")[control$diagXform] if (is.null(err)) { err <- eval(parse(text = paste0("function(){err", paste(inits$ERROR[[1]], collapse = ""), "}"))) } .covNames <- .parNames <- c() .ret$adjLik <- control$adjLik .mixed <- !is.null(inits$OMGA) && length(inits$OMGA) > 0 if (!exists("noLik", envir = .ret)) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ssAtol <- rep(control$ssAtol, length(RxODE::rxModelVars(model)$state)) .ssRtol <- rep(control$ssRtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = (control$derivMethod == 2L), pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, interaction = (control$interaction == 1L), only.numeric = !.mixed, run.internal = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol .ssAtol <- c(.ssAtol, rep(control$ssAtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssAtol))) .ssRtol <- c(.ssRtol, rep(control$ssRtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.ssRtol))) .ret$control$rxControl$ssAtol <- .ssAtol .ret$control$rxControl$ssRtol <- .ssRtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { if (.ret$noLik) { .atol <- rep(control$atol, length(RxODE::rxModelVars(model)$state)) .rtol <- rep(control$rtol, length(RxODE::rxModelVars(model)$state)) .ret$model <- RxODE::rxSymPySetupPred(model, pred, PKpars, err, grad = FALSE, pred.minus.dv = TRUE, sum.prod = control$sumProd, theta.derivs = FALSE, optExpression = control$optExpression, run.internal = TRUE, only.numeric = TRUE, addProp = control$addProp) if (!is.null(.ret$model$inner)) { .atol <- c(.atol, rep(control$atolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.atol))) .rtol <- c(.rtol, rep(control$rtolSens, length(RxODE::rxModelVars(.ret$model$inner)$state) - length(.rtol))) .ret$control$rxControl$atol <- .atol .ret$control$rxControl$rtol <- .rtol } .covNames <- .parNames <- RxODE::rxParams(.ret$model$pred.only) .covNames <- .covNames[regexpr(rex::rex(start, or("THETA", "ETA"), "[", numbers, "]", end), .covNames) == -1] colnames(data) <- sapply(names(data), function(x) { if (any(x == .covNames)) { return(x) } else { return(toupper(x)) } }) .lhs <- c(names(RxODE::rxInits(.ret$model$pred.only)), RxODE::rxLhs(.ret$model$pred.only)) if (length(.lhs) > 0) { .covNames <- .covNames[regexpr(rex::rex(start, or(.lhs), end), .covNames) == -1] } if (length(.covNames) > 0) { if (!all(.covNames %in% names(data))) { message("Model:") RxODE::rxCat(.ret$model$pred.only) message("Needed Covariates:") nlmixrPrint(.covNames) stop("Not all the covariates are in the dataset.") } message("Needed Covariates:") print(.covNames) } .extraPars <- .ret$model$extra.pars } else { .extraPars <- NULL } } .ret$skipCov <- skipCov if (is.null(skipCov)) { if (is.null(fixed)) { .tmp <- rep(FALSE, length(inits$THTA)) } else { if (length(fixed) < length(inits$THTA)) { .tmp <- c(fixed, rep(FALSE, length(inits$THTA) - length(fixed))) } else { .tmp <- fixed[1:length(inits$THTA)] } } if (exists("uif", envir = .ret)) { .uifErr <- .ret$uif$ini$err[!is.na(.ret$uif$ini$ntheta)] .uifErr <- sapply(.uifErr, function(x) { if (is.na(x)) { return(FALSE) } return(!any(x == c("pow2", "tbs", "tbsYj"))) }) .tmp <- (.tmp | .uifErr) } .ret$skipCov <- c(.tmp, rep(TRUE, length(.extraPars))) .ret$control$focei.mu.ref <- .ret$uif$focei.mu.ref } if (is.null(.extraPars)) { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA))) } else { .nms <- c(sprintf("THETA[%s]", seq_along(inits$THTA)), sprintf("ERR[%s]", seq_along(.extraPars))) } if (!is.null(thetaNames) && (length(inits$THTA) + length(.extraPars)) == length(thetaNames)) { .nms <- thetaNames } .ret$thetaNames <- .nms .thetaReset$thetaNames <- .nms if (length(lower) == 1) { lower <- rep(lower, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { print(inits$THTA) print(lower) stop("Lower must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (length(upper) == 1) { upper <- rep(upper, length(inits$THTA)) } else if (length(lower) != length(inits$THTA)) { stop("Upper must be a single constant for all the THETA lower bounds, or match the dimension of THETA.") } if (!is.null(.extraPars)) { .ret$model$extra.pars <- eval(call(control$diagXform, .ret$model$extra.pars)) if (length(.ret$model$extra.pars) > 0) { inits$THTA <- c(inits$THTA, .ret$model$extra.pars) .lowerErr <- rep(control$atol[1] * 10, length(.ret$model$extra.pars)) .upperErr <- rep(Inf, length(.ret$model$extra.pars)) lower <- c(lower, .lowerErr) upper <- c(upper, .upperErr) } } if (is.null(data$ID)) stop("\"ID\" not found in data") if (is.null(data$DV)) stop("\"DV\" not found in data") if (is.null(data$EVID)) data$EVID <- 0 if (is.null(data$AMT)) data$AMT <- 0 for (.v in c("TIME", "AMT", "DV", .covNames)) { data[[.v]] <- as.double(data[[.v]]) } .ret$dataSav <- data .ds <- data[data$EVID != 0 & data$EVID != 2, c("ID", "TIME", "AMT", "EVID", .covNames)] .w <- which(tolower(names(data)) == "limit") .limitName <- NULL if (length(.w) == 1L) { .limitName <- names(data)[.w] } .censName <- NULL .w <- which(tolower(names(data)) == "cens") if (length(.w) == 1L) { .censName <- names(data[.w]) } data <- data[data$EVID == 0 | data$EVID == 2, c("ID", "TIME", "DV", "EVID", .covNames, .limitName, .censName)] .w <- which(!(names(.ret$dataSav) %in% c(.covNames, keep))) names(.ret$dataSav)[.w] <- tolower(names(.ret$dataSav[.w])) if (.mixed) { .lh <- .parseOM(inits$OMGA) .nlh <- sapply(.lh, length) .osplt <- rep(1:length(.lh), .nlh) .lini <- list(inits$THTA, unlist(.lh)) .nlini <- sapply(.lini, length) .nsplt <- rep(1:length(.lini), .nlini) .om0 <- .genOM(.lh) if (length(etaNames) == dim(.om0)[1]) { .ret$etaNames <- .ret$etaNames } else { .ret$etaNames <- sprintf("ETA[%d]", seq(1, dim(.om0)[1])) } .ret$rxInv <- RxODE::rxSymInvCholCreate(mat = .om0, diag.xform = control$diagXform) .ret$xType <- .ret$rxInv$xType .om0a <- .om0 .om0a <- .om0a/control$diagOmegaBoundLower .om0b <- .om0 .om0b <- .om0b * control$diagOmegaBoundUpper .om0a <- RxODE::rxSymInvCholCreate(mat = .om0a, diag.xform = control$diagXform) .om0b <- RxODE::rxSymInvCholCreate(mat = .om0b, diag.xform = control$diagXform) .omdf <- data.frame(a = .om0a$theta, m = .ret$rxInv$theta, b = .om0b$theta, diag = .om0a$theta.diag) .omdf$lower <- with(.omdf, ifelse(a > b, b, a)) .omdf$lower <- with(.omdf, ifelse(lower == m, -Inf, lower)) .omdf$lower <- with(.omdf, ifelse(!diag, -Inf, lower)) .omdf$upper <- with(.omdf, ifelse(a < b, b, a)) .omdf$upper <- with(.omdf, ifelse(upper == m, Inf, upper)) .omdf$upper <- with(.omdf, ifelse(!diag, Inf, upper)) .ret$control$nomega <- length(.omdf$lower) .ret$control$neta <- sum(.omdf$diag) .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) lower <- c(lower, .omdf$lower) upper <- c(upper, .omdf$upper) } else { .ret$control$nomega <- 0 .ret$control$neta <- 0 .ret$xType <- -1 .ret$control$ntheta <- length(lower) .ret$control$nfixed <- sum(fixed) } .ret$lower <- lower .ret$upper <- upper .ret$thetaIni <- inits$THTA .scaleC <- double(length(lower)) if (is.null(control$scaleC)) { .scaleC <- rep(NA_real_, length(lower)) } else { .scaleC <- as.double(control$scaleC) if (length(lower) > length(.scaleC)) { .scaleC <- c(.scaleC, rep(NA_real_, length(lower) - length(.scaleC))) } else if (length(lower) < length(.scaleC)) { .scaleC <- .scaleC[seq(1, length(lower))] warning("scaleC control option has more options than estimated population parameters, please check.") } } .ret$scaleC <- .scaleC if (exists("uif", envir = .ret)) { .ini <- as.data.frame(.ret$uif$ini)[!is.na(.ret$uif$ini$err), c("est", "err", "ntheta")] for (.i in seq_along(.ini$err)) { if (is.na(.ret$scaleC[.ini$ntheta[.i]])) { if (any(.ini$err[.i] == c("boxCox", "yeoJohnson", "pow2", "tbs", "tbsYj"))) { .ret$scaleC[.ini$ntheta[.i]] <- 1 } else if (any(.ini$err[.i] == c("prop", "add", "norm", "dnorm", "logn", "dlogn", "lnorm", "dlnorm"))) { .ret$scaleC[.ini$ntheta[.i]] <- 0.5 * abs(.ini$est[.i]) } } } for (.i in .ini$model$extraProps$powTheta) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- 1 } .ini <- as.data.frame(.ret$uif$ini) for (.i in .ini$model$extraProps$factorial) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i] + 1)) } for (.i in .ini$model$extraProps$gamma) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- abs(1/digamma(.ini$est[.i])) } for (.i in .ini$model$extraProps$log) { if (is.na(.ret$scaleC[.i])) .ret$scaleC[.i] <- log(abs(.ini$est[.i])) * abs(.ini$est[.i]) } for (.i in .ret$logitThetas) { .b <- .ret$logitThetasLow[.i] .c <- .ret$logitThetasHi[.i] .a <- .ini$est[.i] if (is.na(.ret$scaleC[.i])) { .ret$scaleC[.i] <- 1 * (-.b + .c) * exp(-.a)/((1 + exp(-.a))^2 * (.b + 1 * (-.b + .c)/(1 + exp(-.a)))) } } } names(.ret$thetaIni) <- sprintf("THETA[%d]", seq_along(.ret$thetaIni)) if (is.null(etaMat) & !is.null(control$etaMat)) { .ret$etaMat <- control$etaMat } else { .ret$etaMat <- etaMat } .ret$setupTime <- (proc.time() - .pt)["elapsed"] if (exists("uif", envir = .ret)) { .tmp <- .ret$uif$logThetasList .ret$logThetas <- .tmp[[1]] .ret$logThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasList .ret$logitThetas <- .tmp[[1]] .ret$logitThetasF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListLow .ret$logitThetasLow <- .tmp[[1]] .ret$logitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$logitThetasListHi .ret$logitThetasHi <- .tmp[[1]] .ret$logitThetasHiF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasList .ret$probitThetas <- .tmp[[1]] .ret$probitThetasF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListLow .ret$probitThetasLow <- .tmp[[1]] .ret$probitThetasLowF <- .tmp[[2]] .tmp <- .ret$uif$probitThetasListHi .ret$probitThetasHi <- .tmp[[1]] .ret$probitThetasHiF <- .tmp[[2]] } else { .ret$logThetasF <- integer(0) .ret$logitThetasF <- integer(0) .ret$logitThetasHiF <- numeric(0) .ret$logitThetasLowF <- numeric(0) .ret$logitThetas <- integer(0) .ret$logitThetasHi <- numeric(0) .ret$logitThetasLow <- numeric(0) .ret$probitThetasF <- integer(0) .ret$probitThetasHiF <- numeric(0) .ret$probitThetasLowF <- numeric(0) .ret$probitThetas <- integer(0) .ret$probitThetasHi <- numeric(0) .ret$probitThetasLow <- numeric(0) } if (exists("noLik", envir = .ret)) { if (!.ret$noLik) { .ret$.params <- c(sprintf("THETA[%d]", seq_along(.ret$thetaIni)), sprintf("ETA[%d]", seq(1, dim(.om0)[1]))) .ret$.thetan <- length(.ret$thetaIni) .ret$nobs <- sum(data$EVID == 0) } } .ret$control$printTop <- TRUE .ret$control$nF <- 0 .est0 <- .ret$thetaIni if (!is.null(.ret$model$pred.nolhs)) { .ret$control$predNeq <- length(.ret$model$pred.nolhs$state) } else { .ret$control$predNeq <- 0L } .fitFun <- function(.ret) { this.env <- environment() assign("err", "theta reset", this.env) while (this.env$err == "theta reset") { assign("err", "", this.env) .ret0 <- tryCatch({ foceiFitCpp_(.ret) }, error = function(e) { if (regexpr("theta reset", e$message) != -1) { assign("zeroOuter", FALSE, this.env) assign("zeroGrad", FALSE, this.env) if (regexpr("theta reset0", e$message) != -1) { assign("zeroGrad", TRUE, this.env) } else if (regexpr("theta resetZ", e$message) != -1) { assign("zeroOuter", TRUE, this.env) } assign("err", "theta reset", this.env) } else { assign("err", e$message, this.env) } }) if (this.env$err == "theta reset") { .nm <- names(.ret$thetaIni) .ret$thetaIni <- setNames(.thetaReset$thetaIni + 0, .nm) .ret$rxInv$theta <- .thetaReset$omegaTheta .ret$control$printTop <- FALSE .ret$etaMat <- .thetaReset$etaMat .ret$control$etaMat <- .thetaReset$etaMat .ret$control$maxInnerIterations <- .thetaReset$maxInnerIterations .ret$control$nF <- .thetaReset$nF .ret$control$gillRetC <- .thetaReset$gillRetC .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillRet <- .thetaReset$gillRet .ret$control$gillDf <- .thetaReset$gillDf .ret$control$gillDf2 <- .thetaReset$gillDf2 .ret$control$gillErr <- .thetaReset$gillErr .ret$control$rEps <- .thetaReset$rEps .ret$control$aEps <- .thetaReset$aEps .ret$control$rEpsC <- .thetaReset$rEpsC .ret$control$aEpsC <- .thetaReset$aEpsC .ret$control$c1 <- .thetaReset$c1 .ret$control$c2 <- .thetaReset$c2 if (this.env$zeroOuter) { message("Posthoc reset") .ret$control$maxOuterIterations <- 0L } else if (this.env$zeroGrad) { message("Theta reset (zero gradient values); Switch to bobyqa") RxODE::rxReq("minqa") .ret$control$outerOptFun <- .bobyqa .ret$control$outerOpt <- -1L } else { message("Theta reset (ETA drift)") } } } if (this.env$err != "") { stop(this.env$err) } else { return(.ret0) } } .ret0 <- try(.fitFun(.ret)) .n <- 1 while (inherits(.ret0, "try-error") && control$maxOuterIterations != 0 && .n <= control$nRetries) { message(sprintf("Restart %s", .n)) .ret$control$nF <- 0 .estNew <- .est0 + 0.2 * .n * abs(.est0) * stats::runif(length(.est0)) - 0.1 * .n .estNew <- sapply(seq_along(.est0), function(.i) { if (.ret$thetaFixed[.i]) { return(.est0[.i]) } else if (.estNew[.i] < lower[.i]) { return(lower + (.Machine$double.eps)^(1/7)) } else if (.estNew[.i] > upper[.i]) { return(upper - (.Machine$double.eps)^(1/7)) } else { return(.estNew[.i]) } }) .ret$thetaIni <- .estNew .ret0 <- try(.fitFun(.ret)) .n <- .n + 1 } if (inherits(.ret0, "try-error")) stop("Could not fit data.") .ret <- .ret0 if (exists("parHistData", .ret)) { .tmp <- .ret$parHistData .tmp <- .tmp[.tmp$type == "Unscaled", names(.tmp) != "type"] .iter <- .tmp$iter .tmp <- .tmp[, names(.tmp) != "iter"] .ret$parHistStacked <- data.frame(stack(.tmp), iter = .iter) names(.ret$parHistStacked) <- c("val", "par", "iter") .ret$parHist <- data.frame(iter = .iter, .tmp) } if (.mixed) { .etas <- .ret$ranef .thetas <- .ret$fixef .pars <- .Call(`_nlmixr_nlmixrParameters`, .thetas, .etas) .ret$shrink <- .Call(`_nlmixr_calcShrinkOnly`, .ret$omega, .pars$eta.lst, length(.etas$ID)) .updateParFixed(.ret) } else { .updateParFixed(.ret) } if (!exists("table", .ret)) { .ret$table <- tableControl() } if (control$calcTables) { .ret <- addTable(.ret, updateObject = "no", keep = keep, drop = drop, table = .ret$table) } .ret})(data = dat, inits = .FoceiInits, PKpars = .pars, model = .mod, pred = function() { return(nlmixr_pred) }, err = uif$error, lower = uif$focei.lower, upper = uif$focei.upper, fixed = uif$focei.fixed, thetaNames = uif$focei.names, etaNames = uif$eta.names, control = control, env = env, keep = .keep, drop = .drop): Not all the covariates are in the dataset.
AIC( f_nlmixr_sfo_sfo_focei_const$nm, f_nlmixr_fomc_sfo_focei_const$nm, diff --git a/man/nlmixr.mmkin.Rd b/man/nlmixr.mmkin.Rd index 173b0d39..698c04f0 100644 --- a/man/nlmixr.mmkin.Rd +++ b/man/nlmixr.mmkin.Rd @@ -94,7 +94,8 @@ An dataframe suitable for use with \link[nlmixr:nlmixr]{nlmixr::nlmixr} \description{ This function uses \code{\link[nlmixr:nlmixr]{nlmixr::nlmixr()}} as a backend for fitting nonlinear mixed effects models created from \link{mmkin} row objects using the Stochastic Approximation -Expectation Maximisation algorithm (SAEM). +Expectation Maximisation algorithm (SAEM) or First Order Conditional +Estimation with Interaction (FOCEI). } \details{ An mmkin row object is essentially a list of mkinfit objects that have been @@ -110,20 +111,31 @@ f_mmkin_parent <- mmkin(c("SFO", "FOMC", "DFOP", "HS"), ds, quiet = TRUE, cores f_mmkin_parent_tc <- mmkin(c("SFO", "FOMC", "DFOP"), ds, error_model = "tc", cores = 1, quiet = TRUE) -f_nlmixr_sfo_saem <- nlmixr(f_mmkin_parent["SFO", ], est = "saem") -f_nlmixr_sfo_focei <- nlmixr(f_mmkin_parent["SFO", ], est = "focei") +library(nlmixr) +f_nlmixr_sfo_saem <- nlmixr(f_mmkin_parent["SFO", ], est = "saem", + control = saemControl(print = 0)) +f_nlmixr_sfo_focei <- nlmixr(f_mmkin_parent["SFO", ], est = "focei", + control = foceiControl(print = 0)) -f_nlmixr_fomc_saem <- nlmixr(f_mmkin_parent["FOMC", ], est = "saem") -f_nlmixr_fomc_focei <- nlmixr(f_mmkin_parent["FOMC", ], est = "focei") +f_nlmixr_fomc_saem <- nlmixr(f_mmkin_parent["FOMC", ], est = "saem", + control = saemControl(print = 0)) +f_nlmixr_fomc_focei <- nlmixr(f_mmkin_parent["FOMC", ], est = "focei", + control = foceiControl(print = 0)) -f_nlmixr_dfop_saem <- nlmixr(f_mmkin_parent["DFOP", ], est = "saem") -f_nlmixr_dfop_focei <- nlmixr(f_mmkin_parent["DFOP", ], est = "focei") +f_nlmixr_dfop_saem <- nlmixr(f_mmkin_parent["DFOP", ], est = "saem", + control = saemControl(print = 0)) +f_nlmixr_dfop_focei <- nlmixr(f_mmkin_parent["DFOP", ], est = "focei", + control = foceiControl(print = 0)) -f_nlmixr_hs_saem <- nlmixr(f_mmkin_parent["HS", ], est = "saem") -f_nlmixr_hs_focei <- nlmixr(f_mmkin_parent["HS", ], est = "focei") +f_nlmixr_hs_saem <- nlmixr(f_mmkin_parent["HS", ], est = "saem", + control = saemControl(print = 0)) +f_nlmixr_hs_focei <- nlmixr(f_mmkin_parent["HS", ], est = "focei", + control = foceiControl(print = 0)) -f_nlmixr_fomc_saem_tc <- nlmixr(f_mmkin_parent_tc["FOMC", ], est = "saem") -f_nlmixr_fomc_focei_tc <- nlmixr(f_mmkin_parent_tc["FOMC", ], est = "focei") +f_nlmixr_fomc_saem_tc <- nlmixr(f_mmkin_parent_tc["FOMC", ], est = "saem", + control = saemControl(print = 0)) +f_nlmixr_fomc_focei_tc <- nlmixr(f_mmkin_parent_tc["FOMC", ], est = "focei", + control = foceiControl(print = 0)) AIC( f_nlmixr_sfo_saem$nm, f_nlmixr_sfo_focei$nm, @@ -135,9 +147,8 @@ AIC( AIC(nlme(f_mmkin_parent["FOMC", ])) AIC(nlme(f_mmkin_parent["HS", ])) -# nlme is comparable to nlmixr with focei, saem finds a better -# solution, the two-component error model does not improve it -plot(f_nlmixr_fomc_saem) +# The FOCEI fit of FOMC with constant variance or the tc error model is best +plot(f_nlmixr_fomc_saem_tc) sfo_sfo <- mkinmod(parent = mkinsub("SFO", "A1"), A1 = mkinsub("SFO")) -- cgit v1.2.1