utility | R Documentation |
Various utility measues that basically compares two data sets
utility( x, y, type = c("all", "compareColumns", "compareRows", "compareRowsHH", "compareNA"), hhid = NULL ) utilityModal(x, y, varx, vary = NULL) utilityIndicator(x, y)
x |
a data.frame, typically the original data set. For |
y |
a data.frame, typically the corresponding synthetic data set. For |
type |
which measure
|
hhid |
index or name of variable containing the houshold ID |
varx |
name or index of a variable in data.frame x |
vary |
NULL or name or index of a variable in data.frame y corresponding to variable varx in data.frame x. If NULL, the names of the selected variable should be the same in both x and y. |
the measure(s) of interest
utility
: comparisons of two data sets
utilityModal
: comparison of number of categories
utilityIndicator
: difference between two values
Matthias Templ, Maxime Bergeaut
data(eusilcS) data(eusilcP) ## for fast caluclations, took a subsample eusilcP <- eusilcP[1:15000, ] utility(eusilcS, eusilcP) data(eusilcS) data(eusilcP) utilityModal(eusilcS, eusilcP, "age") utilityModal(eusilcS, eusilcP, "pl030", "ecoStat") data(eusilcS) data(eusilcP) m1 <- meanWt(eusilcS$age, eusilcS$rb050) m2 <- mean(eusilcP$age) utilityIndicator(m1, m2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.