compare.yai: Compares different k-NN solutions

Description Usage Arguments Value Author(s) See Also Examples

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

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

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.

scale

passed to rmsd.yai

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. The scale values (if used) are returned as an attribute (all if some are different than others, a warning is issued).

Author(s)

Nicholas L. Crookston [email protected]
Andrew O. Finley [email protected]

See Also

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
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
msn <- yai(x=x,y=y)
mal <- yai(x=x,y=y,method="mahalanobis")

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

# compare the all variables in iris
compare.yai(msn,mal,ancillaryData=iris)  # Species is a factor, no comparison is made

yaImpute documentation built on May 2, 2019, 4:44 p.m.