Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to calculate top(bottom) deciles

    Dear All,
    I have panel data. I am trying to divide the data into in to 2 groups such as (1) Small firms and (2) large firms with respect to their sale volume. Firms with high sale are Large firms whereas firms with Low sale are Small firms. The firm should be ranked in “bottom(top) three deciles”.
    I don’t understand that how to divide data based on bottom(top) three deciles as per professor advice. I am using Stata.

    Please use this Example to clear the point
    .
    Firms Years Sale volume ($)
    A 2000 10000
    2001 25000
    2002 11000
    B 2000 37000
    2001 8000
    2002 9000
    C 2000 21000
    2001 33000
    2002 60000
    D 2000 45000
    2001 11000
    2002 24000
    E 2000 27000
    2001 55000
    2002 19000
    Do we need first add 3 years of sale of every firm as well in above example. ?

    Please see reference.

    Yanhao Chang, Karen Benson, Robert Faff (2017). Are excess cash holdings more valuable to firms in times of crisis? Financial constraints and governance matters. Pacific-Basin Finance Journal. 45, 157–173 (Please see appendix page 172 description of payout ratio and Firm size)





  • #2
    Qazi:
    you may want to try:
    Code:
    xtile dec= Sale_volume_$, nq(10)
    g flag=1 if dec>=8 & dec!=.
    replace flag=0 if dec<=3 & dec!=.
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3

      Thanks Carlo ...Can you please further explain...This message display on my STATA 14 after copy your your suggested command...Sale_volume_$ invalid name

      Comment


      • #4
        Originally posted by Qazi Awais Amin View Post
        Thanks Carlo ...Can you please further explain...This message display on my STATA 14 after copy your your suggested command...Sale_volume_$ invalid name
        Carlo didn't mean to literally type "Sale_volume_$" as the variable name. You have to replace that with whatever you named the variable for sales volume.
        Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

        When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

        Comment


        • #5
          Weiwen is correct.
          I should have tested the code in full.
          Kind regards,
          Carlo
          (StataNow 18.5)

          Comment


          • #6
            Dear Weiwen Ng,

            Thanks for reply. Yes i have
            replace the name of my variable but id didnt work out

            Comment


            • #7

              Can you please suggest any other alternate way If we ignore the way as other researcher have divided the large and small firm based on “bottom(top) three deciles”................................................ I just want to divide the data into in to 2 groups such as (1) Small firms and (2) large firms with respect to their sale volume. Firms with high sale are Large firms whereas firms with Low sale are Small firms. .??? Can you suggest any other way that we divided the data into small and large firms apart from 3 decile criteria as its seems difficult. So that, before entering the file into STATA the sample already be in two parts ie. Large and Small firms as i want to make my life easy

              Comment


              • #8
                Originally posted by Qazi Awais Amin View Post
                Dear Weiwen Ng,

                Thanks for reply. Yes i have
                replace the name of my variable but id didnt work out
                Qazi, please post your exact code in code delimiters and we can see if anything is obviously wrong. You can also write the exact error message in the code delimiters as well. This was requested by the FAQ (and in fact, the FAQ also strongly advises you to post a data example). I'm usually not too much of a stickler for the FAQ, but the fact is that we cannot help you if we don't have at least your exact command.

                Can you please suggest any other alternate way If we ignore the way as other researcher have divided the large and small firm based on “bottom(top) three deciles”.......................................... ...... I just want to divide the data into in to 2 groups such as (1) Small firms and (2) large firms with respect to their sale volume. Firms with high sale are Large firms whereas firms with Low sale are Small firms. .??? Can you suggest any other way that we divided the data into small and large firms apart from 3 decile criteria as its seems difficult. So that, before entering the file into STATA the sample already be in two parts ie. Large and Small firms as i want to make my life easy
                If you can debug the code we gave you, you will end up with a dummy variable in the data which designates small firms, large firms, and firms that are neither small nor large. This is easy to do once you get the hang of it. Perhaps you are new to command line programs, and if so, perhaps it is confusing at first. It was like that for me at first, and I will bet that it was like that for most posters here, even most of the more experienced members. But, don't worry, we can help you ... if you can supply a code example at minimum.

                The rest of your question is a substantive matter. Maybe your data are from a country that has index funds, and the indexing company has a definition for large, medium, and small companies. You could just apply their definition (but IIRC, in western countries, that definition is usually applied to market capitalization, not sales volume). Maybe there are some other definitions that already exist. However, posters here come from many different backgrounds, and we tend not to offer topical advice here. You're probably better off asking one of your professors.
                Last edited by Weiwen Ng; 27 Oct 2018, 18:15.
                Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

                When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

                Comment


                • #9
                  Dear Weiwen, Many thanks for detail reply. Much appreciated your time.

                  Unfortunately, whenever this type situation happened then things are generally stuck. I did my PhD last year from University of Salford UK and whenever I come across any STATA issue i didn't find any body here in London, having expert command like you..Basically I am working on my one of research paper and i have encounter this problem. Let me share my sample data. I have 10 countries sample data namely China, Japan, Hong Kong, Singapore, Malaysia, Indonesia, Philippines, South Korea, Taiwan, and Thailand and 4813 firms , for a period of 13 years, (2000-2012)........ If appreciate if you would be able to guide me what is 3 decile i.e, bottom(top) three deciles theoretically and how its work? How STATA make a criteria to divided the data in small, large and neither small & large category, obviously their must be a logic. My google info about Decile is that (i.e.In statistics, a decile is any of the nine values that divide the sorted data into ten equal parts, so that each part represents 1/10 of the sample or population) on my example....Therefore concept of bottom(top) three deciles is important to understand first.


                  This is the paper which have used bottom(top) three deciles.
                  Many thanks

                  Comment


                  • #10
                    Originally posted by Qazi Awais Amin View Post
                    Dear Weiwen, Many thanks for detail reply. Much appreciated your time.

                    Unfortunately, whenever this type situation happened then things are generally stuck. I did my PhD last year from University of Salford UK and whenever I come across any STATA issue i didn't find any body here in London, having expert command like you..Basically I am working on my one of research paper and i have encounter this problem. Let me share my sample data. I have 10 countries sample data namely China, Japan, Hong Kong, Singapore, Malaysia, Indonesia, Philippines, South Korea, Taiwan, and Thailand and 4813 firms , for a period of 13 years, (2000-2012)........ If appreciate if you would be able to guide me what is 3 decile i.e, bottom(top) three deciles theoretically and how its work? How STATA make a criteria to divided the data in small, large and neither small & large category, obviously their must be a logic. My google info about Decile is that (i.e.In statistics, a decile is any of the nine values that divide the sorted data into ten equal parts, so that each part represents 1/10 of the sample or population) on my example....Therefore concept of bottom(top) three deciles is important to understand first.


                    This is the paper which have used bottom(top) three deciles.
                    Many thanks
                    I don't see any paper linked.

                    If you sort every company by sales volume in ascending order, then you divide them into 10 equal-sized groups, you have deciles. The first decile or bottom decile is the 10% of companies with the lowest sales volume. Percentiles is a closely related concept; there, we typically say that company X is in the n-th percentile, meaning that X has sales volume greater than n% of its competitors. That's the theory, such as it is. Why the top 3 deciles, or bottom 3? I have no idea, but I suspect there's no firm theory behind that. You should ask the author of the paper.

                    Carlo already gave you some sample code. If you can't implement it, please post the exact code you typed in, and the exact error message.
                    Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

                    When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

                    Comment


                    • #11
                      Originally posted by Qazi Awais Amin View Post
                      Dear Weiwen, Many thanks for detail reply. Much appreciated your time.

                      Unfortunately, whenever this type situation happened then things are generally stuck. I did my PhD last year from University of Salford UK and whenever I come across any STATA issue i didn't find any body here in London, having expert command like you..Basically I am working on my one of research paper and i have encounter this problem. Let me share my sample data. I have 10 countries sample data namely China, Japan, Hong Kong, Singapore, Malaysia, Indonesia, Philippines, South Korea, Taiwan, and Thailand and 4813 firms , for a period of 13 years, (2000-2012)........ If appreciate if you would be able to guide me what is 3 decile i.e, bottom(top) three deciles theoretically and how its work? How STATA make a criteria to divided the data in small, large and neither small & large category, obviously their must be a logic. My google info about Decile is that (i.e.In statistics, a decile is any of the nine values that divide the sorted data into ten equal parts, so that each part represents 1/10 of the sample or population) on my example....Therefore concept of bottom(top) three deciles is important to understand first.


                      This is the paper which have used bottom(top) three deciles.
                      Many thanks
                      I don't see any paper linked.

                      If you sort every company by sales volume in ascending order, then you divide them into 10 equal-sized groups, you have deciles. The first decile or bottom decile is the 10% of companies with the lowest sales volume. Percentiles is a closely related concept; there, we typically say that company X is in the n-th percentile, meaning that X has sales volume greater than n% of its competitors. That's the theory, such as it is. Why the top 3 deciles, or bottom 3? I have no idea, but I suspect there's no firm theory behind that. I suspect the author was looking for some shorthand way to say large, medium, and small companies. You should ask the author of the paper. Or, at the very least ask some colleagues in finance, financial economics, or a related field. This is an interdisciplinary forum. I do health services research. I have very little useful knowledge about this question.

                      Carlo already gave you some sample code. If you can't implement it, please post the exact code you typed in, and the exact error message.
                      Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

                      When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

                      Comment


                      • #12
                        Wow.....Brilliant. I think i got the point. I have applied the 3 decile. Please see attachment.


                        Here is paper reference......

                        Yanhao Chang, Karen Benson, Robert Faff (2017). Are excess cash holdings more valuable to firms in times of crisis? Financial constraints and governance matters. Pacific-Basin Finance Journal. 45, 157–173 (Please see appendix page 172 description of payout ratio and Firm size)
                        Attached Files

                        Comment


                        • #13
                          I used an example data. Total firms are 40. First, I put the data into ascending sequence and divide it to 4 equal group of 10. Firms. Then I select Top Bottom(Top) 3 Decile). For example, firms in Green are Top 3 decile and firms in Yellow are Bottom 3 decile.

                          Comment


                          • #14
                            Qazi,

                            What you showed in Excel is the wrong concept of creating deciles. You ordered the firms from lowest sales to highest sales. Each decile in this example is 4 firms. (In real life, you probably don't have a multiple of 10, so there are established methods to break ties; software will do this for you.) You are highlighting firms 1-3, 11-13, 21-23, and 31-33 as the top decile. That is incorrect. In your example, firms 29-40 are the top 3 deciles.

                            You correctly sorted your firms, but you grouped them into quartiles (i.e. 4 groups), then you highlight the top and bottom 3 firms within each quartile. That is not the overall top 3 deciles.

                            You have not shown any example data, nor have you described your variable names in Stata. So there isn't anything to help you with here. If you haven't got a clear understanding on the concept of percentiles, you should get someone to help you in person. They do not need to know Stata. This can actually be done in Excel.
                            Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

                            When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

                            Comment


                            • #15
                              Dear Weiwen,

                              Many thanks for detail reply.
                              Basically i created an example data of 40 firms to share with you and clear my concept, its luckily look as quarterly data which is not infect the case. My sample firms are 4700. I am examining impact of financial crises on firms cash holdings. My dependent variable is Cash Holding and explanatory variables are cash flow, MB Ratio, Sales growth, firm size Net working capital and investment....I have theoretical understanding of percentile.For example If a child's weight is at the 75th percentile line, that means that out of 100 normal children her age, 75 will be bigger than she is and 25 smaller.
                              I appreciate your time and if its possible for you, draw something on excel sheet and send me. I hope my problem would be resolved

                              Regards
                              Qazi

                              Comment

                              Working...
                              X