ensembleImpute | R Documentation |
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.
ensembleImpute(imputes, method="mean",...)
imputes |
a list of objects class |
method |
when "mean", the continuous variables are averaged using |
... |
passed to |
An object of class c("impute.yai","data.frame")
, see impute.yai
.
The attributes of the data.frame include the following:
sd - A data.frame of standard deviations for continuous variables if there are any. The columns are not reported if the standard deviation is zero for all observations which is typically true of "observed" values.
N - the number of replications used to compute the corresponding data;
reported only if the number differs from the total number of replications. This
will be the case when bootstrap
, sampleVar
, or both are used in
yai
.
methods - the method used for each variable.
Nicholas L. Crookston ncrookston.fs@gmail.com
John Coulston jcoulston@fs.fed.us
yai
buildConsensus
impute.yai
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.