Hi,
I am a total beginner with Stata, so please excuse the title mess.
I have a dataset which consists of peoples preferences (1-5 with 5 being the highest value) for different types of animals.
It looks like this:
I would like to adress the hypothesis that "people prefer dogs over cats".
I know that I could do this with descriptive statistics and just use the mean scores for cats and dogs.
However, I thought if I create a variable "animal" which is the aggregated score for all dogs and cats per person and two variables "dog" and "cat", which are the aggregates of the respective animal, and then do a regression, I could also control for the age of the respondent as well. (My actual dataset has more respondent-specific variables such as income etc. which I would also like to include.)
Is that something I could do? Or am I missing the point here?
Thank you
I am a total beginner with Stata, so please excuse the title mess.
I have a dataset which consists of peoples preferences (1-5 with 5 being the highest value) for different types of animals.
It looks like this:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float(id age_person cat1 cat2 cat3 dog1 dog2) 1 34 2 5 5 4 2 2 45 3 4 5 5 2 3 75 5 4 5 3 3 4 36 3 5 5 3 5 5 22 2 3 4 5 2 end
I know that I could do this with descriptive statistics and just use the mean scores for cats and dogs.
However, I thought if I create a variable "animal" which is the aggregated score for all dogs and cats per person and two variables "dog" and "cat", which are the aggregates of the respective animal, and then do a regression, I could also control for the age of the respondent as well. (My actual dataset has more respondent-specific variables such as income etc. which I would also like to include.)
Is that something I could do? Or am I missing the point here?
Thank you

.
Comment