Define hierarchy levels over which record needs to be swapped according to risk variables.
NOTE: This is an internal function used for testing the C++-function setLevels()
which is applied inside recordSwap()
.
setLevels_cpp(risk, risk_threshold)
Integer vector with hierarchy level over which record needs to be swapped with.
vector of vectors containing risks of each individual in each hierarchy level. risk[0]
returns the vector of risks for the first unit over all hierarchy levels.
risk[1]
the vector if risks for all hierarchy level of unit 2, and so on.
double defining the risk threshold beyond which a record/household needs to be swapped. This is understood as risk>=risk_threshhold.