Statalist The Stata Listserver


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

st: RE:


From   "White, Justin" <JWhite@yesvirginia.org>
To   <statalist@hsphsun2.harvard.edu>
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-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of buddyb
Sent: Thursday, June 22, 2006 10:59 AM
To: statalist@hsphsun2.harvard.edu
Subject: 

Hello everyone,

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

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
     Orange
     Apple
     Pear

Is this possible or does it make sense?

Thanks,
Buddy


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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   |   What's new   |   Site index