Description Usage Arguments Value Examples
After setting your primary and secondary imputation parameters
(i.e., running spice and mash), you're ready to fit the
imputation model(s) that will impute missing values in your
training data. This is what the stir
function does.
1 |
brew |
an |
timer |
a logical value. If |
an ipa_brew
object with imputed values added to the wort
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | x1 = rnorm(100)
x2 = rnorm(100) + x1
x3 = rnorm(100) + x1 + x2
outcome = 0.5 * (x1 - x2 + x3)
n_miss = 10
x1[1:n_miss] <- NA
data <- data.frame(x1=x1, x2=x2, x3=x3, outcome=outcome)
sft_brew <- brew_soft(data, outcome=outcome, bind_miss = FALSE)
sft_brew <- mash(sft_brew, with = masher_soft(bs = TRUE))
sft_brew <- stir(sft_brew, timer = TRUE)
sft_brew
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.