Definition of the S4 class named BenchImputationParam for the parameters for
the benchmark variable(s) imputation method of missing values.
VarNamescharacter vector with the names of the variables to impute.
DomainNamescharacter vector with the names of the variables determining the domains over which to compute the benchmark values quantiles.
UnitNamescharacter vector with the names of the identification variables.
BenchValuesdata.table with the values of the benchmark variable(S) used to compute the imputation values.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # An empty BenchImputationParam object:
new(Class = 'BenchImputationParam')
## Not run:
FF.StQList <- readRDS('../E30183.FF.StQList.rds')
FF <- FF.StQList[["MM072016"]]
ValToImpute <- dcast_StQ(FD, ExtractNames(c('CifraNeg_13.___', 'ActivEcono_35._4._2.1.4._0')))
ValToImpute[sample(1:16941, floor(16941 / 5)), CifraNeg_13.___ := NA_real_]
BenchValues <- dcast_StQ(FF, ExtractNames(c('CifraNeg_13.___', 'ActivEcono_35._4._2.1.4._0')))
BenchValues[is.na(CifraNeg_13.___), CifraNeg_13.___ := mean(CifraNeg_13.___), by = 'ActivEcono_35._6._2.1.4._0']
BenchValues <- BenchValues[, c('NOrden', 'CifraNeg_13.___'), with = FALSE]
BenchImpParam <- new(Class = 'BenchImputationParam',
VarNames = 'CifraNeg_13.___',
DomainNames = 'ActivEcono_35._4._2.1.4._0',
BenchValues = BenchValues)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.