search for: usborn

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

Did you mean: osborn
2013 Sep 22
2
Coding several dummy variables into a single categorical variable
Colleagues, I have generated several dummy variables: n$native0 <- 1 * (n$re=="white" & n$usborn=="yes") n$native1 <- 1 * (n$re=="afam" & n$usborn=="yes") n$native2 <- 1 * (n$re=="carib" & n$usborn=="yes") n$native3 <- 1 * (n$re=="carib" & n$usborn=="no") I would now like to combine these into a single...
2013 Sep 21
1
Translating recoding syntax from SPSS to R
Colleagues, I am in the process of learning R. I've been able to import my dataset (from Stata) and do some simple coding. I have now come to coding situation that requires some assistance. This is some code in SPSS that I would like to be able to execute in R: if (race eq 1 and usborn=0) confused=1 . if (race eq 2 and usborn=0) confused=1 . if (race eq 1 and usborn=1) confused=0 . if (race eq 2 and usborn=1) confused=0 . if (race eq 3 and usborn=1) confused=0 . if (race eq 3 and cohort=1) confused=0 . if (race eq 3 and cohort=2) confused=0 . variable labels confused "R clai...