Displaying 1 result from an estimated 1 matches for "sploc_greater_than_zero".
2020 Oct 27
2
Creating unique code
...d is this:
attach(ipumsi_00008_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
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...