Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE:

From   "White, Justin" <>
To   <>
Subject   st: RE:
Date   Thu, 22 Jun 2006 11:08:02 -0400

I would check out the gen command and use the by option.  I am not sure
how your data is "shaped".  You may need to reshape the data in order
for my advice to work.  I am assuming you want 1 variable.

You could use this:
Assume there is a variable called fruit_type (apple, orange, and pear)
and a variable called score (which would have the low, med, and high)

By fruit_type: gen fruit = score

Hope this helps.

Justin White

-----Original Message-----
[] On Behalf Of buddyb
Sent: Thursday, June 22, 2006 10:59 AM

Hello everyone,

I am running STATA 8.  I am not sure what this
procedure is called, but this is what I am trying to

For an example, I have 3 questions asking respondents
to rate how much they like various fruits (Orange,
Apple, Pear) on a scale of low med high.  So...I have
a data table similar to the following:

                Low        Medium       High
Q1. Orange

                Low        Medium       High
Q2. Apple

                Low        Medium       High
Q3. Pear

Now I would like to combine these 3 questions into a
new variable called Fruit that would look similar to:

Fruit         Low           Medium     High

Is this possible or does it make sense?


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index