Displaying 3 results from an estimated 3 matches similar to: "Error: variable not found"
2020 Oct 27
2
Creating unique code
Hello,
I need some help in creating a new variable. I need to create a 'couple identifier', which gives a unique code for every couple/triple/... in a household. So, I can identify couples. To do this, I should use 4 variables:
* SERIAL = a unique numeric code for each household
* PERNUM = a unique numeric code for each person
* SPLOC = the numeric code of the spouse in the
2020 Oct 29
0
Creating unique code
Hi Hannah,
Yes, that does give me more insight. The polygyny only doesn't matter, for
even if there was polyandry it could be coded in the same way. If I
understand this correctly you have one variable (SPRULE) that must contain
information about the household of the individual and the identities of his
(or her) relationship partner(s). The household number can accommodate up
to three
2020 Oct 30
0
Error: variable not found
Hi Hannah,
Using the same code I sent before, you can append the partner codes to the
household code. I apologize, but I don't know how to use the
dplyr/tidyr/... stuff so this is written in straight R code using logic
statements.
ipumsi_00008_dta<-
read.table(
text="country year sample serial hhwt pernum perwt resident sploc sprule
204 2013 204201301 4000 10 1 10 1 5 2
204 2013