ensembleImpute: Computes the mean, median, or mode among a list of impute.yai...

Description Usage Arguments Value Author(s) See Also Examples

Description

Several objects of class impute.yai or yai are combined by computing the mean, median, or mode of separate, individual imputations. The intention is that the members of the first argument would be formed by running yai several times with bootstrap=TRUE or by varying other options.

Usage

1
ensembleImpute(imputes, method="mean",...)

Arguments

imputes

a list of objects class impute.yai or yai. Function impute.yai is called for list members where the class is yai.

method

when "mean", the continuous variables are averaged using mean, otherwise the median is used. Mode is always used for character data (generally the case for factors).

...

passed to impute.yai.

Value

An object of class c("impute.yai","data.frame"), see impute.yai. The attributes of the data.frame include the following:

Author(s)

Nicholas L. Crookston [email protected]
John Coulston [email protected]

See Also

yai buildConsensus impute.yai

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
require (yaImpute)
data(iris)

set.seed(123) 

# form some test data, y's are defined only for reference
# observations.
refs=sample(rownames(iris),50)
x <- iris[,1:2]      # Sepal.Length Sepal.Width
y <- iris[refs,3:4]  # Petal.Length Petal.Width

reps <- replicate(10, yai(x=x,y=y,method="msn",bootstrap=TRUE,k=2),
                  simplify=FALSE)

ensembleImpute(reps,ancillaryData=iris)

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