Description Usage Arguments Details Value Examples
Impute data using the information from an existing miceDefs
object.
1 2 3 4 5 6 7 |
data |
The data to be imputed. Must have all columns used in the imputation of miceDefs. |
miceObj |
A miceDefs object created by |
datasets |
A numeric vector specifying the datasets with which to impute |
iterations |
The number of iterations to run.
By default, the same as the number of iterations currently in |
verbose |
should progress be printed? |
This capability is experimental, but works well in
benchmarking.
The original data and random forests (if returnModels = TRUE) are returned when miceRanger
is called. These models can be recycled to impute a new dataset in the same fashion as miceRanger
,
by imputing each variable over a series of iterations. Each dataset created in miceObj
can be thought of as a different imputation mechanism, with different initialized values
and a different associated random forests. Therefore, it is necessary to choose the datasets
which will be used to impute the data. When mean matching a numeric variable, the candidate
values are drawn from the original data passed to miceRanger
, not the data
passed
to this function.
An object of class impDefs, which contains information about the imputation process.
callParams |
The parameters of the object. |
data |
The original data provided by the user. |
naWhere |
Logical index of missing data, having the same dimensions as |
missingCounts |
The number of missing values for each variable. |
imputedData |
A list of imputed datasets. |
1 2 3 4 5 | ampDat <- amputeData(iris)
miceObj <- miceRanger(ampDat,1,1,returnModels=TRUE,verbose=FALSE)
newDat <- amputeData(iris)
newImps <- impute(newDat,miceObj)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.