View source: R/idem_imputation.R
imImpSingle | R Documentation |
Call STAN model to impute missing data for an individual subject under benchmark assumption for MCMC convergence checking
imImpSingle(
dsub,
fit.rst,
normal = TRUE,
chains = 4,
iter = 5000,
warmup = 1000,
control = list(adapt_delta = 0.95),
...,
seed = NULL
)
dsub |
original individual subject data |
fit.rst |
A class |
normal |
Logical variable indicating whether normality assumption should be made for the residuals |
chains |
STAN parameter. Number of Markov chainsm |
iter |
STAN parameter. Number of iterations |
warmup |
STAN parameter. Number of burnin. |
control |
STAN parameter. See |
... |
other options to call STAN sampling such as |
seed |
Random seed |
NULL
if there is no missing data in dsub
Otherwise, return a class IDEMSINGLE
object that contains a list with
components
original data of the subject
A stan.fit
class result returned from
rstan::sampling
A dataframe with complete data for the selected subject
im.abc <- imData(abc, trt="TRT", surv="SURV", outcome=c("Y1","Y2"),
y0=NULL, endfml="Y2",
trt.label = c("UC+SBT", "SAT+SBT"),
cov=c("AGE"), duration=365, bounds=c(0,100));
im.fit <- imFitModel(im.abc);
im.imp <- imImpSingle(abc[1,], im.fit, chains = 4, iter = 200, warmup = 100);
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.