buildConsensus: Finds the consensus imputations among a list of yai objects

Description Usage Arguments Value Author(s) See Also Examples

Description

Several objects of class yai are combined into a new object forming a consensus among the many. The intention is that the many would be formed by running yai several times with bootstrap=TRUE or by varying other options.

Usage

1
buildConsensus(reps, noTrgs=FALSE, noRefs=FALSE, k=NULL)

Arguments

reps

a list of objects class yai.

noTrgs

If TRUE neighbor relationships for target observations are not merged.

noRefs

If TRUE neighbor relationships for reference observations are not merged.

k

If not specified, the minimum value of k among the objects is used.

Value

An object of class yai

Author(s)

Nicholas L. Crookston ncrookston.fs@gmail.com
John Coulston jcoulston@fs.fed.us

See Also

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(20, yai(x=x,y=y,method="msn",bootstrap=TRUE,k=2),
                  simplify=FALSE)

buildConsensus(reps)

yaImpute documentation built on July 1, 2020, 3 a.m.