impute | R Documentation |
Impute a dataset
impute(model, ..., extra, n_imp = 19)
## S4 method for signature 'ANY'
impute(model, ..., extra, n_imp = 19)
## S4 method for signature 'glmerMod'
impute(model, data, ..., extra, n_imp)
## S4 method for signature 'maybeInla'
impute(
model,
...,
seed = 0L,
num_threads = NULL,
parallel_configs = TRUE,
extra,
n_imp = 19
)
## S4 method for signature 'lm'
impute(model, data, ..., extra, n_imp)
model |
model to impute the dataset |
... |
other arguments. See details |
extra |
a |
n_imp |
the number of imputations.
Defaults to |
data |
The dataset holding both the observed and the missing values |
seed |
See the same argument in |
num_threads |
The number of threads to use in the format |
parallel_configs |
Logical.
If TRUE and not on Windows, then try to run each configuration in parallel
(not Windows) using |
dataset <- generate_data(n_year = 10, n_site = 50, n_run = 1)
dataset$Count[sample(nrow(dataset), 50)] <- NA
model <- lm(Count ~ Year + factor(Period) + factor(Site), data = dataset)
impute(model, dataset)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.