Announcement

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

  • #16
    Something is wrong with the data set you are running this on. One possibility is that takeoverprobability is a string variable. If that's the case, you need to -destring- it. Another possibility is that there is no data in it. Another is that the crossing over of the curves actually never happens, or happens only at the very end of the data. If you can't figure it out and fix it, you have to post the data set containing the three variables referred to in #11, using -dataex-, for me to troubleshoot it.

    If you are running version 16 or a fully updated version 15.1 or 14.2, -dataex- is already part of your official Stata installation. If not, run -ssc install dataex- to get it. Either way, run -help dataex- to read the simple instructions for using it. -dataex- will save you time; it is easier and quicker than typing out tables. It includes complete information about aspects of the data that are often critical to answering your question but cannot be seen from tabular displays or screenshots. It also makes it possible for those who want to help you to create a faithful representation of your example to try out their code, which in turn makes it more likely that their answer will actually work in your data.

    Comment


    • #17
      Hi,

      Apparently my dataset was too gib to be uploaded as a whole, so I excluded many of the financial variables. All of those new variables such as density_target are included.

      Code:
      * Example generated by -dataex-. To install: ssc install dataex
      clear
      input byte TargetDummy str7 YEARSIC3 double(LNMARKETCAP Leverage) byte IndustrydisturbanceDUMMY float takeoverprobability double(fx x density_non_target density_target) float(target_dominates target_dominates_after target_remains_dominant)
      0 "2010512" 12.163295616174116     .02655038436525538 0  1.153388e-06 . . . . 0 40 0
      0 "2011131"  9.483796737163981      .2833391327041016 1 2.1767567e-06 . . . . 0 40 0
      0 "2005738" 11.203760955130969                      0 0  3.026873e-06 . . . . 0 40 0
      0 "2011131" 12.549502762718806     .21931503399647445 1  3.484754e-06 . . . . 0 40 0
      0 "2011131" 12.115879849553279      .6708780002512047 1  3.801928e-06 . . . . 0 40 0
      0 "2011367"   10.3594556428174                      0 0  4.559046e-06 . . . . 0 40 0
      0 "2005371" 12.101106496544032    .061004180555691324 1  4.636243e-06 . . . . 0 40 0
      0 "2014495" 10.854797877511324     .15950688847421288 0   4.77373e-06 . . . . 0 40 0
      0 "2009481" 10.363030408174957                      0 0  5.200397e-06 . . . . 0 40 0
      0 "2004731" 10.525729319580298                      0 0  5.554056e-06 . . . . 0 40 0
      0 "2007737" 10.330028986246209   .0007288098535092194 1  8.154102e-06 . . . . 0 40 0
      0 "2006737" 10.390870532175569   .0011048784633690295 1  8.571614e-06 . . . . 0 40 0
      0 "2005874" 10.422846662320358                      0 0   8.72205e-06 . . . . 0 40 0
      0 "2003737" 10.755879558560052    .008221811834349465 1  9.038386e-06 . . . . 0 40 0
      0 "2014495" 10.999596710986118     .35135490302700745 0  .00001157749 . . . . 0 40 0
      0 "2006737"  10.50982333610911     .47975494969165855 1 .000012143046 . . . . 0 40 0
      0 "2009104"  12.81564798166614     .15559685897675493 0 .000012363993 . . . . 0 40 0
      0 "2014495"  9.441213969352303     .00338382210763777 0 .000012475425 . . . . 0 40 0
      0 "2008283"  16.58038837745891      .0682052311231048 0 .000014565392 . . . . 0 40 0
      0 "2012411" 12.940649635853259    .003306990159018919 0 .000016270853 . . . . 0 40 0
      0 "2012411"   11.2242028513432       .200824443815098 0 .000016374579 . . . . 0 40 0
      0 "2011131" 11.595988223081756       .678942055613249 1 .000016919083 . . . . 0 40 0
      0 "2004737"  11.01142291266509    .007551103427234821 1 .000017734454 . . . . 0 40 0
      0 "2006874" 10.315696536177638                      0 0 .000018400904 . . . . 0 40 0
      0 "2014495"  10.24544471938791                      0 0 .000018761135 . . . . 0 40 0
      0 "2004737" 10.754983730499118                      0 1  .00001947521 . . . . 0 40 0
      0 "2012737"  11.49045488184286     .11200919882309175 1   .0000201258 . . . . 0 40 0
      0 "2013481" 12.485108698644579      .3949325960451905 0 .000020304145 . . . . 0 40 0
      0 "2011737" 10.600527147811418  .00045206496819400046 1  .00002055069 . . . . 0 40 0
      0 "2006371"  12.11070646415779    .057446045295135806 0  .00002461178 . . . . 0 40 0
      0 "2008737"  9.995793223320154     .17223238518837355 1  .00002481988 . . . . 0 40 0
      0 "2008283"  9.244741798693514      .1902602310765576 0 .000025580084 . . . . 0 40 0
      0 "2011737" 10.219720638027066    .009013649240278136 1  .00002558222 . . . . 0 40 0
      0 "2009104"  10.24544471938791      .3112664735975913 0 .000026965363 . . . . 0 40 0
      0 "2009737" 11.384910258747595                      0 1  .00002699325 . . . . 0 40 0
      0 "2014495" 14.572171359631138      .2627239042069831 0 .000028510945 . . . . 0 40 0
      0 "2007737"  10.40961214374347     .10601687927438522 1  .00002909876 . . . . 0 40 0
      0 "2002355" 12.557503865145852     .03587528308918384 1  .00002917957 . . . . 0 40 0
      0 "2008283"    9.4925826756776     .20651136560819017 0 .000029287135 . . . . 0 40 0
      0 "2001737" 10.080000605922026     .19080080766167126 1 .000030898787 . . . . 0 40 0
      0 "2008737" 10.732672357496405    .002554339968191238 0 .000033797885 . . . . 0 40 0
      1 "2003531" 15.951803021768882                      0 0  .00003412488 . . . . 0 40 0
      0 "2014495" 11.518450175612928    .020132561648807137 0  .00003445728 . . . . 0 40 0
      0 "2005737" 11.013517741515043                      0 0  .00003465607 . . . . 0 40 0
      0 "2006737" 11.051810216769898    .000792581437742728 1 .000035447018 . . . . 0 40 0
      0 "2008283"  10.52613179345847     .06591042440837082 0  .00003706622 . . . . 0 40 0
      0 "2014283" 10.996601419215988   .0007073593479177402 1  .00003746474 . . . . 0 40 0
      0 "2001737" 11.626495192652756      .5389464078896571 1   .0000411404 . . . . 0 40 0
      0 "2001737" 10.101436365215783     .10982386738249976 1  .00004354051 . . . . 0 40 0
      0 "2002384" 11.215879689565481   .0024693205627057766 0  .00004597792 . . . . 0 40 0
      0 "2008737" 10.022469868767994     .09865253105652895 0  .00004774763 . . . . 0 40 0
      0 "2008737" 11.088384565356742                      0 1  .00005152511 . . . . 0 40 0
      0 "2007737" 11.244300644051904                      0 1  .00005678163 . . . . 0 40 0
      0 "2004737" 10.885266354583443     .04890235721390733 1  .00005890934 . . . . 0 40 0
      0 "2001737" 10.901653158794721                      0 0  .00005920633 . . . . 0 40 0
      0 "2007441" 11.713455241412852      .2273076923076923 0  .00006225884 . . . . 0 40 0
      0 "2012737" 10.617319324288905  .00022999835715459177 1 .000063574684 . . . . 0 40 0
      0 "2011131"   12.8432339598416                      0 1 .000065384025 . . . . 0 40 0
      0 "2007441" 11.586194513897674     .18780240801170248 0  .00006587112 . . . . 0 40 0
      0 "2009441"  11.64832136831384     .12398126748570734 1  .00006874608 . . . . 0 40 0
      0 "2003737" 10.892675523922948                      0 1  .00007074019 . . . . 0 40 0
      0 "2014283" 10.073145935376685                      0 1  .00007184002 . . . . 0 40 0
      0 "2008283" 11.287692231790937                      0 0  .00007202982 . . . . 0 40 0
      0 "2011737" 11.177452728682098                      0 1  .00007377008 . . . . 0 40 0
      0 "2001355" 10.668071283033923   .0028007136633334717 0  .00007378792 . . . . 0 40 0
      0 "2014737"   9.86568183780023                      0 1  .00007926606 . . . . 0 40 0
      0 "2008283" 11.395098678356785      .5379267474767303 0   .0000804873 . . . . 0 40 0
      0 "2003737" 11.171153208021556    .029994150906609476 0  .00008113735 . . . . 0 40 0
      0 "2006737" 10.528195279873552     .23476100814409837 0  .00008207415 . . . . 0 40 0
      0 "2011737" 11.897480132383482     .11665963315196913 1  .00008340389 . . . . 0 40 0
      0 "2011737" 11.011984163278214                      0 1  .00008340512 . . . . 0 40 0
      0 "2011737"  9.887663002189157     .09776220202241448 0  .00008842463 . . . . 0 40 0
      0 "2011737" 12.071969661006694     .14012578017056554 1  .00009476791 . . . . 0 40 0
      0 "2001737" 10.075464117275093      .2140663148775301 0  .00009520935 . . . . 0 40 0
      0 "2007441" 12.474048061080468     .36747445173145477 0  .00009550306 . . . . 0 40 0
      0 "2008283" 10.477823043556645       .510612704202398 0  .00009551532 . . . . 0 40 0
      0 "2002371" 11.027475147535466     .18008637374106778 0  .00009740338 . . . . 0 40 0
      0 "2001737"   9.50144159247362     .12915432708127675 1  .00009811363 . . . . 0 40 0
      0 "2008737" 11.299311363872148     .13470027567070864 0   .0001023188 . . . . 0 40 0
      0 "2014495"  13.08183508974799      .6574763038216176 0  .00010617948 . . . . 0 40 0
      0 "2011737" 10.780101467257385      .0873012972775443 1    .000108694 . . . . 0 40 0
      0 "2004737"   9.81809304951918     .05705539943797672 1  .00010915731 . . . . 0 40 0
      0 "2007737" 13.371082663436868      .6686795106880008 1    .000109461 . . . . 0 40 0
      0 "2008737"  9.969790141790192                      0 1  .00010957594 . . . . 0 40 0
      0 "2008283" 14.597111283422947      .1095820545448179 0  .00011050884 . . . . 0 40 0
      0 "2005737"  9.512516890578416      .2891554419427785 0  .00011376233 . . . . 0 40 0
      0 "2011737"  10.00102252837266     .17297495503780316 0  .00011652002 . . . . 0 40 0
      0 "2003737" 10.901450433054308                      0 0  .00011787342 . . . . 0 40 0
      0 "2003384" 13.853805843041055 .000020161109667476098 1  .00011787427 . . . . 0 40 0
      0 "2007737"  10.08797343215946                      0 1  .00011945009 . . . . 0 40 0
      0 "2004357" 10.305814408143789    .021595180384304632 0  .00012063444 . . . . 0 40 0
      0 "2011737"  10.36135533943734      .3704839622469285 1  .00012097116 . . . . 0 40 0
      0 "2008874" 10.893734816526113   .0013040076501782145 1   .0001226062 . . . . 0 40 0
      0 "2004737" 10.709248877465209                      0 1  .00012483746 . . . . 0 40 0
      0 "2001737"  9.908922755026067    .001325088339222615 0  .00012508668 . . . . 0 40 0
      0 "2008481" 10.055822298839407     .22706058060300569 0  .00012693627 . . . . 0 40 0
      0 "2012737" 10.764540378155667    .022739092229614618 0  .00012700417 . . . . 0 40 0
      0 "2013737"   9.82271124250884     .10056945291844621 1  .00012714464 . . . . 0 40 0
      0 "2008737"  9.746892220313054   .0074553228812630195 1  .00012867113 . . . . 0 40 0
      0 "2001737" 10.445782773171514       .250723060622548 0  .00012989897 . . . . 0 40 0
      end

      Many thanks

      Comment


      • #18
        That data is not usable for this purpose. The values of density_not_target and density_target are all missing values.

        What I need to work with are the three variables that are shown in the graph you posted in #13--which should not have missing values-- and nothing else..

        Comment


        • #19
          When I use -dataex- for these three variables, there are as well missing values. Don't know why...

          Code:
          * Example generated by -dataex-. To install: ssc install dataex
          clear
          input float takeoverprobability double(density_non_target density_target)
            .016850855  2.533138506960165 1.4644210782652693
              .1038409  4.871109133942839 1.6819204767448988
              .3181999   6.12702647586685 1.8577224454310033
              .4557988  5.696928644412888 1.9898769686727584
             .05644004   3.59474176664303 2.0634872411164786
             .06213041 2.5643429725610045 2.0801163880533555
              .5341991 2.0005700646678886  2.039267722553391
            .009240349 1.6386516703755099 1.9366197262912803
              .3564936 1.3801370408843456  1.757748745859747
             .50231534 1.1662669054319663  1.503206740678369
          .00013620115 1.0064085220703844 1.3234744774465335
              .2424768  .8835792853255127 1.2123578234909833
             .24891353  .7845475398937577  1.140876997727665
             .09330165   .714682929959353  1.091833559614344
            .002825512  .6420537325017841 1.0600584816066239
           .0017102738  .5752569466249826 1.0397004333173197
           .0022102147  .5174173403222263  1.018593137553206
             .01928018 .46710393674994277  .9887675871736066
            .005792567  .4430495385269227  .9672720279616168
              .2652003  .4224095411834686   .934225885200198
                     1 .40382953391169957  .8938948131347672
              .4732055  .3688021819113364   .853027989061233
              .4658009  .3312888315133841   .816480949124971
              .0139667  .2967606585411146  .7717071983315916
             .26492476 .27711049029255413  .7107834362657435
              .2562827  .2690114455029169  .6446472077834385
              .6609572  .2587724268965795  .5854587507054513
            .003771938 .24675987819112485  .5289388705759344
               .456195  .2306501116598925 .48230411251564964
             .05820318 .21717207812754238 .43661437536603875
             .04144772 .20120853411517678  .3918247224770775
             .04550905 .18209199972135395  .3520477410832238
              .2001688 .15377258419927264  .3155093099347333
              .8386641 .13549509211248986  .2889721684127007
             .17886336 .12684264597355255 .26089262864158586
             .07677092 .12446156924368654 .24298372486864075
             .58685386   .120838753071407 .23431176135837303
            .033296745 .10586212014781371 .23184343509543362
             .06502003 .09573251555091401  .2372498408792831
            .003817532 .09789470617988076 .24133529536213544
              .5980914 .10376015773575169 .24453110255893923
              .8612611 .10526570603093457 .29611181556851446
             .26153523 .09751193911296994 .34258734237351285
               .393779 .08567042189779737 .37548245820561676
             .09344646 .08228793377529205 .39485271263998545
             .53928816 .07971379069961976 .39898076457014275
              .5355574  .5535670930466093  .3920898479085011
             .29004145   .945858303547061  .3782996806138692
             .28896233 1.0052023196349567  .3536483769921255
              .8701631  .7412163272750156  .3175091473257396
             .13373262                  .                  .
            .006380306                  .                  .
              .5218316                  .                  .
              .4781684                  .                  .
             .28691563                  .                  .
             .09506663                  .                  .
              .5429174                  .                  .
              .3362938                  .                  .
              .3585629                  .                  .
              .8764199                  .                  .
              .2252797                  .                  .
              .2737344                  .                  .
             .23382504                  .                  .
              .0578781                  .                  .
                     1                  .                  .
              .3499862                  .                  .
              .3692907                  .                  .
              .7012434                  .                  .
              .8661952                  .                  .
             .30972674                  .                  .
              .7810728                  .                  .
             .13300355                  .                  .
             .07182569                  .                  .
             .26726103                  .                  .
             .27392334                  .                  .
             .09852806                  .                  .
              .3371563                  .                  .
             .24635683                  .                  .
              .3692907                  .                  .
              .0413126                  .                  .
            .025599217                  .                  .
              .1623095                  .                  .
              .0888028                  .                  .
             .04373884                  .                  .
                     1                  .                  .
           .0026975975                  .                  .
             .22590183                  .                  .
              .3784195                  .                  .
             .07934052                  .                  .
              .1807605                  .                  .
              .2258567                  .                  .
              .7981135                  .                  .
             .13502061                  .                  .
             .01019599                  .                  .
              .3509425                  .                  .
          .00003412488                  .                  .
            .014894587                  .                  .
            .004827914                  .                  .
              .8923964                  .                  .
             .05550784                  .                  .
          end

          Comment


          • #20
            This is not the data from which you generated that graph: graphing this data gives something that looks entirely different from what you showed: both curves are very saw-toothed and the two graphs keep crossing each other repeatedly. So this is not what you showed earlier. And the fact that you have missing values her suggests you did something wrong along the way.

            Comment

            Working...
            X