Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Combining variables without adding

From   "Jessica Kopsic" <>
Subject   st: Combining variables without adding
Date   Wed, 23 Nov 2011 18:53:13 -0500

Hello all,

I am using Stata 12.0.

I have questions in a dataset answered with a Likert-type scale. The data
is currently arranged so that each answer to each question is its own
variable. So if the question is "Do you like peaches?" Then Peaches1 is a
variable, Peaches2 is a variable, and so on. If the person selected one,
there would be a 1 for the Peaches1 variable and the remaining Peaches
variables would be blank. I would like to combine all the Peaches
variables so that there is only one variable for response to the Peaches
question, with possible values from 1 to 5.

The complicating factor is that it was possible for people to erroneously
select more than one answer. So if someone marked 1 and 4, they would have
a value for Peaches1 and a value for Peaches4. If I simply added all the
Peaches variables together, it would give them a 5, which is not correct.
How can I avoid this? For some cases of more than one response I would
like to use the mean, in others I would like to use the lowest response.

Thank you!

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index