Learn R Programming

yaImpute (version 0.0-4)

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 class 'yai':
plot(x,\dots,vars=NULL,colxy=NULL,colspine=NULL,residual=FALSE)

Arguments

x
(1) a data frame created by impute.yai, or (2) an object created by yai.
...
passed to called functions.
vars
a list of variable names you want to include, if NULL all available Y-variables are included.
colxy
a color vector for the xy plots (continuous variables).
colspine
a color vector for the spine plots (factors).
residual
plots in a residual format (observed-imputed over imputed).

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