Hi, I'm trying to create a new categorical variable that indicates (heterosexual) spousal disagreement on women's decision-making in certain activities.
The categories should be:
  1. neither spouse says that the wife is involved
  2. both say that the wife is involved
  3. the wife says that she is involved, but the husband reports that she is not
  4. husband says the wife is involved, but she reports she is not
So far, I have the following variables:
Household ID (hhid); Individual's ID within the household (famid= 1 for males and 2 for females); and a binary variable (wifedec) saying if the respondent said the wife was involved (1) or not (0)

I have been trying (unsuccessfully) different combinations of commands to create the categorical variable.
But overall, I want to end with something like:

gen agreement1=.
by (hhid): replace agreement1=
1 if famid 1 & 2 (male and female) responded wifedec==0 (wife is not involved)
2 if famid 1 & 2 (male and female) responded wifedec==1 (wife is involved)
3 if famid 2 (female) responded wifedec==1 & famid 1(male) responded wifedec==0
4 if famid 1 (male) responded wifedec==1 & famid 2(female) responded wifedec==0

Has anyone ever generated a similar variable?
I'm using Stata/IC 16.0
Thanks!!!

Hazel Velasco
Graduate Student Rural Sociology & International Agriculture and Development