Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: How to compare the values of variables for respondent and his spouse within the same household?
From
xueliansharon <[email protected]>
To
[email protected]
Subject
st: How to compare the values of variables for respondent and his spouse within the same household?
Date
Sat, 23 Jun 2012 09:10:29 -0700 (PDT)
Dear all,
I have a data set which has records for both the family respondent and
his/her spouse. And I want to check whether the values of each variable for
the family respondent and his spouse are the same, e.g., in the following
data file, I want to check whether the values of the variable v1 are the
same for person 1010 (FamR) and 1020 (Spouse), person 2020 (FamR) and 2010
(spouse), etc. How to realize this purpose?
The data structure is like:
FamR person ID spouse ID v1 v2
1 1010 1020
0 1020 1010
1 2020 2010
0 2010 2020
1 3012 3001
0 3001 3012
1 4011 0
Here, FamR is a dummy indicating whether the respondent is a Family
Respondent (=1, is Family Respondent, =0, Spouse of FamR). "PersonID"
provides the ID for the individual, and "SpouseID" provides the ID for the
individual's spouse. When SpouseID=0, it means that the individual doesn't
have a spouse. v1 and v2 are two variables.
Thank you very much!
Regards,
Xuelian
--
View this message in context: http://statalist.1588530.n2.nabble.com/How-to-compare-the-values-of-variables-for-respondent-and-his-spouse-within-the-same-household-tp7580213.html
Sent from the Statalist mailing list archive at Nabble.com.
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/