Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Nick Cox <njcoxstata@gmail.com> |
To | "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
Subject | Re: st: Panel data correlation |
Date | Tue, 1 Apr 2014 18:50:24 +0100 |
Sorry, but I can't add to my previous answer as I don't think you are posing a precise question. What's different may be what makes sense to your project, but pooling countries and years just mixes different kinds of variation and would produce something difficult to interpret. The point is usually made in broader discussions of cross-sectional and panel analyses. Nick njcoxstata@gmail.com On 1 April 2014 18:43, Anderson Macedo de Jesus <andemacj@me.com> wrote: > Nick, > I have two variables and I need to check the correlation between them in a panel data, but I have a panel data for 135 countries described as follows: > > countries years CA PFI > Brazil 1990 12 20 > Brazil 1995 10 5 > Brazil 2000 40 1 > Brazil 2005 4 40 > Brazil 2010 20 30 > Netherlands 1990 100 30 > ... > > I have been dealing with these data for a while and I could notice that it is a bit different to deal with panel data. So, I would like to know whether or not I can use the simple -correlate- command or there is something different. Thats my question. I don't want to make a big mistake > Thanks > Anderson > > > On Apr 1, 2014, at 7:31 PM, Nick Cox <njcoxstata@gmail.com> wrote: > >> The Pearson correlation between two variables can be calculated with >> -correlate-. You could restrict that to different years or even >> different countries, although I wouldn't pay anything for correlations >> based on 5 values. So, what's the precise question? >> >> Nick >> njcoxstata@gmail.com >> >> >> On 1 April 2014 18:25, Anderson Macedo de Jesus <andemacj@me.com> wrote: >> >>> I need to check the correlation btw two variables in a panel data in a long format (135 countries with 5 different years for each variable). How can I do that? >>> As I could realize it is not possible to run the pearson correlation, right? So, I could I do that? >> * >> * 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/ * * 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/