Bookmark and Share

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


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

Re: st: Combining multiple numeric variables


From   Modesto Escobar <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: Combining multiple numeric variables
Date   Sun, 9 Feb 2014 20:22:27 +0100

Hi Raquel,
I recommend you to use the ado mrtab.
Try this code and tell me if this is what you do want:
input ID var1 var2 var3 var4
1 2 3 4 5
2 1 2 . .
3 1 . . .
4 3 5 3 .
5 5 . . .
6 1 . . .
end
net install mrtab, from(http://fmwww.bc.edu/RePEc/bocode/m) replace
mrtab var1-var4, poly

Once mrtab is installed, you won't  need the command net install
anymore. Type help mrtab if you want to know more on the issue of
mult-response
Best,

Modesto Escobar
Universidad de Salamanca

2014-02-08 1:01 GMT+01:00 Raquel Teixeira <[email protected]>:
> Hi Everyone,
>
> It's my first post.
> Forgive me, I am a novice user and need some help combining numeric
> variables into 1 variable.
>
> Basically, it looks something like this
>
> ID      var1    var2    var3    var4
> 1       2       3       4       5
> 2       1       2
> 3       1
> 4       3       5       3
> 5       5
> 6       1
>
> Basically I am analyzing a survey where people picked multiple answers to
> one question, separated by commas. I separated the values in excel but now
> it's multiple columns and therefore multiple variables in stata. I need
> these values to be reflected under one main variable...so for instance I
> want to see how many people checked off 5, and want all 3 under one variable
> and yet still attached to its ID variable - I hope I am being clear and if
> you have any advice on  how to combine these variables into one that
> reflects all 4 variable values.
>
> Thank you!!
> Raquel Teixeira
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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