Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: Combining variables without adding


From   "Jessica Kopsic" <jkops@andrew.cmu.edu>
To   statalist@hsphsun2.harvard.edu
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:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index