search for: rule_union_numeric

Displaying 1 result from an estimated 1 matches for "rule_union_numeric".

2020 Oct 30
3
Error: variable not found
...2)) ## creating numeric code for rule_union & rule_unionn: 1 when sploc is greater than zero and sprule is equal to 1 or 2, 0 if not. ## This is neccesary because otherwise it is a logical code and we cannot multiply with it, which is needed ipumsi_00008_dta <- ipumsi_00008_dta %>% mutate(rule_union_numeric = as.numeric(rule_union)) ### creating unique numeric code for sploc / pernum variables ipumsi_00008_dta <- mutate(ipumsi_00008_dta, sploc_pernum_code = pernum*(sex==1) + sploc*(sex==2)) #### dividing serial by 1000, otherwise, the ultimate couple_id is too large, and it works in this dataset be...