choosemaxit {clusterMI}R Documentation

Diagnostic plot for the number of iterations used in sequential imputation methods

Description

The choosemaxit function plots the within and between variance for each variable (specified in plotvars) against the iteration number for each of the replications (specified in plotm).

Usage

choosemaxit(
  output,
  plotvars = NULL,
  plotm = 1:5,
  size = 0.5,
  linewidth = 1,
  linetype = "dotdash",
  xlab = "iterations",
  ylab = "var",
  title = "Within and between variance plots",
  nvar_by_row = 5
)

Arguments

output

an outpout from the imputedata function

plotvars

index of variables for which a curve is plotted

plotm

a vector indicating which imputed datasets must be plotted

size

size of points

linewidth

a numerical value setting the widths of lines

linetype

what type of plot should be drawn

xlab

a title for the x axis

ylab

a title for the y axis

title

the main title

nvar_by_row

the number of variables that are plotted per window. Default value is 5.

Value

No return value

Examples

data(wine)
set.seed(123456)
wine.na <- wine
wine.na$cult <- NULL
wine.na <- prodna(wine.na)
nb.clust <- 3 # number of clusters
m <- 3 # number of imputed data sets
maxit <- 50 # number of iterations for FCS imputation

res.imp <- imputedata(data.na = wine.na, method = "FCS-homo",
                      nb.clust = nb.clust, m = m, maxit = maxit)
choosemaxit(res.imp)


[Package clusterMI version 1.2.1 Index]