Learn R Programming

yaImpute (version 1.0-32)

plot.yai: Plot observed verses imputed data

Description

Provides a matrix of plots of observed verses imputed values for variables in an object created by impute.yai, which are of class c("impute.yai","data.frame").

Usage

# S3 method for yai
plot(x,vars=NULL,pointColor=1,lineColor=2,spineColor=NULL,residual=FALSE,...)

Arguments

x
  1. a data frame created by impute.yai, or

  2. an object created by yai.

vars

a list of variable names you want to include, if NULL all available Y-variables are included.

pointColor

a color vector for the xy plots (continuous variables).

lineColor

a color 1:1 lines in xy plots.

spineColor

a color vector for the spine plots (factors), one value per level.

residual

plots in a residual format (observed-imputed over imputed).

...

passed to called functions.

Author

Nicholas L. Crookston ncrookston.fs@gmail.com
Andrew O. Finley finleya@msu.edu

Examples

Run this code
require(yaImpute)

data(iris)

# form some test data
refs=sample(rownames(iris),50)
x <- iris[,1:3]      # Sepal.Length Sepal.Width Petal.Length
y <- iris[refs,4:5]  # Petal.Width Species

mal <- yai(x=x,y=y,method="mahalanobis")
malImp=impute(mal,newdata=iris)
plot(malImp)

Run the code above in your browser using DataLab