setRisk_cpp {sdcMicro} | R Documentation |
Calculate Risk
Description
Calculate risk for records to be swapped and donor records. Risks are defined by 1/counts, where counts is the number of records with the same values for specified risk_variables
in the each geographic hierarchy.
This risk will be used as sampling probability for both sampling set and donor set.
NOTE: This is an internal function used for testing the C++-function setRisk
which is used inside the C++-function recordSwap()
.
Usage
setRisk_cpp(data, hierarchy, risk_variables, hid)
Arguments
data |
micro data set containing only numeric values. |
hierarchy |
column indices of variables in |
risk_variables |
column indices of variables in |
hid |
column index in |