| strategies | R Documentation |
These functions are used to implement various reference based imputation strategies by combining a subjects own distribution with that of a reference distribution based upon which of their visits failed to meet the Missing-at-Random (MAR) assumption.
strategy_MAR(pars_group, pars_ref, index_mar)
strategy_JR(pars_group, pars_ref, index_mar)
strategy_CR(pars_group, pars_ref, index_mar)
strategy_CIR(pars_group, pars_ref, index_mar)
strategy_LMCF(pars_group, pars_ref, index_mar)
pars_group |
A list of parameters for the subject's group. See details. |
pars_ref |
A list of parameters for the subject's reference group. See details. |
index_mar |
A logical vector indicating which visits meet the MAR assumption for the subject. I.e. this identifies the observations after a non-MAR intercurrent event (ICE). |
pars_group and pars_ref both must be a list containing elements mu and sigma.
mu must be a numeric vector and sigma must be a square matrix symmetric covariance
matrix with dimensions equal to the length of mu and index_mar. e.g.
list(
mu = c(1,2,3),
sigma = matrix(c(4,3,2,3,5,4,2,4,6), nrow = 3, ncol = 3)
)
Users can define their own strategy functions and include them via the strategies
argument to impute() using getStrategies(). That being said the following
strategies are available "out the box":
Missing at Random (MAR)
Jump to Reference (JR)
Copy Reference (CR)
Copy Increments in Reference (CIR)
Last Mean Carried Forward (LMCF)
A list with elements mu (a numeric vector of means) and sigma (a
covariance matrix) giving the parameters of the subject's imputation
distribution, formed by combining their own group's parameters (pars_group)
with the reference group's parameters (pars_ref) according to the chosen
strategy.
# Parameters of the subject's own group and of the reference group
pars_group <- list(
mu = c(1, 2, 3),
sigma = as_vcov(c(1, 3, 2), c(0.4, 0.5, 0.45))
)
pars_ref <- list(
mu = c(5, 6, 7),
sigma = as_vcov(c(2, 1, 1), c(0.7, 0.8, 0.5))
)
# The first two visits meet the MAR assumption, the third does not
index_mar <- c(TRUE, TRUE, FALSE)
# Combine the parameters according to the different strategies
strategy_MAR(pars_group, pars_ref, index_mar)
strategy_JR(pars_group, pars_ref, index_mar)
strategy_CR(pars_group, pars_ref, index_mar)
strategy_CIR(pars_group, pars_ref, index_mar)
strategy_LMCF(pars_group, pars_ref, index_mar)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.