plot_misl_trace: Plot trace statistics from a MISL imputation

View source: R/misl.R

plot_misl_traceR Documentation

Plot trace statistics from a MISL imputation

Description

Plots the mean and standard deviation of imputed values across iterations for all incomplete variables, paginated in grids of up to 3 variables per page. Stable traces that mix well across datasets indicate convergence. Note that trace statistics are only computed for continuous and numeric binary columns – categorical and ordinal columns are excluded automatically.

Usage

plot_misl_trace(misl_result, ncol = 2, nrow = 3)

Arguments

misl_result

A list returned by misl().

ncol

Number of columns per page. Default 2.

nrow

Number of rows per page. Default 3.

Value

Invisibly returns the long-format trace data frame used for plotting.

Examples

set.seed(1)
n <- 100
demo_data <- data.frame(x1 = rnorm(n), x2 = rnorm(n), y = rnorm(n))
demo_data[sample(n, 10), "y"] <- NA
misl_imp <- misl(demo_data, m = 3, maxit = 3, con_method = "glm")
plot_misl_trace(misl_imp)

misl documentation built on April 8, 2026, 9:07 a.m.