Announcement

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

  • Missing Values, trying to fill them in

    Dear StataList,

    In some of the literature I read, authors deal with missing values for the VIX index via imputing. I'm trying to understand what this means but as I followed some code I found the values remained missing.
    I'd be very grateful if someone could point me in the right direction.

    The other alternative I have is to use the previous values or an average.


    Code:
     dataex
    
    ----------------------- copy starting from the next line -----------------------
    
    
    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input int Year str24 Source str32 Destination double Industrial_FDI str3 country_code float Month str10 date float(VIX Time) byte _merge float Time_from_date
    16070 "Switzerland"    "Australia" 5.05197216363338 "AUS" 16070 "12/31/2003" 18.31 2003 3 2003
    15795 "Singapore"      "Australia" 65.3701585226344 "AUS" 15795 "03/31/2003" 29.15 2003 3 2003
    15978 "Japan"          "Australia" 4.66091820088557 "AUS" 15978 "09/30/2003" 22.72 2003 3 2003
    15795 "Sweden"         "Australia" 4.35801056817563 "AUS" 15795 "03/31/2003" 29.15 2003 3 2003
    15978 "Denmark"        "Australia" 89.6125565136332 "AUS" 15978 "09/30/2003" 22.72 2003 3 2003
    15978 "Sweden"         "Australia" 58.2614775110697 "AUS" 15978 "09/30/2003" 22.72 2003 3 2003
    15978 "Taiwan, China"  "Australia" 4.66091820088557 "AUS" 15978 "09/30/2003" 22.72 2003 3 2003
    15978 "Denmark"        "Australia" 89.6125565136332 "AUS" 15978 "09/30/2003" 22.72 2003 3 2003
    15886 "Germany"        "Australia" 4.57090618215061 "AUS" 15886 "06/30/2003" 19.52 2003 3 2003
    15978 "Japan"          "Australia" 69.9137730132836 "AUS" 15978 "09/30/2003" 22.72 2003 3 2003
    15795 "Sweden"         "Australia" 83.7887410796971 "AUS" 15795 "03/31/2003" 29.15 2003 3 2003
    15886 "USA"            "Australia" 87.8819517769398 "AUS" 15886 "06/30/2003" 19.52 2003 3 2003
    16344 "Denmark"        "Australia" 95.4316403390125 "AUS" 16344 "09/30/2004" 13.34 2004 3 2004
    16344 "USA"            "Australia" 95.4316403390125 "AUS" 16344 "09/30/2004" 13.34 2004 3 2004
    16161 "Denmark"        "Australia"   73.34425347774 "AUS" 16161 "03/31/2004" 16.74 2004 3 2004
    16161 "Germany"        "Australia" 94.0096032075887 "AUS" 16161 "03/31/2004" 16.74 2004 3 2004
    16161 "Japan"          "Australia"   4.889616898516 "AUS" 16161 "03/31/2004" 16.74 2004 3 2004
    16252 "USA"            "Australia" 72.9297079165198 "AUS" 16252 "06/30/2004" 14.34 2004 3 2004
    16436 "Japan"          "Australia"   13.62100904435 "AUS" 16436 "12/31/2004" 13.29 2004 3 2004
    16436 "France"         "Australia"    81.7260542661 "AUS" 16436 "12/31/2004" 13.29 2004 3 2004
    16526 "USA"            "Australia" 99.6998794352905 "AUS" 16526 "03/31/2005" 14.02 2005 3 2005
    16709 "Germany"        "Australia" 92.6092458124104 "AUS" 16709 "09/30/2005" 11.92 2005 3 2005
    16709 "Switzerland"    "Australia" 4.81678166732897 "AUS" 16709 "09/30/2005" 11.92 2005 3 2005
    16617 "USA"            "Australia" 72.5522678629729 "AUS" 16617 "06/30/2005" 12.04 2005 3 2005
    17166 "Australia"      "Australia" 101.458437994723 "AUS" 17166 ""               . 2006 1 2006
    16891 "China"          "Australia" 93.0867690668991 "AUS" 16891 "03/31/2006" 11.39 2006 3 2006
    16891 "Denmark"        "Australia" 93.0867690668991 "AUS" 16891 "03/31/2006" 11.39 2006 3 2006
    16891 "China"          "Australia" 72.6242782962345 "AUS" 16891 "03/31/2006" 11.39 2006 3 2006
    17166 "Japan"          "Australia" 5.27704485488127 "AUS" 17166 ""               . 2006 1 2006
    16891 "USA"            "Australia" 11.8721050147064 "AUS" 16891 "03/31/2006" 11.39 2006 3 2006
    17256 "USA"            "Australia" 2.33208955223881 "AUS" 17256 ""               . 2007 1 2007
    17256 "Australia"      "Australia" 2.33208955223881 "AUS" 17256 ""               . 2007 1 2007
    17531 "USA"            "Australia" 58.8839720772204 "AUS" 17531 "12/31/2007"  22.5 2007 3 2007
    17531 "Japan"          "Australia"  113.21252697622 "AUS" 17531 "12/31/2007"  22.5 2007 3 2007
    17531 "USA"            "Australia" 2.57617377837839 "AUS" 17531 "12/31/2007"  22.5 2007 3 2007
    17256 "Sweden"         "Australia" 5.33049040511727 "AUS" 17256 ""               . 2007 1 2007
    17897 "Australia"      "Australia"  170.23691303731 "AUS" 17897 "12/31/2008"    40 2008 3 2008
    17713 "Australia"      "Australia" 15.4619197076725 "AUS" 17713 "06/30/2008" 23.95 2008 3 2008
    17713 "Germany"        "Australia" 1.18229955687413 "AUS" 17713 "06/30/2008" 23.95 2008 3 2008
    17987 "Vietnam"        "Australia" 13.0529831201393 "AUS" 17987 "03/31/2009" 44.14 2009 3 2009
    18262 "USA"            "Australia" 2.52105077396259 "AUS" 18262 "12/31/2009" 21.68 2009 3 2009
    18078 "Australia"      "Australia"  15.547395528569 "AUS" 18078 "06/30/2009" 26.35 2009 3 2009
    18078 "France"         "Australia" 5.65359837402511 "AUS" 18078 "06/30/2009" 26.35 2009 3 2009
    18078 "USA"            "Australia" 2.47344928863598 "AUS" 18078 "06/30/2009" 26.35 2009 3 2009
    18078 "Germany"        "Australia" 5.65359837402511 "AUS" 18078 "06/30/2009" 26.35 2009 3 2009
    18262 "USA"            "Australia" 110.790091550158 "AUS" 18262 "12/31/2009" 21.68 2009 3 2009
    18078 "Australia"      "Australia" 4.24019878051883 "AUS" 18078 "06/30/2009" 26.35 2009 3 2009
    18170 "Australia"      "Australia" 74.2605824986821 "AUS" 18170 "09/30/2009" 25.61 2009 3 2009
    18535 "China"          "Australia"  81.888009957582 "AUS" 18535 "09/30/2010"  23.7 2010 3 2010
    18535 "Australia"      "Australia" 104.960633704013 "AUS" 18535 "09/30/2010"  23.7 2010 3 2010
    18352 "Japan"          "Australia" 5.39159854157259 "AUS" 18352 "03/31/2010" 17.59 2010 3 2010
    18627 "Germany"        "Australia"  5.3475935828877 "AUS" 18627 "12/31/2010" 17.75 2010 3 2010
    18443 "Australia"      "Australia" 4.90839704023658 "AUS" 18443 "06/30/2010" 34.54 2010 3 2010
    18535 "Finland"        "Australia"  5.4592006638388 "AUS" 18535 "09/30/2010"  23.7 2010 3 2010
    18627 "Japan"          "Australia"  5.3475935828877 "AUS" 18627 "12/31/2010" 17.75 2010 3 2010
    18627 "China"          "Australia" 102.814834224599 "AUS" 18627 "12/31/2010" 17.75 2010 3 2010
    18443 "Switzerland"    "Australia" 2.14742370510351 "AUS" 18443 "06/30/2010" 34.54 2010 3 2010
    18717 "Australia"      "Australia" 13.9347606063775 "AUS" 18717 "03/31/2011" 17.74 2011 3 2011
    18992 "United Kingdom" "Australia" 65.6188885063258 "AUS" 18992 ""               . 2011 1 2011
    18900 "USA"            "Australia" 103.845486797982 "AUS" 18900 "09/30/2011" 42.96 2011 3 2011
    18992 "USA"            "Australia" 5.17559968703149 "AUS" 18992 ""               . 2011 1 2011
    18808 "United Kingdom" "Australia" 5.78119979840956 "AUS" 18808 "06/30/2011" 16.52 2011 3 2011
    18992 "USA"            "Australia" 2.26432486307628 "AUS" 18992 ""               . 2011 1 2011
    18808 "Australia"      "Australia" 5.78119979840956 "AUS" 18808 "06/30/2011" 16.52 2011 3 2011
    18992 "USA"            "Australia" 5.17559968703149 "AUS" 18992 ""               . 2011 1 2011
    19358 "USA"            "Australia" 52.7759976873558 "AUS" 19358 "12/31/2012" 18.02 2012 3 2012
    19174 "USA"            "Australia"  5.0359998448912 "AUS" 19174 ""               . 2012 1 2012
    19083 "USA"            "Australia" 2.33729988706167 "AUS" 19083 ""               . 2012 1 2012
    19266 "Australia"      "Australia" 99.4388069644084 "AUS" 19266 ""               . 2012 1 2012
    19083 "USA"            "Australia" 102.714975494412 "AUS" 19083 ""               . 2012 1 2012
    19266 "Israel"         "Australia"  2.2627500144816 "AUS" 19266 ""               . 2012 1 2012
    19174 "Australia"      "Australia" 15.2241926410949 "AUS" 19174 ""               . 2012 1 2012
    19602 "Japan"          "Australia" 5.28862680804929 "AUS" 19602 ""               . 2013 1 2013
    19449 "Ireland"        "Australia"  98.510156628179 "AUS" 19449 "04/01/2013" 13.58 2013 3 2013
    19602 "Germany"        "Australia" 52.8862680804929 "AUS" 19602 ""               . 2013 1 2013
    19723 "Finland"        "Australia" 82.7459976450489 "AUS" 19723 "12/31/2013" 13.72 2013 3 2013
    19723 "United Kingdom" "Australia" 106.060366515122 "AUS" 19723 "12/31/2013" 13.72 2013 3 2013
    19693 "USA"            "Australia" 5.43674192849234 "AUS" 19693 ""               . 2013 1 2013
    19418 "USA"            "Australia" 32.6699226553538 "AUS" 19418 "03/01/2013" 15.36 2013 3 2013
    19539 "Australia"      "Australia"   2.288999981688 "AUS" 19539 ""               . 2013 1 2013
    19723 "Australia"      "Australia" 5.51639984300326 "AUS" 19723 "12/31/2013" 13.72 2013 3 2013
    19723 "Germany"        "Australia" 106.060366515122 "AUS" 19723 "12/31/2013" 13.72 2013 3 2013
    19449 "Japan"          "Australia"  76.855487645392 "AUS" 19449 "04/01/2013" 13.58 2013 3 2013
    19571 "Japan"          "Australia" 89.3405374444399 "AUS" 19571 "08/01/2013" 12.94 2013 3 2013
    19631 "Japan"          "Australia" 103.860871491148 "AUS" 19631 "09/30/2013"  16.6 2013 3 2013
    19693 "Italy"          "Australia" 5.43674192849234 "AUS" 19693 ""               . 2013 1 2013
    19449 "Japan"          "Australia"  76.855487645392 "AUS" 19449 "04/01/2013" 13.58 2013 3 2013
    19632 "USA"            "Australia" 13.5225288885003 "AUS" 19632 "10/01/2013" 15.54 2013 3 2013
    19723 "USA"            "Australia" 82.7459976450489 "AUS" 19723 "12/31/2013" 13.72 2013 3 2013
    19418 "USA"            "Australia" 19.6019535932123 "AUS" 19418 "03/01/2013" 15.36 2013 3 2013
    19539 "Switzerland"    "Australia"  1.5695999874432 "AUS" 19539 ""               . 2013 1 2013
    19359 "Germany"        "Australia" 300.074149024059 "AUS" 19359 ""               . 2013 1 2013
    19449 "United Kingdom" "Australia" 16.0115599261233 "AUS" 19449 "04/01/2013" 13.58 2013 3 2013
    19663 "United Kingdom" "Australia" 13.5878476925456 "AUS" 19663 "11/01/2013" 13.28 2013 3 2013
    19663 "Germany"        "Australia" 2.37787334619547 "AUS" 19663 "11/01/2013" 13.28 2013 3 2013
    19723 "USA"            "Australia" 68.9549980375407 "AUS" 19723 "12/31/2013" 13.72 2013 3 2013
    19540 "USA"            "Australia" 100.078281350129 "AUS" 19540 "07/01/2013" 16.37 2013 3 2013
    19602 "USA"            "Australia" 79.3294021207393 "AUS" 19602 ""               . 2013 1 2013
    19723 "USA"            "Australia" 55.1639984300326 "AUS" 19723 "12/31/2013" 13.72 2013 3 2013
    19996 "USA"            "Australia"  75.498003706952 "AUS" 19996 "09/30/2014" 16.31 2014 3 2014
    end
    format %tdnn/dd/CCYY Year
    format %td Month
    label values _merge _merge
    label def _merge 1 "Master only (1)", modify
    label def _merge 3 "Matched (3)", modify
    ------------------ copy up to and including the previous line ------------------ Listed 100 out of 4855 observations Use the count() option to list more
    Thank you

  • #2
    Just the word "imputing" means that they found some reasonable guesses of what that value might be and either correctly or incorrectly used those guesses as a replacement for the missing values. So in short: the fact that some unknown authors used the word "impute" tells you very little. Maybe the authors have a replication package for that article, and you can look at the details. Otherwise, you will just have to ask them what they did.
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      Code:
      help impute

      Comment


      • #4
        Setting aside the question of what can be done with missing values there is some confusion here about dates.

        Code:
        input  Year Month str10 date Time Time_from_date
        16070 16070 "12/31/2003" 2003 2003
        Despite its name Year is a numeric variable containing a Stata daily date.

        Despite its name Month is a numeric variable containing a Stata daily date.

        date is a string variable containing a daily date

        Time and Time_from_date are numeric variables containing year.

        Variable names that are vague and above all variable names that don't apply to their contents help no one. It will be clear that nothing happens to contents when you name a variable. The same is true of assigning display formts.

        What's missing here is what you will need for almost any serious analysis, a Stata monthly date variable.


        Code:
        gen Mdate = mofd(Year)
        format Mdate %tm
        would move you in that direction.


        Comment


        • #5
          Nour:
          The other alternative I have is to use the previous values or an average.
          No technical journal I am ware of would ever accept these two methods as a way to deal missing values.
          Kind regards,
          Carlo
          (StataNow 18.5)

          Comment


          • #6
            There is some duplication in the dataset.

            As the missing is in time, I suppose you could interpolate. As Carlo suggests, this might not satisfy a journal, but it may. I've seen worse.

            Comment


            • #7
              Originally posted by Carlo Lazzaro View Post
              Nour:


              No technical journal I am ware of would ever accept these two methods as a way to deal missing values.
              Which is why I wanted to avoid using either. Should I continue trying with impute or should I interpolate as George suggested.

              Comment


              • #8
                Originally posted by Nick Cox View Post
                Setting aside the question of what can be done with missing values there is some confusion here about dates.

                Code:
                input Year Month str10 date Time Time_from_date
                16070 16070 "12/31/2003" 2003 2003
                Despite its name Year is a numeric variable containing a Stata daily date.

                Despite its name Month is a numeric variable containing a Stata daily date.

                date is a string variable containing a daily date

                Time and Time_from_date are numeric variables containing year.

                Variable names that are vague and above all variable names that don't apply to their contents help no one. It will be clear that nothing happens to contents when you name a variable. The same is true of assigning display formts.

                What's missing here is what you will need for almost any serious analysis, a Stata monthly date variable.


                Code:
                gen Mdate = mofd(Year)
                format Mdate %tm
                would move you in that direction.

                Thank you for the advice. I took a step back to clean up my dataset and it now looks like this
                Code:
                . dataex
                
                ----------------------- copy starting from the next line -----------------------
                
                
                Code:
                * Example generated by -dataex-. For more info, type help dataex
                clear
                input int Year str24 Source str32 Destination double Industrial_FDI float Mdate str3 country_code
                15795 "Japan"             "China"       155.145434439179 518 "CHN"
                15795 "USA"               "Philippines" 155.145434439179 518 "PHL"
                15795 "Malaysia"          "Thailand"    175.570848177807 518 "THA"
                15795 "Thailand"          "Thailand"    155.145434439179 518 "THA"
                15795 "USA"               "China"       4.35801056817563 518 "CHN"
                15795 "Belgium"           "Malaysia"    65.3701585226344 518 "MYS"
                15795 "USA"               "Philippines" 155.145434439179 518 "PHL"
                15795 "Sweden"            "Australia"   4.35801056817563 518 "AUS"
                15795 "Japan"             "Philippines"  202.25263496214 518 "PHL"
                15795 "Singapore"         "China"        202.25263496214 518 "CHN"
                15795 "Sweden"            "Australia"   83.7887410796971 518 "AUS"
                15795 "Taiwan, China"     "China"       132.971836356703 518 "CHN"
                15795 "USA"               "China"       155.145434439179 518 "CHN"
                15795 "Sweden"            "Thailand"    132.971836356703 518 "THA"
                15795 "USA"               "Japan"       1.90662962357684 518 "JPN"
                15795 "Netherlands"       "China"       132.971836356703 518 "CHN"
                15795 "USA"               "Japan"       4.35801056817563 518 "JPN"
                15795 "Republic of Korea" "China"       10.8950264204391 518 "CHN"
                15795 "Japan"             "Hong Kong"   4.35801056817563 518 "HKG"
                15795 "USA"               "China"       4.35801056817563 518 "CHN"
                15795 "Republic of Korea" "China"       10.8950264204391 518 "CHN"
                15795 "Japan"             "China"       65.3701585226344 518 "CHN"
                15795 "USA"               "China"       65.3701585226344 518 "CHN"
                15795 "USA"               "China"       132.971836356703 518 "CHN"
                15795 "Taiwan, China"     "China"       132.971836356703 518 "CHN"
                15795 "Japan"             "China"       4.35801056817563 518 "CHN"
                15795 "United Kingdom"    "South Korea" 4.35801056817563 518 "KOR"
                15795 "Taiwan, China"     "China"       132.971836356703 518 "CHN"
                15795 "Republic of Korea" "China"       175.570848177807 518 "CHN"
                15795 "USA"               "Japan"       155.145434439179 518 "JPN"
                15795 "Singapore"         "China"       10.8950264204391 518 "CHN"
                15795 "USA"               "China"       4.35801056817563 518 "CHN"
                15795 "Taiwan, China"     "China"       155.145434439179 518 "CHN"
                15795 "USA"               "China"       155.145434439179 518 "CHN"
                15795 "USA"               "Hong Kong"   4.35801056817563 518 "HKG"
                15795 "France"            "China"       155.145434439179 518 "CHN"
                15795 "Sweden"            "South Korea" 4.35801056817563 518 "KOR"
                15795 "Switzerland"       "China"       13.1191512774418 518 "CHN"
                15795 "USA"               "China"       155.145434439179 518 "CHN"
                15795 "USA"               "China"       65.3701585226344 518 "CHN"
                15795 "United Kingdom"    "China"       4.35801056817563 518 "CHN"
                15795 "Republic of Korea" "China"       65.3701585226344 518 "CHN"
                15795 "Sweden"            "China"       132.971836356703 518 "CHN"
                15795 "Malaysia"          "China"       155.145434439179 518 "CHN"
                15795 "Singapore"         "Australia"   65.3701585226344 518 "AUS"
                15795 "USA"               "China"       155.145434439179 518 "CHN"
                15795 "Japan"             "China"       13.1191512774418 518 "CHN"
                15795 "Republic of Korea" "China"       10.8950264204391 518 "CHN"
                15795 "Taiwan, China"     "China"       155.145434439179 518 "CHN"
                15795 "Finland"           "China"        202.25263496214 518 "CHN"
                15795 "Republic of Korea" "China"       175.570848177807 518 "CHN"
                15795 "Japan"             "China"       132.971836356703 518 "CHN"
                15795 "USA"               "Singapore"   132.971836356703 518 "SGP"
                15795 "Singapore"         "China"       132.971836356703 518 "CHN"
                15795 "Singapore"         "China"       155.145434439179 518 "CHN"
                15795 "Japan"             "China"       4.35801056817563 518 "CHN"
                15795 "USA"               "Singapore"   155.145434439179 518 "SGP"
                15795 "USA"               "China"       1.90662962357684 518 "CHN"
                15795 "Taiwan, China"     "China"       132.971836356703 518 "CHN"
                15795 "USA"               "China"       155.145434439179 518 "CHN"
                15795 "Switzerland"       "China"       155.145434439179 518 "CHN"
                15795 "Japan"             "China"        202.25263496214 518 "CHN"
                15795 "Germany"           "South Korea" 4.35801056817563 518 "KOR"
                15795 "Hong Kong"         "China"       10.9407223402517 518 "CHN"
                15795 "Germany"           "China"       132.971836356703 518 "CHN"
                15795 "Republic of Korea" "Indonesia"   175.570848177807 518 "IDN"
                15795 "Denmark"           "Japan"       132.971836356703 518 "JPN"
                15795 "USA"               "Singapore"   10.8950264204391 518 "SGP"
                15795 "Japan"             "China"       132.971836356703 518 "CHN"
                15795 "USA"               "China"       132.971836356703 518 "CHN"
                15795 "USA"               "China"       132.971836356703 518 "CHN"
                15795 "Japan"             "Philippines" 175.570848177807 518 "PHL"
                15795 "Germany"           "China"       10.8950264204391 518 "CHN"
                15795 "USA"               "China"       4.35801056817563 518 "CHN"
                15795 "Thailand"          "Hong Kong"   155.145434439179 518 "HKG"
                15795 "Japan"             "Singapore"   130.740317045269 518 "SGP"
                15795 "Taiwan, China"     "China"       132.971836356703 518 "CHN"
                15795 "Switzerland"       "Singapore"   10.4311161954568 518 "SGP"
                15795 "Republic of Korea" "China"       132.971836356703 518 "CHN"
                15795 "Germany"           "Hong Kong"   4.35801056817563 518 "HKG"
                15795 "Denmark"           "Japan"       43.5801056817563 518 "JPN"
                15795 "USA"               "China"       4.35801056817563 518 "CHN"
                15795 "Taiwan, China"     "China"       43.5801056817563 518 "CHN"
                15886 "Japan"             "Vietnam"     162.724530910753 521 "VNM"
                15886 "Republic of Korea" "Thailand"    13.8733790423952 521 "THA"
                15886 "Netherlands"       "China"       139.467717975089 521 "CHN"
                15886 "USA"               "China"       68.5635927322592 521 "CHN"
                15886 "USA"               "China"       1.99977145469089 521 "CHN"
                15886 "Japan"             "Hong Kong"   4.57090618215061 521 "HKG"
                15886 "Japan"             "Vietnam"     139.467717975089 521 "VNM"
                15886 "Republic of Korea" "China"       139.467717975089 521 "CHN"
                15886 "USA"               "China"       4.57090618215061 521 "CHN"
                15886 "Japan"             "China"       68.5635927322592 521 "CHN"
                15886 "Taiwan, China"     "China"       162.724530910753 521 "CHN"
                15886 "Germany"           "China"       162.724530910753 521 "CHN"
                15886 "Japan"             "China"       139.467717975089 521 "CHN"
                15886 "Germany"           "Singapore"   11.4272654553765 521 "SGP"
                15886 "Republic of Korea" "China"       11.4272654553765 521 "CHN"
                15886 "USA"               "China"       162.724530910753 521 "CHN"
                15886 "USA"               "China"       11.4751936921495 521 "CHN"
                end
                format %tdnn/dd/CCYY Year
                format %tm Mdate
                ------------------ copy up to and including the previous line ------------------ Listed 100 out of 4914 observations Use the count() option to list more
                I did the same for another dataset I wanted to merge, hence why I had irregular naming conventions a bad habit of mine apologies if it made reading my dataex harder than necessary,

                I hope I'm not breaking any form rules by including another question but I've run into another problem. which is that

                Code:
                . merge 1:1 Mdate using "D:\STATA\Cleaned_Data\Monthly_VIX_direct.dta"
                variable Mdate does not uniquely identify observations in the master data

                Comment


                • #9
                  You can see at a glance in your -dataex- in #8, without even bringing the data into Stata, that the values of Mdate repeat extensively. What you want is
                  Code:
                  merge m:1 Mdate using "D:\STATA]Cleaned_Data]Monthly_VIX_direct.dta"

                  Comment


                  • #10
                    Nour:
                    I would go -mi-, as it is the safest method to sell to editors and reviewers.
                    Kind regards,
                    Carlo
                    (StataNow 18.5)

                    Comment


                    • #11
                      Originally posted by Carlo Lazzaro View Post
                      I would go -mi-, as it is the safest method to sell to editors and reviewers.
                      I don't want to make your live hard, but ...

                      The data is quite complex: it has both a time series structure and a network structure. Your imputation model would have to do justice to both or your results will be biased. In these cases it is often not at all clear what does the least amount of harm: just removing the missing values or using a wrong imputation model.
                      ---------------------------------
                      Maarten L. Buis
                      University of Konstanz
                      Department of history and sociology
                      box 40
                      78457 Konstanz
                      Germany
                      http://www.maartenbuis.nl
                      ---------------------------------

                      Comment

                      Working...
                      X