plot.shapeNA: Visualization of Shape Estimate

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Function to visualize the shape matrix from objects of class shapeNA by plotting a heatmap where light colored cells indicate small values and dark colored cells indicate high values.

Usage

1
2
## S3 method for class 'shapeNA'
plot(x, message = TRUE, ...)

Arguments

x

A shapeNA oopbject

message

A logical, If TRUE, the percentage of observed values per variable is printed in the console.

...

Additional parameters passed to image.

Value

A matrix with the proportion of observed values for each variable.

Examples

1
2
3
4
5
6
7
8
    x <- mvtnorm::rmvt(100, toeplitz(seq(1, 0.1, length.out = 3)), df = 5)
    y <- mice::ampute(x, mech='MCAR')$amp
    res <- tylerShapeNA(y)
    ## default plot
    plot(res)
    ## plot result in gray scale - reverse order to get a palette starting
    ## with the lightest instead of the darkest color
    plot(res, col = gray.colors(9, rev = TRUE))

shapeNA documentation built on March 15, 2021, 5:06 p.m.