Impute.purse | R Documentation |
This function imputes the target data set dset
in each coin using the imputation function f_i
, and optionally by specifying
parameters via f_i_para
. This is performed in the same way as the coin method Impute.coin()
, i.e. each time point is imputed separately,
unless f_i = "impute_panel"
. See details for more information.
## 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,
warn_on_NAs = TRUE,
...
)
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
|
warn_on_NAs |
Logical: if |
... |
arguments passed to or from other methods. |
If f_i = "impute_panel"
this is treated as a special case, and the data sets inside the purse are imputed using the impute_panel()
function, which allows imputation of time series, using past/future values as information for imputation.
In this case, coins are not imputed individually, but treated as a single data set. To do this, set f_i = "impute_panel"
and pass further parameters to impute_panel()
using the f_i_para
argument. Note that as this is a special case,
the supported parameters of impute_panel()
to specify through Impute()
are "imp_type"
and "max_time"
(see Impute()
for details on these). No further arguments need to be passed to impute_panel()
. See vignette("imputation")
for more
details.
An updated purse with imputed data sets added to each coin.
# see vignette("imputation")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.