Announcement

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

  • #16
    OK, that's probably an answerable question if we could see the data. But as far as I can see you are showing us nothing about those observations that might explain and I don't have any guesses.

    We just need to be able to reproduce the problem: clearly you aren't expected to post the entire dataset. bank_id 2 would presumably be enough,

    Comment


    • #17
      Hi Nick,

      Below is ten lines before the cutoff ofbank_id 1 and all of bank_id 2.


      Code:
      * Example generated by -dataex-. To install: ssc install dataex
      clear
      input float mdate byte bank_id double fedfunds float(date2 fedfunds2)
      680 1  .4000000059604645 680   .4
      681 1  .4000000059604645 681   .4
      682 1                .45 682   .4
      683 1  .4099999964237213 683  .41
      684 1  .5400000214576721 684  .54
      685 1                 .7 685  .65
      686 1  .6600000262260437 686  .66
      687 1  .7900000214576721 687  .79
      688 1                .95 688   .9
      689 1  .9100000262260437 689  .91
      690 1 1.0399999618530273 690 1.04
      691 1 1.1533333333333333 691 1.15
      692 1  1.159999966621399 692 1.16
      693 1  1.149999976158142 693 1.15
      694 1 1.2033333333333334 694 1.15
      517 2               1.25   .    .
      518 2 1.2999999523162842   .    .
      519 2                  .   .    .
      520 2 1.2466666666666666   .    .
      521 2                  .   .    .
      522 2                  .   .    .
      523 2 1.0166666666666666   .    .
      524 2                  .   .    .
      525 2                  .   .    .
      526 2  .9966666666666667   .    .
      527 2                  .   .    .
      528 2                  .   .    .
      529 2 1.0033333333333334   .    .
      530 2                  .   .    .
      531 2                  .   .    .
      532 2               1.01   .    .
      533 2                  .   .    .
      534 2                  .   .    .
      535 2 1.4333333333333333   .    .
      536 2                  .   .    .
      537 2                  .   .    .
      538 2               1.95   .    .
      539 2                  .   .    .
      540 2                  .   .    .
      541 2               2.47   .    .
      542 2                  .   .    .
      543 2                  .   .    .
      544 2 2.9433333333333334   .    .
      545 2                  .   .    .
      546 2                  .   .    .
      547 2               3.46   .    .
      548 2                  .   .    .
      549 2                  .   .    .
      550 2               3.98   .    .
      551 2                  .   .    .
      552 2                  .   .    .
      553 2  4.456666666666667   .    .
      554 2                  .   .    .
      555 2                  .   .    .
      556 2  4.906666666666666   .    .
      557 2                  .   .    .
      558 2                  .   .    .
      559 2  5.246666666666667   .    .
      560 2                  .   .    .
      561 2                  .   .    .
      562 2  5.246666666666667   .    .
      563 2                  .   .    .
      564 2                  .   .    .
      565 2  5.256666666666667   .    .
      566 2                  .   .    .
      567 2                  .   .    .
      568 2               5.25   .    .
      569 2                  .   .    .
      570 2                  .   .    .
      571 2  5.073333333333333   .    .
      572 2                  .   .    .
      573 2                  .   .    .
      574 2  4.496666666666667   .    .
      575 2                  .   .    .
      576 2                  .   .    .
      577 2 3.1766666666666667   .    .
      578 2                  .   .    .
      579 2                  .   .    .
      580 2  2.086666666666667   .    .
      581 2                  .   .    .
      582 2                  .   .    .
      583 2               1.94   .    .
      584 2                  .   .    .
      585 2                  .   .    .
      586 2  .5066666666666667   .    .
      587 2                  .   .    .
      588 2                  .   .    .
      589 2 .18333333333333332   .    .
      590 2                  .   .    .
      591 2                  .   .    .
      592 2                .18   .    .
      593 2                  .   .    .
      594 2                  .   .    .
      595 2 .15666666666666668   .    .
      596 2                  .   .    .
      597 2                  .   .    .
      598 2                .12   .    .
      599 2                  .   .    .
      600 2                  .   .    .
      601 2 .13333333333333333   .    .
      602 2                  .   .    .
      603 2                  .   .    .
      604 2 .19333333333333333   .    .
      605 2                  .   .    .
      606 2                  .   .    .
      607 2 .18666666666666668   .    .
      608 2                  .   .    .
      609 2                  .   .    .
      610 2 .18666666666666668   .    .
      611 2                  .   .    .
      612 2                  .   .    .
      613 2 .15666666666666668   .    .
      614 2                  .   .    .
      615 2                  .   .    .
      616 2 .09333333333333334   .    .
      617 2                  .   .    .
      618 2                  .   .    .
      619 2 .08333333333333333   .    .
      620 2                  .   .    .
      621 2                  .   .    .
      622 2 .07333333333333333   .    .
      623 2                  .   .    .
      624 2                  .   .    .
      625 2 .10333333333333333   .    .
      626 2                  .   .    .
      627 2                  .   .    .
      628 2 .15333333333333332   .    .
      629 2                  .   .    .
      630 2                  .   .    .
      631 2 .14333333333333334   .    .
      632 2                  .   .    .
      633 2                  .   .    .
      634 2                .16   .    .
      635 2                  .   .    .
      636 2                  .   .    .
      637 2 .14333333333333334   .    .
      638 2                  .   .    .
      end
      format %tm mdate
      format %tm date2

      Comment


      • #18
        Thanks for the data example.

        There are no observations with a non-missing value for fedfunds2 that could be used to replace a missing value of fedfunds, so it's not a surprise that nothing was changed. Positively put, all the observations with non-missing fedfunds2 are observations that also have non-missing fedfunds -- they are at the top of the listing I don't know whether the explanation lies in the original data or in what you did earlier.

        I can tell you that an incorrect xtset setting has no side-effects for mipolate (SSC), which makes no use of any such settings.

        Comment


        • #19
          Hi Nick,

          Perhaps I could rephrase. Now that I have interpolated my data, and in doing so trebled the size of my datset, how do I go about adding new variables to my dataset? If I have new complete monthly dataset I want to add to my panel, Is there a function that will allow me to fill this down, by panel identifier and date?

          Comment


          • #20
            That sounds like a merge or an interpolation or both.

            Comment


            • #21
              If all the data points are known, and they just need to be copied down in a cascade, interpolation would be unnecessary - no?

              I tried merging, but stata returned the error "variables ... do not uniquely identify observations in the master data; r459". I assume this is caused by attempting to merge time-series data into a panel.
              Last edited by Ciaran OFlynn; 02 Aug 2018, 13:07.

              Comment

              Working...
              X