Analyse an estimand under multiple imputation for dropout
Source:R/imputation-pool.R
analyseEstimand.RdEnd-to-end analysis of a declared defineEstimand estimand:
multiply-impute the dropout-missing longitudinal response (in wide form, so
the within-subject correlation is respected), fit an MMRM
(fitMMRM) to each completed data set, and pool the fixed
effects with Rubin's rules (poolEstimates()). Treatment-policy and
hypothetical strategies use the standard MAR imputation; other strategies
warn that they need a bespoke imputation model.
Usage
analyseEstimand(
data,
estimand,
response,
treatment,
time,
subject,
covariates = NULL,
m = 20,
method = "norm",
seed = NULL,
covariance = "unstructured"
)Arguments
- data
Long-format data (subject x time rows) with the response, treatment, time, subject, and any (subject-level) covariates.
- estimand
An
"estimand"fromdefineEstimand().- response, treatment, time, subject
Column names.
- covariates
Optional subject-level covariate column names.
- m
Number of imputations (default 20).
- method
mice method (default
"norm", appropriate for a continuous longitudinal response).- seed
Optional integer seed.
- covariance
MMRM covariance structure (default
"unstructured").
Value
An AnalysisResult (type "estimand_analysis") carrying
the estimand attributes and the pooled fixed-effect table.