compare.yai {yaImpute}R Documentation

Compares different k-NN solutions

Description

Provides a convenient display of the root mean square differences (see rmsd.yai) or correlations (see cor.yai) between observed and imputed values for each of several imputations. Each column of the returned data frame corresponds to an imputation result and each row corresponds to a variable.

Usage

compare.yai(...,ancillaryData=NULL,vars=NULL,method="rmsd")

Arguments

... a list of objects created by yai or impute.yai that you wish to compare.
ancillaryData a data frame that defines new variables, passed to impute.yai.
vars a list of variable names you want to include; if NULL all available variables are included.
method when rmsd is specified, the comparison is based on root mean square differences between observed an imputed, and
when cor is specified, the comparison is based on correlations between observed and imputed.

Value

A data.frame of class c("compare.yai","data.frame"), where the columns are the names of the ...-arguments and the rows are a union of variable names. NA's are returned when the variables are factors.

Author(s)

Nicholas L. Crookston ncrookston@fs.fed.us
Andrew O. Finley afinley@stat.umn.edu

See Also

yai, plot.compare.yai, impute.yai, rmsd.yai

Examples

require(yaImpute)

data(iris)

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

# build yai objects using 2 methods
mal <- yai(x=x,y=y,method="mahalanobis")
gnn <- yai(x=x,y=y,method="gnn")

# compare the y variables
compare.yai(mal,gnn)

[Package yaImpute version 0.0-4 Index]