Description Usage Arguments Value Methods (by class) Examples
When an ipa_brew
is mashed, training data are
used to fit imputation models based on the brew flavor.
1 2 3 4 5 6 7 |
brew |
an |
with |
a helper function for mashing brews. See masher_nbrs and masher_soft) |
... |
additional arguments for specific brew flavors. |
an ipa_brew
object with additional values attached to pars
.
softImpute_brew
: Mash a soft brew (use masher_soft for with
).
kneighbors_brew
: Mash a neighbor's brew (use masher_nbrs for with
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | x1 = rnorm(100)
x2 = rnorm(100) + x1
x3 = rnorm(100) + x1 + x2
outcome = 0.5 * (x1 - x2 + x3)
data <- data.frame(x1=x1, x2=x2, x3=x3, outcome=outcome)
n_miss = 10
data[1:n_miss,'x1'] = NA
sft_brew <- brew_soft(data, outcome=outcome, bind_miss = FALSE)
# these two calls are equivalent
mash(sft_brew, with = masher_soft(bs = FALSE))
mash(sft_brew, bs = FALSE)
knn_brew <- brew_nbrs(data, outcome=outcome, bind_miss = TRUE) %>%
# these two calls are equivalent
mash(knn_brew, with = masher_nbrs(fun_aggr_ctns = median))
mash(knn_brew, fun_aggr_ctns = median)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.