Hello,

I have 4 variables (coded 1=yes; 0=no) that tap into whether respondents used social media devices with parents, friends, relatives, and other adults.

I want to create a single variable that takes the following variables:

1 if discussed with parents
2 if discussed with friends
3 if discussed with relatives
4 if discussed with other adults
5 if discussed with parents and friends
6 if with parents and relatives
7 if with parents and other adults
8 if discussed with any combination all four
9 if discussed with all four

I used the following command,


gen most_use_sources = .
replace most_use_sources=1 if parents_dum==1
replace most_use_sources=2 if relatives_dum==1
replace most_use_sources=3 if friends_dum==1
replace most_use_sources=4 if otheradults_dum==1
replace most_use_sources=5 if parents_dum==1 & relatives_dum==1
replace most_use_sources=6 if parents_dum==1 & friends_dum==1
replace most_use_sources=7 if parents_dum==1 & otheradults_dum==1
replace most_use_sources=8 if num_source==3
replace most_use_sources=9 if num_source==4


However, the number of cases I am getting for the categories of the new variable are much much lower than the number of cases for each of the dummy variables separately. For example, the dummy for parents had about 900 cases, but there are only 44 cases for the parent category in the newly created most_use_sources =1 category.

I will appreciate some help to tease out these differences.

thanks - cY