Generates univariate synthetic data using bagging. It uses
randomForest function from the randomForest package with
number of sampled predictors equal to number of all predictors.
syn.bag(y, x, xp, smoothing = "", proper = FALSE, ntree = 10, ...)A list with two components:
a vector of length k with synthetic values of y.
the model fitted to the observed data that was used to produce synthetic values.
an original data vector of length n.
a matrix (n x p) of original covariates.
a matrix (k x p) of synthesised covariates.
smoothing method for numeric variable. See
syn.smooth.
for proper synthesis (proper = TRUE) a model is fitted
to a bootstrapped sample of the original data.
number of trees to grow.
additional parameters passed to
randomForest.
...
...
syn, syn.rf, syn.cart,
randomForest, syn.smooth