| Impute.purse | R Documentation |
This function imputes the target data set dset in each coin using the imputation function f_i. This is performed
in the same way as the coin method Impute.coin(), but with one "special case" for panel data. If f_i = "impute_panel,
the data sets inside the purse are imputed using the last available data point, using the impute_panel()
function. In this case, coins are not imputed individually, but treated as a single data set. In this
case, optionally set f_i_para = list(max_time = .) where . should be substituted with the maximum
number of time points to search backwards for a non-NA value. See impute_panel() for more details.
No further arguments need to be passed to impute_panel(). See vignette("imputation") for more
details. See also Impute.coin() documentation.
## S3 method for class 'purse' Impute( x, dset, f_i = NULL, f_i_para = NULL, impute_by = "column", group_level = NULL, use_group = NULL, normalise_first = NULL, write_to = NULL, ... )
x |
A purse object |
dset |
The name of the data set to apply the function to, which should be accessible in |
f_i |
An imputation function. For the "purse" class, if |
f_i_para |
Further arguments to pass to |
impute_by |
Specifies how to impute: if |
group_level |
A level of the framework to use for grouping indicators. This is only
relevant if |
use_group |
Optional grouping variable name to pass to imputation function if this supports group imputation. |
normalise_first |
Logical: if |
write_to |
Optional character string for naming the resulting data set in each coin. Data will be written to
|
... |
arguments passed to or from other methods. |
An updated purse with imputed data sets added to each coin.
# see vignette("imputation")