xyplot.mads: Scatterplot of amputed and non-amputed data against weighted...

View source: R/xyplot.mads.R

xyplot.madsR Documentation

Scatterplot of amputed and non-amputed data against weighted sum scores

Description

Plotting method to investigate relation between amputed data and the weighted sum scores. Based on lattice. xyplot produces scatterplots. The function plots the variables against the weighted sum scores. The function automatically separates the amputed and non-amputed data to see the relation between the amputation and the weighted sum scores.

Usage

## S3 method for class 'mads'
xyplot(
  x,
  data,
  which.pat = NULL,
  standardized = TRUE,
  layout = NULL,
  colors = mdc(1:2),
  ...
)

Arguments

x

A mads object, typically created by ampute.

data

A string or vector of variable names that needs to be plotted. As a default, all variables will be plotted.

which.pat

A scalar or vector indicating which patterns need to be plotted. As a default, all patterns are plotted.

standardized

Logical. Whether the scatterplots need to be created from standardized data or not. Default is TRUE.

layout

A vector of two values indicating how the scatterplots of one pattern should be divided over the plot. For example, c(2, 3) indicates that the scatterplots of six variables need to be placed on 3 rows and 2 columns. There are several defaults for different #variables. Note that for more than 9 variables, multiple plots will be created automatically.

colors

A vector of two RGB values defining the colors of the non-amputed and amputed data respectively. RGB values can be obtained with hcl.

...

Not used, but for consistency with generic

Value

A list containing the scatterplots. Note that a new pattern will always be shown in a new plot.

Note

The mads object contains all the information you need to make any desired plots. Check mads-class or the vignette Multivariate Amputation using Ampute to understand the contents of class object mads.

Author(s)

Rianne Schouten, 2016

See Also

ampute, bwplot, Lattice for an overview of the package, mads-class


stefvanbuuren/mice documentation built on April 21, 2024, 7:37 a.m.