-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correct way to implement broom for nlmixr #68
Comments
Also is there extra information that the mixed models tidiers are outputting? |
It seems that this may be the requested format: model <- mixed_model(...)
tidy(model, effects = "fixed")
tidy(model, effects = "random") |
I figured out what to do for the imports/suggest/etc. I'm unsure if there is anything in specific you wish to remain consistent with mixed models. |
Good questions. I'm not sure there's a formal description, but there should be. There is some discussion here. In general for the existing tidiers |
The expected column names do not match |
Also since the broom documentation reads |
I was wrong about the |
nlmixr currently also has some information that is useful for pharmacometricians that is not output in this table. My thought is to keep it, is there any reason why it should be excluded? |
For a nlme object, > tidy(as.nlme(fit),effects="ran_pars")
Error in match.arg(effects, c("random", "fixed")) :
'arg' should be one of "random", "fixed" |
Maybe. Eventually I think/hope that the mixed-model tidiers will be removed from |
oops. I've updated many of the tidiers, but hadn't gotten around to |
Double hmmm. The GitHub version of |
Sure; Its in Below is a reprex: library(nlme)
library(broom)
fm1 <- nlme(height ~ SSasymp(age, Asym, R0, lrc),
data = Loblolly,
fixed = Asym + R0 + lrc ~ 1,
random = Asym ~ 1,
start = c(Asym = 103, R0 = -8.5, lrc = -3.3))
tidy(fm1)
#> group level term estimate
#> 1 Seed 329 Asym 95.884132
#> 2 Seed 327 Asym 96.432780
#> 3 Seed 325 Asym 99.757521
#> 4 Seed 307 Asym 99.090820
#> 5 Seed 331 Asym 98.468135
#> 6 Seed 311 Asym 100.047745
#> 7 Seed 315 Asym 101.339541
#> 8 Seed 321 Asym 99.088285
#> 9 Seed 319 Asym 102.644389
#> 10 Seed 301 Asym 103.461512
#> 11 Seed 323 Asym 104.435835
#> 12 Seed 309 Asym 105.038646
#> 13 Seed 303 Asym 106.059078
#> 14 Seed 305 Asym 108.545981
#> 15 Seed 329 R0 -8.627331
#> 16 Seed 327 R0 -8.627331
#> 17 Seed 325 R0 -8.627331
#> 18 Seed 307 R0 -8.627331
#> 19 Seed 331 R0 -8.627331
#> 20 Seed 311 R0 -8.627331
#> 21 Seed 315 R0 -8.627331
#> 22 Seed 321 R0 -8.627331
#> 23 Seed 319 R0 -8.627331
#> 24 Seed 301 R0 -8.627331
#> 25 Seed 323 R0 -8.627331
#> 26 Seed 309 R0 -8.627331
#> 27 Seed 303 R0 -8.627331
#> 28 Seed 305 R0 -8.627331
#> 29 Seed 329 lrc -3.233751
#> 30 Seed 327 lrc -3.233751
#> 31 Seed 325 lrc -3.233751
#> 32 Seed 307 lrc -3.233751
#> 33 Seed 331 lrc -3.233751
#> 34 Seed 311 lrc -3.233751
#> 35 Seed 315 lrc -3.233751
#> 36 Seed 321 lrc -3.233751
#> 37 Seed 319 lrc -3.233751
#> 38 Seed 301 lrc -3.233751
#> 39 Seed 323 lrc -3.233751
#> 40 Seed 309 lrc -3.233751
#> 41 Seed 303 lrc -3.233751
#> 42 Seed 305 lrc -3.233751
tidy(fm1, effects="ran_pars")
#> Error in match.arg(effects, c("random", "fixed")): 'arg' should be one of "random", "fixed"
tidy(fm1, effects="random")
#> group level term estimate
#> 1 Seed 329 Asym 95.884132
#> 2 Seed 327 Asym 96.432780
#> 3 Seed 325 Asym 99.757521
#> 4 Seed 307 Asym 99.090820
#> 5 Seed 331 Asym 98.468135
#> 6 Seed 311 Asym 100.047745
#> 7 Seed 315 Asym 101.339541
#> 8 Seed 321 Asym 99.088285
#> 9 Seed 319 Asym 102.644389
#> 10 Seed 301 Asym 103.461512
#> 11 Seed 323 Asym 104.435835
#> 12 Seed 309 Asym 105.038646
#> 13 Seed 303 Asym 106.059078
#> 14 Seed 305 Asym 108.545981
#> 15 Seed 329 R0 -8.627331
#> 16 Seed 327 R0 -8.627331
#> 17 Seed 325 R0 -8.627331
#> 18 Seed 307 R0 -8.627331
#> 19 Seed 331 R0 -8.627331
#> 20 Seed 311 R0 -8.627331
#> 21 Seed 315 R0 -8.627331
#> 22 Seed 321 R0 -8.627331
#> 23 Seed 319 R0 -8.627331
#> 24 Seed 301 R0 -8.627331
#> 25 Seed 323 R0 -8.627331
#> 26 Seed 309 R0 -8.627331
#> 27 Seed 303 R0 -8.627331
#> 28 Seed 305 R0 -8.627331
#> 29 Seed 329 lrc -3.233751
#> 30 Seed 327 lrc -3.233751
#> 31 Seed 325 lrc -3.233751
#> 32 Seed 307 lrc -3.233751
#> 33 Seed 331 lrc -3.233751
#> 34 Seed 311 lrc -3.233751
#> 35 Seed 315 lrc -3.233751
#> 36 Seed 321 lrc -3.233751
#> 37 Seed 319 lrc -3.233751
#> 38 Seed 301 lrc -3.233751
#> 39 Seed 323 lrc -3.233751
#> 40 Seed 309 lrc -3.233751
#> 41 Seed 303 lrc -3.233751
#> 42 Seed 305 lrc -3.233751
tidy(fm1, effects="fixed")
#> # A tibble: 3 x 5
#> term estimate std.error statistic p.value
#> <chr> <dbl> <dbl> <dbl> <dbl>
#> 1 Asym 101. 2.46 41.2 7.89e-50
#> 2 R0 -8.63 0.318 -27.1 3.35e-38
#> 3 lrc -3.23 0.0343 -94.4 7.81e-74
library(broom.mixed)
#>
#> Attaching package: 'broom.mixed'
#> The following object is masked from 'package:broom':
#>
#> tidyMCMC
tidy(fm1, effects="ran_pars")
#> Warning in tidy.lme(fm1, effects = "ran_pars"): ran_pars not yet
#> implemented for nonlinear models
#> # A tibble: 0 x 0
tidy(fm1, effects="random")
#> Error in tidy.lme(fm1, effects = "random"): unknown effect type random
tidy(fm1, effects="fixed")
#> # A tibble: 3 x 6
#> term estimate std.error df statistic p.value
#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 Asym 101. 2.46 68 41.2 7.89e-50
#> 2 R0 -8.63 0.318 68 -27.1 3.35e-38
#> 3 lrc -3.23 0.0343 68 -94.4 7.81e-74
sessionInfo()
#> R version 3.5.3 (2019-03-11)
#> Platform: x86_64-w64-mingw32/x64 (64-bit)
#> Running under: Windows 10 x64 (build 16299)
#>
#> Matrix products: default
#>
#> locale:
#> [1] LC_COLLATE=English_United States.1252
#> [2] LC_CTYPE=English_United States.1252
#> [3] LC_MONETARY=English_United States.1252
#> [4] LC_NUMERIC=C
#> [5] LC_TIME=English_United States.1252
#>
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#>
#> other attached packages:
#> [1] broom.mixed_0.2.4.9000 broom_0.5.2 nlme_3.1-137
#>
#> loaded via a namespace (and not attached):
#> [1] Rcpp_1.0.1 pillar_1.3.1 compiler_3.5.3 highr_0.8
#> [5] plyr_1.8.4 TMB_1.7.15 tools_3.5.3 digest_0.6.18
#> [9] evaluate_0.13 tibble_2.1.1 lattice_0.20-38 pkgconfig_2.0.2
#> [13] rlang_0.3.4 Matrix_1.2-17 cli_1.1.0 yaml_2.2.0
#> [17] xfun_0.6 coda_0.19-2 dplyr_0.8.0.1 stringr_1.4.0
#> [21] knitr_1.22 generics_0.0.2 grid_3.5.3 tidyselect_0.2.5
#> [25] glue_1.3.1 R6_2.4.0 fansi_0.4.0 rmarkdown_1.12
#> [29] reshape2_1.4.3 purrr_0.3.2 tidyr_0.8.3 magrittr_1.5
#> [33] backports_1.1.4 htmltools_0.3.6 assertthat_0.2.1 utf8_1.1.4
#> [37] stringi_1.4.3 crayon_1.3.4 Created on 2019-04-15 by the reprex package (v0.2.1) |
It also seems counter-intuitive to me that the default is not "fixed" |
I don't believe the |
More questions:
|
I just saw the default for lmer is fixed + ran_pars that makes more sense than the "random" from broom. |
I have updated the tidiers, they seem to be similar to the
I consider this complete, unless you have any objections to the interface. library(nlmixr)
one.cmt <- function() {
ini({
tka <- .5 # log Ka
tcl <- -3.2 # log Cl
tv <- -1 # log V
eta.ka ~ 1
eta.cl ~ 2
eta.v ~ 1
add.err <- 0.1
})
model({
ka <- exp(tka + eta.ka)
cl <- exp(tcl + eta.cl)
v <- exp(tv + eta.v)
linCmt() ~ add(add.err)
})
}
fit <- nlmixr(one.cmt, theo_sd, est="nlme")
#> Warning in nlmixrUI.nlme.var(obj): Initial condition for additive error
#> ignored with nlme
#>
#> **Iteration 1
#> LME step: Loglik: -182.2318, nlminb iterations: 1
#> reStruct parameters:
#> ID1 ID2 ID3
#> 0.2783009 1.0022617 2.0758984
#> Beginning PNLS step: .. completed fit_nlme() step.
#> PNLS step: RSS = 63.1492
#> fixed effects: 0.4479981 -3.211935 -0.7859319
#> iterations: 7
#> Convergence crit. (must all become <= tolerance = 1e-05):
#> fixed reStruct
#> 0.2723749 3.2673500
#>
#> **Iteration 2
#> LME step: Loglik: -179.291, nlminb iterations: 9
#> reStruct parameters:
#> ID1 ID2 ID3
#> 0.08333469 0.96385386 1.63552496
#> Beginning PNLS step: .. completed fit_nlme() step.
#> PNLS step: RSS = 63.28224
#> fixed effects: 0.4441499 -3.211529 -0.7863391
#> iterations: 7
#> Convergence crit. (must all become <= tolerance = 1e-05):
#> fixed reStruct
#> 0.008664073 0.172140456
#>
#> **Iteration 3
#> LME step: Loglik: -179.337, nlminb iterations: 8
#> reStruct parameters:
#> ID1 ID2 ID3
#> 0.07085101 0.96127445 1.63887834
#> Beginning PNLS step: .. completed fit_nlme() step.
#> PNLS step: RSS = 63.21956
#> fixed effects: 0.445849 -3.211695 -0.7861748
#> iterations: 7
#> Convergence crit. (must all become <= tolerance = 1e-05):
#> fixed reStruct
#> 0.003810966 0.083040769
#>
#> **Iteration 4
#> LME step: Loglik: -179.3201, nlminb iterations: 7
#> reStruct parameters:
#> ID1 ID2 ID3
#> 0.07619041 0.96243387 1.63736919
#> Beginning PNLS step: .. completed fit_nlme() step.
#> PNLS step: RSS = 63.24586
#> fixed effects: 0.4451181 -3.211622 -0.7862475
#> iterations: 7
#> Convergence crit. (must all become <= tolerance = 1e-05):
#> fixed reStruct
#> 0.001641979 0.034519243
#>
#> **Iteration 5
#> LME step: Loglik: -179.328, nlminb iterations: 6
#> reStruct parameters:
#> ID1 ID2 ID3
#> 0.07381939 0.96192229 1.63801880
#> Beginning PNLS step: .. completed fit_nlme() step.
#> PNLS step: RSS = 63.23423
#> fixed effects: 0.4454379 -3.211654 -0.7862161
#> iterations: 7
#> Convergence crit. (must all become <= tolerance = 1e-05):
#> fixed reStruct
#> 0.0007179333 0.0153297894
#>
#> **Iteration 6
#> LME step: Loglik: -179.3247, nlminb iterations: 5
#> reStruct parameters:
#> ID1 ID2 ID3
#> 0.07486971 0.96215578 1.63772962
#> Beginning PNLS step: .. completed fit_nlme() step.
#> PNLS step: RSS = 63.24087
#> fixed effects: 0.4454379 -3.211654 -0.7862161
#> iterations: 1
#> Convergence crit. (must all become <= tolerance = 1e-05):
#> fixed reStruct
#> 0.000000000 0.008689492
#>
#> **Iteration 7
#> LME step: Loglik: -179.3247, nlminb iterations: 1
#> reStruct parameters:
#> ID1 ID2 ID3
#> 0.07485046 0.96214641 1.63773356
#> Beginning PNLS step: .. completed fit_nlme() step.
#> PNLS step: RSS = 63.24087
#> fixed effects: 0.4454379 -3.211654 -0.7862161
#> iterations: 1
#> Convergence crit. (must all become <= tolerance = 1e-05):
#> fixed reStruct
#> 0.00000e+00 1.29286e-11
#> Calculating residuals/tables
#> done.
tidy(fit)
#> # A tibble: 7 x 5
#> effect group term estimate std.error
#> <chr> <chr> <chr> <dbl> <dbl>
#> 1 fixed <NA> tka 1.56 0.309
#> 2 fixed <NA> tcl 0.0403 0.00340
#> 3 fixed <NA> tv 0.456 0.0211
#> 4 ran_pars ID SD(eta.ka) 0.642 NA
#> 5 ran_pars ID SD(eta.cl) 0.264 NA
#> 6 ran_pars ID SD(eta.v) 0.135 NA
#> 7 ran_pars Residual(add) add.err 0.692 NA
tidy(fit,effects="fixed")
#> # A tibble: 3 x 4
#> effect term estimate std.error
#> <chr> <chr> <dbl> <dbl>
#> 1 fixed tka 1.56 0.309
#> 2 fixed tcl 0.0403 0.00340
#> 3 fixed tv 0.456 0.0211
tidy(fit,effects="random")
#> # A tibble: 36 x 5
#> effect group level term estimate
#> <chr> <fct> <int> <fct> <dbl>
#> 1 ran_vals ID 1 eta.ka 0.124
#> 2 ran_vals ID 2 eta.ka 0.224
#> 3 ran_vals ID 3 eta.ka 0.390
#> 4 ran_vals ID 4 eta.ka -0.255
#> 5 ran_vals ID 5 eta.ka -0.0728
#> 6 ran_vals ID 6 eta.ka -0.311
#> 7 ran_vals ID 7 eta.ka -0.805
#> 8 ran_vals ID 8 eta.ka -0.152
#> 9 ran_vals ID 9 eta.ka 1.43
#> 10 ran_vals ID 10 eta.ka -0.771
#> # … with 26 more rows
tidy(fit, effects="ran_pars")
#> # A tibble: 4 x 4
#> effect group term estimate
#> <chr> <chr> <chr> <dbl>
#> 1 ran_pars ID SD(eta.ka) 0.642
#> 2 ran_pars ID SD(eta.cl) 0.264
#> 3 ran_pars ID SD(eta.v) 0.135
#> 4 ran_pars Residual(add) add.err 0.692
tidy(fit, effects="ran_vals")
#> # A tibble: 36 x 5
#> effect group level term estimate
#> <chr> <fct> <int> <fct> <dbl>
#> 1 ran_vals ID 1 eta.ka 0.124
#> 2 ran_vals ID 2 eta.ka 0.224
#> 3 ran_vals ID 3 eta.ka 0.390
#> 4 ran_vals ID 4 eta.ka -0.255
#> 5 ran_vals ID 5 eta.ka -0.0728
#> 6 ran_vals ID 6 eta.ka -0.311
#> 7 ran_vals ID 7 eta.ka -0.805
#> 8 ran_vals ID 8 eta.ka -0.152
#> 9 ran_vals ID 9 eta.ka 1.43
#> 10 ran_vals ID 10 eta.ka -0.771
#> # … with 26 more rows
## Still not sure what ran_coefs means/should be.
glance(fit)
#> # A tibble: 1 x 5
#> OBJF AIC BIC logLik conditionNumber
#> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 116. 373. 393. -179. 18.2
library(ggplot2)
library(dotwhisker)
tidy(fit) %>% dwplot Created on 2019-04-22 by the reprex package (v0.2.1) |
|
For |
No, at present it's silently (!!) ignored. It should do something sensible for GLMMs, though (hard to see a use case for LMMs). |
Thank you for the explanation about the library(nlmixr)
one.cmt <- function() {
ini({
tka <- .5 # log Ka
tcl <- -3.2 # log Cl
tv <- -1 # log V
eta.ka ~ 1
eta.cl ~ 2
eta.v ~ 1
add.err <- 0.1
})
model({
ka <- exp(tka + eta.ka)
cl <- exp(tcl + eta.cl)
v <- exp(tv + eta.v)
linCmt() ~ add(add.err)
})
}
fit <- nlmixr(one.cmt, theo_sd, est="nlme")
#> Warning in nlmixrUI.nlme.var(obj): Initial condition for additive error
#> ignored with nlme
#>
#> **Iteration 1
#> LME step: Loglik: -182.2318, nlminb iterations: 1
#> reStruct parameters:
#> ID1 ID2 ID3
#> 0.2783009 1.0022617 2.0758984
#> Beginning PNLS step: .. completed fit_nlme() step.
#> PNLS step: RSS = 63.1492
#> fixed effects: 0.4479981 -3.211935 -0.7859319
#> iterations: 7
#> Convergence crit. (must all become <= tolerance = 1e-05):
#> fixed reStruct
#> 0.2723749 3.2673500
#>
#> **Iteration 2
#> LME step: Loglik: -179.291, nlminb iterations: 9
#> reStruct parameters:
#> ID1 ID2 ID3
#> 0.08333469 0.96385386 1.63552496
#> Beginning PNLS step: .. completed fit_nlme() step.
#> PNLS step: RSS = 63.28224
#> fixed effects: 0.4441499 -3.211529 -0.7863391
#> iterations: 7
#> Convergence crit. (must all become <= tolerance = 1e-05):
#> fixed reStruct
#> 0.008664073 0.172140456
#>
#> **Iteration 3
#> LME step: Loglik: -179.337, nlminb iterations: 8
#> reStruct parameters:
#> ID1 ID2 ID3
#> 0.07085101 0.96127445 1.63887834
#> Beginning PNLS step: .. completed fit_nlme() step.
#> PNLS step: RSS = 63.21956
#> fixed effects: 0.445849 -3.211695 -0.7861748
#> iterations: 7
#> Convergence crit. (must all become <= tolerance = 1e-05):
#> fixed reStruct
#> 0.003810966 0.083040769
#>
#> **Iteration 4
#> LME step: Loglik: -179.3201, nlminb iterations: 7
#> reStruct parameters:
#> ID1 ID2 ID3
#> 0.07619041 0.96243387 1.63736919
#> Beginning PNLS step: .. completed fit_nlme() step.
#> PNLS step: RSS = 63.24586
#> fixed effects: 0.4451181 -3.211622 -0.7862475
#> iterations: 7
#> Convergence crit. (must all become <= tolerance = 1e-05):
#> fixed reStruct
#> 0.001641979 0.034519243
#>
#> **Iteration 5
#> LME step: Loglik: -179.328, nlminb iterations: 6
#> reStruct parameters:
#> ID1 ID2 ID3
#> 0.07381939 0.96192229 1.63801880
#> Beginning PNLS step: .. completed fit_nlme() step.
#> PNLS step: RSS = 63.23423
#> fixed effects: 0.4454379 -3.211654 -0.7862161
#> iterations: 7
#> Convergence crit. (must all become <= tolerance = 1e-05):
#> fixed reStruct
#> 0.0007179333 0.0153297894
#>
#> **Iteration 6
#> LME step: Loglik: -179.3247, nlminb iterations: 5
#> reStruct parameters:
#> ID1 ID2 ID3
#> 0.07486971 0.96215578 1.63772962
#> Beginning PNLS step: .. completed fit_nlme() step.
#> PNLS step: RSS = 63.24087
#> fixed effects: 0.4454379 -3.211654 -0.7862161
#> iterations: 1
#> Convergence crit. (must all become <= tolerance = 1e-05):
#> fixed reStruct
#> 0.000000000 0.008689492
#>
#> **Iteration 7
#> LME step: Loglik: -179.3247, nlminb iterations: 1
#> reStruct parameters:
#> ID1 ID2 ID3
#> 0.07485046 0.96214641 1.63773356
#> Beginning PNLS step: .. completed fit_nlme() step.
#> PNLS step: RSS = 63.24087
#> fixed effects: 0.4454379 -3.211654 -0.7862161
#> iterations: 1
#> Convergence crit. (must all become <= tolerance = 1e-05):
#> fixed reStruct
#> 0.00000e+00 1.29286e-11
#> Calculating residuals/tables
#> done.
tidy(fit)
#> # A tibble: 7 x 5
#> effect group term estimate std.error
#> <chr> <chr> <chr> <dbl> <dbl>
#> 1 fixed <NA> tka 1.56 0.309
#> 2 fixed <NA> tcl 0.0403 0.00340
#> 3 fixed <NA> tv 0.456 0.0211
#> 4 ran_pars ID sd__eta.ka 0.642 NA
#> 5 ran_pars ID sd__eta.cl 0.264 NA
#> 6 ran_pars ID sd__eta.v 0.135 NA
#> 7 ran_pars Residual(add) add.err 0.692 NA
tidy(fit,effects="fixed")
#> # A tibble: 3 x 4
#> effect term estimate std.error
#> <chr> <chr> <dbl> <dbl>
#> 1 fixed tka 1.56 0.309
#> 2 fixed tcl 0.0403 0.00340
#> 3 fixed tv 0.456 0.0211
tidy(fit,effects="random")
#> # A tibble: 36 x 5
#> effect group level term estimate
#> <chr> <fct> <int> <fct> <dbl>
#> 1 ran_vals ID 1 eta.ka 0.124
#> 2 ran_vals ID 2 eta.ka 0.224
#> 3 ran_vals ID 3 eta.ka 0.390
#> 4 ran_vals ID 4 eta.ka -0.255
#> 5 ran_vals ID 5 eta.ka -0.0728
#> 6 ran_vals ID 6 eta.ka -0.311
#> 7 ran_vals ID 7 eta.ka -0.805
#> 8 ran_vals ID 8 eta.ka -0.152
#> 9 ran_vals ID 9 eta.ka 1.43
#> 10 ran_vals ID 10 eta.ka -0.771
#> # … with 26 more rows
tidy(fit, effects="ran_pars")
#> # A tibble: 4 x 4
#> effect group term estimate
#> <chr> <chr> <chr> <dbl>
#> 1 ran_pars ID sd__eta.ka 0.642
#> 2 ran_pars ID sd__eta.cl 0.264
#> 3 ran_pars ID sd__eta.v 0.135
#> 4 ran_pars Residual(add) add.err 0.692
tidy(fit, effects="ran_vals")
#> # A tibble: 36 x 5
#> effect group level term estimate
#> <chr> <fct> <int> <fct> <dbl>
#> 1 ran_vals ID 1 eta.ka 0.124
#> 2 ran_vals ID 2 eta.ka 0.224
#> 3 ran_vals ID 3 eta.ka 0.390
#> 4 ran_vals ID 4 eta.ka -0.255
#> 5 ran_vals ID 5 eta.ka -0.0728
#> 6 ran_vals ID 6 eta.ka -0.311
#> 7 ran_vals ID 7 eta.ka -0.805
#> 8 ran_vals ID 8 eta.ka -0.152
#> 9 ran_vals ID 9 eta.ka 1.43
#> 10 ran_vals ID 10 eta.ka -0.771
#> # … with 26 more rows
tidy(fit, effects="ran_coef")
#> # A tibble: 36 x 5
#> effect group level term estimate
#> <chr> <fct> <int> <fct> <dbl>
#> 1 ran_coef ID 1 tka 1.77
#> 2 ran_coef ID 2 tka 1.95
#> 3 ran_coef ID 3 tka 2.31
#> 4 ran_coef ID 4 tka 1.21
#> 5 ran_coef ID 5 tka 1.45
#> 6 ran_coef ID 6 tka 1.14
#> 7 ran_coef ID 7 tka 0.698
#> 8 ran_coef ID 8 tka 1.34
#> 9 ran_coef ID 9 tka 6.49
#> 10 ran_coef ID 10 tka 0.722
#> # … with 26 more rows
glance(fit)
#> # A tibble: 1 x 5
#> OBJF AIC BIC logLik conditionNumber
#> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 116. 373. 393. -179. 18.2
library(ggplot2)
library(dotwhisker)
tidy(fit) %>% dwplot Created on 2019-04-22 by the reprex package (v0.2.1) |
Hi,
What is the correct way to implement broom for nlmixr?
My biggest question is that I don't want to re-export the tidy methods because it would introduce a new dependency to nlmixr; So, what is the correct way to specify this dependency?
The text was updated successfully, but these errors were encountered: