diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2021-07-23 18:13:14 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2021-07-23 18:13:14 +0200 |
commit | 36b67cc7505a0a7f0960d4cb820c527f27e18f9c (patch) | |
tree | 389897451f80e8684b2ba6d9bb3da53bd4d5cbff /vignettes/web_only | |
parent | 40b78bed232798ecbeb72759cdf8d400ea35b31f (diff) | |
parent | 25648577b6d5a4521da7c9d2eb174d292d2d85af (diff) |
Merge branch 'master' into nlmixr
After the merge, run make test and accept the new snapshot for the mixed
model fit for an nlme object
Diffstat (limited to 'vignettes/web_only')
-rw-r--r-- | vignettes/web_only/dimethenamid_2018.R | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/vignettes/web_only/dimethenamid_2018.R b/vignettes/web_only/dimethenamid_2018.R deleted file mode 100644 index 625cceb8..00000000 --- a/vignettes/web_only/dimethenamid_2018.R +++ /dev/null @@ -1,66 +0,0 @@ -## ---- include = FALSE--------------------------------------------------------- -require(knitr) -options(digits = 5) -opts_chunk$set( - comment = "", - tidy = FALSE, - cache = TRUE -) - -## ----dimethenamid_data-------------------------------------------------------- -library(mkin) -dmta_ds <- lapply(1:8, function(i) { - ds_i <- dimethenamid_2018$ds[[i]]$data - ds_i[ds_i$name == "DMTAP", "name"] <- "DMTA" - ds_i$time <- ds_i$time * dimethenamid_2018$f_time_norm[i] - ds_i -}) -names(dmta_ds) <- sapply(dimethenamid_2018$ds, function(ds) ds$title) -dmta_ds[["Borstel"]] <- rbind(dmta_ds[["Borstel 1"]], dmta_ds[["Borstel 2"]]) -dmta_ds[["Borstel 1"]] <- NULL -dmta_ds[["Borstel 2"]] <- NULL -dmta_ds[["Elliot"]] <- rbind(dmta_ds[["Elliot 1"]], dmta_ds[["Elliot 2"]]) -dmta_ds[["Elliot 1"]] <- NULL -dmta_ds[["Elliot 2"]] <- NULL - -## ----f_parent_mkin------------------------------------------------------------ -f_parent_mkin_const <- mmkin(c("SFO", "DFOP"), dmta_ds, - error_model = "const", quiet = TRUE) -f_parent_mkin_tc <- mmkin(c("SFO", "DFOP"), dmta_ds, - error_model = "tc", quiet = TRUE) - -## ----f_parent_mkin_sfo_const-------------------------------------------------- -plot(mixed(f_parent_mkin_const["SFO", ])) - -## ----f_parent_mkin_dfop_const------------------------------------------------- -plot(mixed(f_parent_mkin_const["DFOP", ])) - -## ----f_parent_mkin_dfop_const_test-------------------------------------------- -plot(mixed(f_parent_mkin_const["DFOP", ]), test_log_parms = TRUE) - -## ----f_parent_mkin_dfop_tc_test----------------------------------------------- -plot(mixed(f_parent_mkin_tc["DFOP", ]), test_log_parms = TRUE) - -## ----f_parent_nlme, warning = FALSE------------------------------------------- -f_parent_nlme_sfo_const <- nlme(f_parent_mkin_const["SFO", ]) -#f_parent_nlme_dfop_const <- nlme(f_parent_mkin_const["DFOP", ]) # error -f_parent_nlme_sfo_tc <- nlme(f_parent_mkin_tc["SFO", ]) -f_parent_nlme_dfop_tc <- nlme(f_parent_mkin_tc["DFOP", ]) - -## ----f_parent_nlme_logchol, warning = FALSE, eval = FALSE--------------------- -# f_parent_nlme_sfo_const_logchol <- nlme(f_parent_mkin_const["SFO", ], -# random = pdLogChol(list(DMTA_0 ~ 1, log_k_DMTA ~ 1))) -# anova(f_parent_nlme_sfo_const, f_parent_nlme_sfo_const_logchol) # not better -# f_parent_nlme_dfop_tc_logchol <- update(f_parent_nlme_dfop_tc, -# random = pdLogChol(list(DMTA_0 ~ 1, log_k1 ~ 1, log_k2 ~ 1, g_qlogis ~ 1))) -# # using log Cholesky parameterisation for random effects (nlme default) does -# # not converge and gives lots of warnings about the LME step not converging - -## ----AIC_parent_nlme---------------------------------------------------------- -anova( - f_parent_nlme_sfo_const, f_parent_nlme_sfo_tc, f_parent_nlme_dfop_tc -) - -## ----plot_parent_nlme--------------------------------------------------------- -plot(f_parent_nlme_dfop_tc) - |