Learn R Programming

idem (version 2.2)

imPlotImputed: Plot density of imputed values

Description

Plot density of imputed values and the density of the observed outcomes

Usage

imPlotImputed(imp.rst, deltas = 0, endp = FALSE, fname = NULL,
  adj = 1.5, cols = c("red", "cyan", "blue", "green", "brown"),
  ltys = rep(1, 6), xlim = NULL, ylim = NULL, mfrow = NULL, ...)

Arguments

imp.rst

A class IDEM.IMP list containing complete data with relevant missing values imputed. See imImpAll.

deltas

Imputation sensitivity parameter for which to generate the results

endp

If TRUE, plot the densities of the imputed functional outcomes. Otherwise, plot the densities of the imputed outcomes

fname

File name of the result pdf file. If fname is null, result pdf file will not be generated

adj

density estimation option

cols

plot options

ltys

plot options

xlim

plot options

ylim

plot options

mfrow

plot options

...

Options for pdf function

Examples

Run this code
# NOT RUN {
lst.var <- list(trt="TRT", surv="SURV", outcome=c("Y1","Y2"), y0=NULL,
                endp=c("Y2"), unitTime="days",
                trt.label = c("UC+SBT", "SAT+SBT"),
                cov=c("AGE"), endfml="Y2", duration=365, bounds=c(0,100));
rst.fit <- imFitModel(abc, lst.var);
rst.imp <- imImpAll(abc, rst.fit, deltas=c(-0.25,0,0.25),
                    normal=TRUE, chains = 4, iter = 2000, warmup = 1000);
imPlotImputed(rst.imp, deltas=c(-0.25,0,0.25), xlim=c(0,100), endp=FALSE);
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab