Announcement

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

  • Porportion test tertiles

    Hello,

    I am currently having a hard time figuring out whether it is possible to divide a certain variable first into 3 parts (tertiles) based on the xtile command. Then I would like to test the top vs the bottom tertile. I always receive the error that even though I have created this tertile split, that my variable still contains three possibilities even though the proportion test allows only to test for instance two things such as proportion A against proportion B. So far I could not come up with any work around by creating a new variable. Any help on this would be highly appreciated.

    Best, Max

  • #2
    Hello Max,

    Welcome to the Stata Forum,

    You unfortunately didn't present data neither command, as suggested in the FAQ, and that would prompt a more insighful advice.

    That said, I gather you may use a group variable, with missing data for the second tercile, then use the proportion test BY group.

    Hopefully that helps.
    Best regards,

    Marcos

    Comment


    • #3
      thanks for the prompt reply. To explain the full picture. Generally, I want to analyze whether bad acquisition performance leads to a higher probability of becoming a target itself. To test this I have three main variables. 1. Variable that summarizes the abnormal returns (CAR) for each firm achieved in the past 2. Variable that classifies the firms into diversified (1) and standalone (0). 3. Variable that classifies the firms into target (1) and non_target(2). So I tested for this effect across the entire sample and did only find prove at 10% significance level because there is a broad base of firms with abnormal returns around 0. Now I want to check whether this effect is stronger if I divide my variable of measuring the abnormal returns into tertiles with the xtile command (I already did so) and then classify the top as good bidders and bottom as bad bidders. The middle ones I want to ignore then. Afterwards, I want to compare the proportions of firms that were good bidders and became a target vs. firms that were bad bidders and became a target.

      Ultimately, I want to repeat this also for the sub samples of diversified firms and standalone firms. I hope this clarifies my aim. Nevertheless, I am wondering whether this is even possible to do. I did it already manually in excel but now want to repeat it in Stata to check for the significance.

      If I understand you properly you mean to do "gen bidder_quality=." and then to replace with 1 & 3 if in the top and bottom tertile?


      PS: My Stata version is 14/IC
      Attached Files
      Last edited by Max Preller; 01 Mar 2017, 07:35.

      Comment


      • #4
        I didn't see #3 until I had first posted this, but you're still not posting the full code you used or phrasing this in terms of data we can use ourselves.

        As Marcos implies, no code visible, no (precise) comment possible.

        But this might be the trick you're missing.

        Code:
        sysuse auto, clear
        
        xtile qweight = weight, nq(3)
        
        ttest price if inlist(qweight, 1, 3), by(qweight)
        I have to say repeated testing until you find the result you want is widely regarded as problematic.
        Last edited by Nick Cox; 01 Mar 2017, 10:03.

        Comment

        Working...
        X