Displaying 1 result from an estimated 1 matches for "ageh".
Did you mean:
age
2003 Dec 17
5
beginner programming question
...NA
2 2 NA NA
where rel1...3 states the kinship with the respondent (person 0)
code 1 meaning husband/wife, code 4 meaning parent and code 3 for
children.
I would like to get the age for husbands (code 1) in a first column and
wife's age in the second:
ageh agew
25 23
34 35
39 40
My solution uses *for* loops and *if*s checking for code 1 in each
element in the first 3 columns, then checking in the last three columns
for husband's code, then taking the corresponding age in a new matrix.
I've learned that *for*...