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.
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.
test_relations(dtest, param, cov, state, continuous)
dtest to append (from an previous use
Character. Name of parameter(s).
Character. Name of covariate(s).
Numeric or character. Number/name of state (see details).
Logical (default =
FALSE, will treat the
covariate as categorical.
tibble describing relationships to test.
PARCOV= ( 1 + THETA(1)*(COV -median))
IF(COV.LE.median) PARCOV = ( 1 + THETA(1)*(COV - median)) IF(COV.GT.median) PARCOV = ( 1 + THETA(2)*(COV - median))
PARCOV= EXP(THETA(1)*(COV - median))
PARCOV= ( 1 + THETA(1)*(LOG(COV) - log(median)))
dtest <- test_relations(param = c("KA", "K", "V"), cov = c("LIN1", "LIN2", "LIN3", "RND1", "RND2", "RND3"), state = c("linear", "power"), continuous = TRUE) %>% test_relations(param = c("KA", "K", "V"), cov = "BN1", state = "linear", continuous = FALSE) dtest #> # A tibble: 39 × 4 #> param cov state continuous #> <chr> <chr> <chr> <lgl> #> 1 KA LIN1 linear TRUE #> 2 K LIN1 linear TRUE #> 3 V LIN1 linear TRUE #> 4 KA LIN2 linear TRUE #> 5 K LIN2 linear TRUE #> 6 V LIN2 linear TRUE #> 7 KA LIN3 linear TRUE #> 8 K LIN3 linear TRUE #> 9 V LIN3 linear TRUE #> 10 KA RND1 linear TRUE #> # … with 29 more rows