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: Correctly specifying dependent variable


From   Nick Cox <njcoxstata@gmail.com>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: Correctly specifying dependent variable
Date   Wed, 18 Dec 2013 12:19:16 +0000

<>

It sounds as if you need -reshape-. Presumably your data was in
several columns in MS Excel and so Stata naturally assumes that to be
the structure you want. Either way, consider -reshape-.
Nick
njcoxstata@gmail.com


On 18 December 2013 12:04, Radha Shah <payrs3@nottingham.ac.uk> wrote:
> Dear Statalist users,
>
> I am having an issue when trying to specify my dependent variable correctly in Stata. I am using Stata 13 for Windows.
>
> I am very sorry if this question seems trivial to most, however I am only a Stata beginner so would appreciate any advice anyone can give me.
>
> My dependent variable has both an i and j index (it is: funds from donor i to recipient country j). When I import my data into Stata from Microsoft Excel it appears as the following:
>
> Country         | Red Cross        CARE    ....         Oxfam
> ----------------------------------------------------------------------
> Angola          |       0                  10000                              0
>                         |
> Cameroon        |  30000                 0                       10000
> ....                    |
>                         |
> Zimbabwe        |        0                  15000                       0
>
> Stata automatically takes the first row as headings for variables, and thus I have a separate variable for "country", and a separate variable for "Red Cross", "Care", "Oxfam" etc. Instead, I want the dependent variable to encompass both the i and j index such that my dependent variable observation for Red Cross funds in Angola is 0 and the same dependent variable also picks up that CARE funds in Cameroon are 10000. For reference, I intend to run a random effects Tobit model using the data.
>
> I am sure there is a very easy way to do this on Stata, so any help would be greatly appreciated.
>
> Please also let me know if my question is in any way unclear.
>
> Many thanks,
>
> Radha
> This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.
>
> This message has been checked for viruses but the contents of an attachment
> may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.
>
>
>
>
>
> *
> *   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