data(testdata2)
cat_vars <- c("urbrur", "roof", "walls", "water", "sex", "relat")
anc_var <- c("water2", "water3", "relat2")
anc_setting <- c("water","water","relat")
# \donttest{
r1 <- LocalRecProg(
obj = testdata2,
categorical = cat_vars,
missingValue = -99)
r2 <- LocalRecProg(
obj = testdata2,
categorical = cat_vars,
ancestor = anc_var,
ancestor_setting = anc_setting,
missingValue = -99)
r3 <- LocalRecProg(
obj = testdata2,
categorical = cat_vars,
ancestor = anc_var,
ancestor_setting = anc_setting,
missingValue = -99,
FindLowestK = FALSE)
# for objects of class sdcMicro:
sdc <- createSdcObj(
dat = testdata2,
keyVars = c("urbrur", "roof", "walls", "water", "electcon", "relat", "sex"),
numVars = c("expend", "income", "savings"),
w = "sampling_weight")
sdc <- LocalRecProg(sdc)
# }
Run the code above in your browser using DataLab