View source: R/stepwise-covariate.R
test_relations | R Documentation |
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.
test_relations(dtest, param, cov, state, continuous)
dtest |
Optional existing |
param |
Character. Name of parameter(s). |
cov |
Character. Name of covariate(s). |
state |
Numeric or character. Number/name of state (see details). |
continuous |
Logical (default = |
Setting vector values for param
, cov
, and state
, will expand the grid
to test each value with every other value greedily. This is similar to
expand.grid()
available states (see also add_cov()
):
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= ((COV/median)**THETA(1))
PARCOV= ((COV/median))
PARCOV= ((COV/median)**0.75)
PARCOV= ( 1 + THETA(1)*(LOG(COV) - log(median)))
A tibble
describing relationships to test.
add_cov()
, covariate_step_tibble()
, bind_covariate_results()
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.