diff --git a/man/hotdeck.Rd b/man/hotdeck.Rd index 99e09c9..c73cc5c 100644 --- a/man/hotdeck.Rd +++ b/man/hotdeck.Rd @@ -100,7 +100,8 @@ Other imputation methods: \code{\link{medianSamp}()}, \code{\link{rangerImpute}()}, \code{\link{regressionImp}()}, -\code{\link{sampleCat}()} +\code{\link{sampleCat}()}, +\code{\link{xgboostImpute}()} } \author{ Alexander Kowarik diff --git a/man/impPCA.Rd b/man/impPCA.Rd index 1e10ca8..d946c3e 100644 --- a/man/impPCA.Rd +++ b/man/impPCA.Rd @@ -91,7 +91,8 @@ Other imputation methods: \code{\link{medianSamp}()}, \code{\link{rangerImpute}()}, \code{\link{regressionImp}()}, -\code{\link{sampleCat}()} +\code{\link{sampleCat}()}, +\code{\link{xgboostImpute}()} } \author{ Matthias Templ diff --git a/man/irmi.Rd b/man/irmi.Rd index 064d3b9..2c7d3e0 100644 --- a/man/irmi.Rd +++ b/man/irmi.Rd @@ -160,7 +160,8 @@ Other imputation methods: \code{\link{medianSamp}()}, \code{\link{rangerImpute}()}, \code{\link{regressionImp}()}, -\code{\link{sampleCat}()} +\code{\link{sampleCat}()}, +\code{\link{xgboostImpute}()} } \author{ Matthias Templ, Alexander Kowarik diff --git a/man/kNN.Rd b/man/kNN.Rd index d730445..968597d 100644 --- a/man/kNN.Rd +++ b/man/kNN.Rd @@ -123,7 +123,8 @@ Other imputation methods: \code{\link{medianSamp}()}, \code{\link{rangerImpute}()}, \code{\link{regressionImp}()}, -\code{\link{sampleCat}()} +\code{\link{sampleCat}()}, +\code{\link{xgboostImpute}()} } \author{ Alexander Kowarik, Statistik Austria diff --git a/man/matchImpute.Rd b/man/matchImpute.Rd index 42f8699..760e79a 100644 --- a/man/matchImpute.Rd +++ b/man/matchImpute.Rd @@ -59,7 +59,8 @@ Other imputation methods: \code{\link{medianSamp}()}, \code{\link{rangerImpute}()}, \code{\link{regressionImp}()}, -\code{\link{sampleCat}()} +\code{\link{sampleCat}()}, +\code{\link{xgboostImpute}()} } \author{ Johannes Gussenbauer, Alexander Kowarik diff --git a/man/medianSamp.Rd b/man/medianSamp.Rd index a8c7896..b3598a6 100644 --- a/man/medianSamp.Rd +++ b/man/medianSamp.Rd @@ -24,6 +24,7 @@ Other imputation methods: \code{\link{matchImpute}()}, \code{\link{rangerImpute}()}, \code{\link{regressionImp}()}, -\code{\link{sampleCat}()} +\code{\link{sampleCat}()}, +\code{\link{xgboostImpute}()} } \concept{imputation methods} diff --git a/man/rangerImpute.Rd b/man/rangerImpute.Rd index ddfc418..3feafdc 100644 --- a/man/rangerImpute.Rd +++ b/man/rangerImpute.Rd @@ -52,6 +52,7 @@ Other imputation methods: \code{\link{matchImpute}()}, \code{\link{medianSamp}()}, \code{\link{regressionImp}()}, -\code{\link{sampleCat}()} +\code{\link{sampleCat}()}, +\code{\link{xgboostImpute}()} } \concept{imputation methods} diff --git a/man/regressionImp.Rd b/man/regressionImp.Rd index 1859e30..85e949a 100644 --- a/man/regressionImp.Rd +++ b/man/regressionImp.Rd @@ -68,7 +68,8 @@ Other imputation methods: \code{\link{matchImpute}()}, \code{\link{medianSamp}()}, \code{\link{rangerImpute}()}, -\code{\link{sampleCat}()} +\code{\link{sampleCat}()}, +\code{\link{xgboostImpute}()} } \author{ Alexander Kowarik diff --git a/man/sampleCat.Rd b/man/sampleCat.Rd index be7c8a6..9a6614d 100644 --- a/man/sampleCat.Rd +++ b/man/sampleCat.Rd @@ -24,6 +24,7 @@ Other imputation methods: \code{\link{matchImpute}()}, \code{\link{medianSamp}()}, \code{\link{rangerImpute}()}, -\code{\link{regressionImp}()} +\code{\link{regressionImp}()}, +\code{\link{xgboostImpute}()} } \concept{imputation methods} diff --git a/man/xgboostImpute.Rd b/man/xgboostImpute.Rd new file mode 100644 index 0000000..9e0a9c9 --- /dev/null +++ b/man/xgboostImpute.Rd @@ -0,0 +1,69 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/xgboostImpute.R +\name{xgboostImpute} +\alias{xgboostImpute} +\title{Xgboost Imputation} +\usage{ +xgboostImpute( + formula, + data, + imp_var = TRUE, + imp_suffix = "imp", + verbose = FALSE, + nrounds = 100, + objective = NULL, + ... +) +} +\arguments{ +\item{formula}{model formula for the imputation} + +\item{data}{A \code{data.frame} containing the data} + +\item{imp_var}{\code{TRUE}/\code{FALSE} if a \code{TRUE}/\code{FALSE} variables for each imputed +variable should be created show the imputation status} + +\item{imp_suffix}{suffix used for TF imputation variables} + +\item{verbose}{Show the number of observations used for training +and evaluating the RF-Model. This parameter is also passed down to +\code{\link[xgboost:xgb.train]{xgboost::xgboost()}} to show computation status.} + +\item{nrounds}{max number of boosting iterations, +argument passed to \code{\link[xgboost:xgb.train]{xgboost::xgboost()}}} + +\item{objective}{objective for xgboost, +argument passed to \code{\link[xgboost:xgb.train]{xgboost::xgboost()}}} + +\item{...}{Arguments passed to \code{\link[xgboost:xgb.train]{xgboost::xgboost()}}} +} +\value{ +the imputed data set. +} +\description{ +Impute missing values based on a random forest model using \code{\link[xgboost:xgb.train]{xgboost::xgboost()}} +} +\examples{ +data(sleep) +xgboostImpute(Dream~BodyWgt+BrainWgt,data=sleep) +xgboostImpute(Dream+NonD~BodyWgt+BrainWgt,data=sleep) +xgboostImpute(Dream+NonD+Gest~BodyWgt+BrainWgt,data=sleep) + +sleepx <- sleep +sleepx$Pred <- as.factor(LETTERS[sleepx$Pred]) +sleepx$Pred[1] <- NA +xgboostImpute(Pred~BodyWgt+BrainWgt,data=sleepx) +} +\seealso{ +Other imputation methods: +\code{\link{hotdeck}()}, +\code{\link{impPCA}()}, +\code{\link{irmi}()}, +\code{\link{kNN}()}, +\code{\link{matchImpute}()}, +\code{\link{medianSamp}()}, +\code{\link{rangerImpute}()}, +\code{\link{regressionImp}()}, +\code{\link{sampleCat}()} +} +\concept{imputation methods}