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: How to do cluster analysis


From   Alfonso Sánchez-Peñalver <[email protected]>
To   Stata List <[email protected]>
Subject   Re: st: How to do cluster analysis
Date   Thu, 5 Dec 2013 15:04:06 -0500

Hi Xixi,

would the basis of the grouping would be per year, or by complete overall performance? I mean how would you evaluate return performance: by year or by some sort of average. If it’s by year then I suggest

gen cat1 = return > 0.80

where 80% is the benchmark you want to generate the category for. Now, if it’s by overall performance you can generate the mean returns by country

bysort(country): egen meanreturns = mean(return)

and then create the dummy variables for the categories you want

gen cat1 = meanreturns > 0.80.

Best regards,

Alfonso


On Dec 5, 2013, at 2:28 PM, Xixi Lin <[email protected]> wrote:

> Hi Nick,
> 
> I checked out the cluster help; however still don't know what to use.
> The thing here is that I have 45 countries, each country has a time
> series return for 500 weeks. So basically it is a panel data with 45
> countries, and each has 500 return numbers. I want to break the 45
> countries into several groups, for example 5 groups, based on their
> time series return performance.
> 
> Thanks.
> 
> Best,
> Xixi Lin
> 
> On Tue, Nov 26, 2013 at 7:01 PM, Nick Cox <[email protected]> wrote:
>> You can classify on one variable. In many ways it is easier just to
>> look at a graph of the distribution and check for gaps. If you want a
>> more formal method, check out -group1d- from SSC as well as -cluster-.
>> 
>> Nick
>> [email protected]
>> 
>> 
>> On 26 November 2013 21:55, Xixi Lin <[email protected]> wrote:
>>> Hi,
>>> 
>>> I am wondering how to break down to clusters. For example, I have 45
>>> countries, and I want to break those countries into several clusters
>>> based on country returns. Does anyone know how to do that in stata?
>>> 
>>> Thanks,
>>> Xixi Lin
>>> *
>>> *   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/


*
*   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