Hello,
I am working with a dataset from a survey. In the survey, participants were asked to answer questions based on the number of dogs in their household.
The study was conducted online and the dataset output that I received lists for example, the sex of each of the respondents' dogs in vertical tables.
e.g.
There are 2006 respondents, and each has the ability to list many characteristics of the dog (including sex), for up to a maximum 10 dogs;
So, there are 2006 rows, and 10 columns across for one question in one table, for example.
Is there any way to merge/collapse the data in STATA14 wherein I can see by respondent number, what was the most commonly listed sex of dog, in all of their dogs listed?
So, merge Sexdog1, Sexdog2, Sexdog3 etc. into one variable for this particular respondent to show "the most common type of sex of the dog in respondent household 1 was ... "
?
I have both continuous and categorical data (just thought I would show the categorical as the example)
Thanks so much in advance!
Danielle
I am working with a dataset from a survey. In the survey, participants were asked to answer questions based on the number of dogs in their household.
The study was conducted online and the dataset output that I received lists for example, the sex of each of the respondents' dogs in vertical tables.
e.g.
Respondent number | Sexdog1 | Sexdog2 | Sexdog3 | Sexdog4 |
1 | male | female | male | male |
2 | Female | male | . | . |
So, there are 2006 rows, and 10 columns across for one question in one table, for example.
Is there any way to merge/collapse the data in STATA14 wherein I can see by respondent number, what was the most commonly listed sex of dog, in all of their dogs listed?
So, merge Sexdog1, Sexdog2, Sexdog3 etc. into one variable for this particular respondent to show "the most common type of sex of the dog in respondent household 1 was ... "
?
I have both continuous and categorical data (just thought I would show the categorical as the example)
Thanks so much in advance!
Danielle
Comment