Extracts results from completed covariate runs and combines them into the
covariate tibble()
.
The goal of NMproject's covariate modelling functions is to provide a stepwise covariate method with manual decision making. This important to ensure that the full model selection/evaluation criteria (should be defined in statistical analysis plans) can be applied at every step rather than just log likelihood ratio testing, where the most significant model may be unstable, may worsen model predictions or may only be slightly more significant than a more physiologically plausible covariate relationship.
The functions test_relations()
, covariate_step_tibble()
,
bind_covariate_results()
together comprise NMproject stepwise covariate
method with manual decision. The goal is to be part way between PsN's SCM
and completely manual process at each forward and backward elimination step.
The syntax of how covariates are included is the same as PsN's SCM routine -
See PsN documentation
for more information.
bind_covariate_results(dsc, nm_col = "m", parameters = "new")
An output tibble
from covariate_step_tibble()
.
Character (default = "m"
). Name of column to store nm objects.
Character (default = "new"
). Passed to summary_wide()
.
An modified version of dsc
with additional columns from
summary_wide()
for model selection purposes.
covariate_step_tibble()
and nm_render()
for rendering diagnostic
reports for (subsets of) models in nm_col
.
## requires NONMEM to be installed
if (FALSE) {
## create tibble of covariate step with model objects as column m
dsm1 <- m1 %>% covariate_step_tibble(
run_id = "m1_f1",
dtest = dtest,
direction = "forward"
)
## run all models greedily
dsm1$m <- dsm1$m %>% run_nm()
wait_finish(dsm1$m)
## extract results and put into tibble
dsm1 <- dsm1 %>% bind_covariate_results()
## plot goodness of fit diagnostics top 3 models (in terms of p-value)
dsm1$m[1:3] %>% nm_render("Scripts/basic_gof.Rmd")
}