search for: rule_union

Displaying 2 results from an estimated 2 matches for "rule_union".

2020 Oct 30
3
Error: variable not found
...8_dta) library(tinytex) library(dplyr) library(ggplot2) library(tidyr) library(knitr) library(forcats) library(mice) library(pander) library(ggcorrplot) library(lubridate) # true/false code when sploc is greater than zero and sprule is equal to 1 or 2 ipumsi_00008_dta <- mutate(ipumsi_00008_dta, rule_union = sploc>0 & (sprule==1 | sprule==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_...
2020 Oct 27
2
Creating unique code
...rary(ggcorrplot) library(lubridate) # true/false code when sploc is greater than zero ipumsi_00008_dta <- mutate(ipumsi_00008_dta, sploc_greater_than_zero = sploc>0) # true/false code when sploc is greater then zero and sprule is equal to 1 or 2 ipumsi_00008_dta <- mutate(ipumsi_00008_dta, rule_union = sploc>0 & sprule==1 | sprule==2) => Now I want to create a numeric code for true values of rule_union when serials are equal, so when they are persons of the same household. What method should I use to do this? Thank you very much!! [[alternative HTML version deleted]]