Announcement

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

  • Problem extracting state-years represented in the range of two date variables

    Hello,

    I have data on state policies for 50 US states. I am interested in 1998-2017. Currently, my data provides a set of "policy begin dates" and "policy end dates" for each state. I would like to extract the years represented within each of these date ranges to create state-year data so that each year represents the policy active for the most months out of that year. Is there a way to A) extract years represented between two date variables? OR B) if you see a solution the coding approach I attempted below?

    Currently, my data looks like this:

    Code:
    state  policydatebegin policydateend
    Alabama    5/1/1998    3/31/2000
    Alabama    4/1/2000    1/31/2004
    Alabama    2/1/2004    9/30/2006
    Alabama    1/1/2007    1/31/2008
    Alabama    2/1/2008    9/30/2008
    Alabama    10/1/2008   12/31/2013
    Alabama    1/1/2014    9/30/2020
    ...
    I would like it to look like this where the "year" represents the policy that was active for the most months out of the year.

    Code:
    State      Year
    Alabama    1998    
    Alabama    1999
    Alabama    2000
    Alabama    2001    
    Alabama    2002
    Alabama    2003
    Alabama    2004    
    Alabama    2005
    Alabama    2006
    ...
    Alabama    2014  
    Alabama    2015
    Alabama    2016
    So far, I have extracted the day, month, and year from each policy begin and end date variable using the following code.

    Code:
    *Create day, month, year variables for policy begin date
    gen month_begin=month(policydatebegin)
    gen year_begin=year(policydatebegin)
    gen day_begin=day(policydatebegin)
    I then used the following loop to create a flag called "monthsflag_YRXX" to count the months a policy was active in each year.

    Code:
    forvalues i=1998/2017 {
    gen    monthsflag_`i' = .
    replace monthsflag_`i' = 12-month_begin if (`i'==year_begin & year_end!=year_begin)
    replace monthsflag_`i' = month_end if `i'==year_end
    replace monthsflag_`i' = 12 if (`i'<year_end & `i'>year_begin)
    replace monthsflag_`i' = (month_end-month_begin) if `i'==year_begin & `i'==year_end
    }

    I then used the "policy begin date" to merge the data with a separate file of state-years only for 1998-2017, so that I would have a state observation for each year. This almost worked but I encounter issues when there are multiple observations per state-year. I would like to assign the policy that was active for the months out of year to the respective year. Here is example of data with the flag for 2006 looks like this:

    Code:
    state          policydatebegin  policydateend monthsflag_2006 year(as start year)
    North Carolina  5/1/2004        6/30/2006      6              2004
    North Carolina                                                2005
    North Carolina  10/1/2006       12/31/2007     2              2006
    North Carolina  7/1/2006        9/30/2006      2              2006
    North Carolina                                                2007
    North Carolina  12/1/2008       7/31/2009                     2008
    In the above case, the first row is policies that were active in NC in 2006 for 6 months. The second two rows of policies were active for only 2 months each. However, you will notice this creates duplicate years for some states and does not captures instances where the most active policy is tied to a year in a date range from the observation prior. Based on the policy data I have, I would like to tell Stata to use the first line of policies as the policy for NC in 2006 since it was active for the most months. I would like to ignore the number of days and I am not concerned about the few months of missing data (as you will notice in this case from July to September of 2006). However, I cannot determine how to tell Stata to do so.

    Thank you for your time and knowledge.

    KaLeigh
    Last edited by KaLeigh White; 17 Oct 2022, 13:00.

  • #2
    I'm not sure I understand what you're looking for. But at least for the data shown, most years the policy is active for all 12 months. Anyway, here's how you can calculate the number of months in each calendar year for which the policy is active in each state. Hopefully, you can take it from there.

    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input str7 state float(policydatebegin policydateend)
    "Alabama" 14000 14700
    "Alabama" 14701 16101
    "Alabama" 16102 17074
    "Alabama" 17167 17562
    "Alabama" 17563 17805
    "Alabama" 17806 19723
    "Alabama" 19724 22188
    end
    format %td policydatebegin
    format %td policydateend
    
    //  CREATE MONTHLY VARIABLES
    foreach v of varlist policy* {
        local w: subinstr local v "date" "month"
        gen `w' = mofd(`v')
        format `w' %tm
    }
    
    gen long obs_no = _n
    expand policymonthend - policymonthbegin + 1
    by obs_no, sort: gen month = policymonthbegin + _n - 1
    gen year = year(dofm(month))
    collapse (count) active_months = month, by(state year)
    Note: the above code assumes you are starting with policydatebegin and policydateend as genuine Stata internal format daily date variables. If they are actually strings that look like dates to human eyes, then you need to first convert them using the -daily()- function. (See -help daily()- if you are not familiar with that.)

    In the future, when showing data examples, please use the -dataex- command to do so, as I have here. If you are running version 17, 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


    • #3
      Hi Clyde,

      Thank you for the quick and thoughtful response! It took me some time to work through your suggestion, but I understand it now. I will try to explain more clearly the issue I am having (but, full disclosure, not 100% confident I can do so here).

      I had successfully calculated the number of months in each calendar year for which the policy is active in each state. (That is what the flagmonths_yrxx" variable did – though clunky). However, I also tried your very promising approach to do this, but it did not work as I had hoped.

      Using your method, I do end up with a single observation per year after collapsing. However, I don't think it captured the date ranges correctly. I am running into a similar issue as before. The main issue I am having is with accurately calculating the max active months for policy state-years that span two or three different time periods. This is best observed in the North Carolina 2006 example above. In that case, I have 3 places where an active policy is represented in 2006 for NC. The longest period of which is during a 6 month range (Jan-Jun 2006) for policy period that begin during 2004 and ended in 2006. I think you can see this example easily using your new code just prior to collapsing it.

      Code:
      * Example generated by -dataex-. For more info, type help dataex
      clear
      input str14 state int policydatebegin float(policydateend policymonthbegin policymonthend)
      "North Carolina" 16192 16982 532 557
      "North Carolina" 16192 16982 532 557
      "North Carolina" 16192 16982 532 557
      "North Carolina" 16192 16982 532 557
      "North Carolina" 16192 16982 532 557
      "North Carolina" 16192 16982 532 557
      "North Carolina" 16192 16982 532 557
      "North Carolina" 16192 16982 532 557
      "North Carolina" 16192 16982 532 557
      "North Carolina" 16192 16982 532 557
      "North Carolina" 16192 16982 532 557
      "North Carolina" 16192 16982 532 557
      "North Carolina" 16192 16982 532 557
      "North Carolina" 16192 16982 532 557
      "North Carolina" 16192 16982 532 557
      "North Carolina" 16192 16982 532 557
      "North Carolina" 16192 16982 532 557
      "North Carolina" 16192 16982 532 557
      "North Carolina" 16192 16982 532 557
      "North Carolina" 16192 16982 532 557
      "North Carolina" 16192 16982 532 557
      "North Carolina" 16192 16982 532 557
      "North Carolina" 16192 16982 532 557
      "North Carolina" 16192 16982 532 557
      "North Carolina" 16192 16982 532 557
      "North Carolina" 16192 16982 532 557
      "North Carolina" 16983 17074 558 560
      "North Carolina" 16983 17074 558 560
      "North Carolina" 16983 17074 558 560
      "North Carolina" 17075 17531 561 575
      "North Carolina" 17075 17531 561 575
      "North Carolina" 17075 17531 561 575
      "North Carolina" 17075 17531 561 575
      "North Carolina" 17075 17531 561 575
      "North Carolina" 17075 17531 561 575
      "North Carolina" 17075 17531 561 575
      "North Carolina" 17075 17531 561 575
      "North Carolina" 17075 17531 561 575
      "North Carolina" 17075 17531 561 575
      "North Carolina" 17075 17531 561 575
      "North Carolina" 17075 17531 561 575
      "North Carolina" 17075 17531 561 575
      "North Carolina" 17075 17531 561 575
      "North Carolina" 17075 17531 561 575
      end
      format %td policydatebegin
      format %td policydateend
      format %tm policymonthbegin
      format %tm policymonthend
      You can see here that there is no policy active for an entire 12 months in NC (but rather 1 instance of 6 months [Jan-June] and 2 instances of 2 months [Jul-Sep and Oct-Dec]).If you look at the observations with a policy begin date of May 2004 and end date of June 2006, I hope you can see what I mean. I can't determine how to capture instance like that 6 month period from Jan - Jun 2006, which is the policy that was active for the most months in NC but is not tied to a 2006 start year.

      Thus, the max months should be 6 months for NC in 2006 but the collapsed data indicates shows active 12 months, which is not observed in the original data.

      Code:
      * Example generated by -dataex-. For more info, type help dataex
      clear
      input str14 state float year long active_months
      "North Carolina" 1998 12
      "North Carolina" 1999  7
      "North Carolina" 2000 12
      "North Carolina" 2001 12
      "North Carolina" 2002 12
      "North Carolina" 2003 12
      "North Carolina" 2004 12
      "North Carolina" 2005 12
      "North Carolina" 2006 12
      "North Carolina" 2007 12
      "North Carolina" 2008 10
      "North Carolina" 2009  7
      "North Carolina" 2010 10
      "North Carolina" 2011 12
      "North Carolina" 2012 12
      "North Carolina" 2013 12
      "North Carolina" 2014 12
      "North Carolina" 2015 12
      "North Carolina" 2016 12
      "North Carolina" 2017 10
      end

      Secondary Question RE: #2 - I am not sure I fully follow the vision for how I would use this method to identify the observation I want to keep. I see this code could help me identify the most active month (i.e., in a .dta of the summary statistic ) but it does not successfully identify the line to keep for the rest of the data set. Would the vision be to then merge this file back into the original data file with my remaining variables and use it to select my preferred observation that way?

      Thank you for your help and patience.

      KaLeigh

      P.S. Yes, I am familiar with dataex and my apologies for not using it the first time. I had hoped the date ranges question would be easier to understand in my modified tables. :D
      Last edited by KaLeigh White; 18 Oct 2022, 19:34.

      Comment


      • #4
        I'm not sure I understand yet. But if I do, then what you seek to do is not possible with this data. Somehow, you want to distinguish the first 6 months of 2006 from the 2 subsequent 3 month periods because they somehow represent different policies. But there is nothing in the data that says that these are different policies. So there is nothing that Stata can be told to decide to keep these apart but not separate others. There needs to be something that indicates which observations represent the same policies and which represent different ones. Without that, the problem cannot be solved.

        Perhaps your intention is that every observation in your data set constitutes a different policy. In that case, you can do this:
        Code:
        gen long obs_no = _n
        expand policymonthend - policymonthbegin + 1
        by obs_no, sort: gen month = policymonthbegin + _n - 1
        gen year = year(dofm(month))
        keep obs_no state month year
        duplicates drop
        collapse (count) active_months = month, by(state obs_no year)
        collapse (max) active_months, by(state year)
        And yes, you could -merge- this back to the original data if that is the end result you want.

        Comment


        • #5
          Clyde,

          Yes, I see the challenge with identifying the policies. I was hoping to find a way to use the years in the date ranges to separate the policies by year. Thank you for your help and perspective. You have provided me with some helpful code that I believe I can still use moving forward. I will keep working through it.

          Many thanks,
          KaLeigh
          Last edited by KaLeigh White; 19 Oct 2022, 21:07.

          Comment


          • #6
            If the combination of state, start date and end date uniquely identify a policy, then you can identify the policy active for the most months in a particular state and year. However, there may be multiple policies that satisfy this criterion (see e.g., Alabama in 2008 below), and it is not clear which policy you will want to keep.

            Code:
            * Example generated by -dataex-. To install: ssc install dataex
            clear
            input str14 state int policydatebegin float policydateend
            "Alabama" 14000 14700
            "Alabama" 14701 16101
            "Alabama" 16102 17074
            "Alabama" 17167 17562
            "Alabama" 17563 17805
            "Alabama" 17806 19723
            "Alabama" 19724 22188
            "North Carolina" 16192 16982
            "North Carolina" 16983 17074  
            "North Carolina" 17075 17531
            end
            format %td policydatebegin
            format %td policydateend
            
            *CHECK IF STATE POLICYDATEBEGIN POLICYDATEEND UNIQUELY IDENTIFY AN OBSERVATION
            isid state policydatebegin policydateend
            *IF #1 PASSES
            egen policyid= group(state policydatebegin policydateend)
            g startym= ym(year(policydatebegin), month(policydateend))
            g endym=  ym(year(policydateend), month(policydateend))
            expand endym-startym+1
            bys state policyid (startym): g yearmonth= startym[1]+_n-1
            format *ym yearmonth %tm
            g year= year(dofm(yearmonth))
            bys policyid year: g duration=_N
            bys state year: egen maxduration= max(duration)
            keep if duration==maxduration
            sort state policyid yearmonth
            l state policyid policydatebegin policydateend year yearmonth, sepby(state year)
            Res.:

            Code:
            . l state policyid policydatebegin policydateend year yearmonth, sepby(state year)
            
                 +---------------------------------------------------------------------+
                 |          state   policyid   policyd~n   policyd~d   year   yearmo~h |
                 |---------------------------------------------------------------------|
              1. |        Alabama          1   01may1998   31mar2000   1998     1998m3 |
              2. |        Alabama          1   01may1998   31mar2000   1998     1998m4 |
              3. |        Alabama          1   01may1998   31mar2000   1998     1998m5 |
              4. |        Alabama          1   01may1998   31mar2000   1998     1998m6 |
              5. |        Alabama          1   01may1998   31mar2000   1998     1998m7 |
              6. |        Alabama          1   01may1998   31mar2000   1998     1998m8 |
              7. |        Alabama          1   01may1998   31mar2000   1998     1998m9 |
              8. |        Alabama          1   01may1998   31mar2000   1998    1998m10 |
              9. |        Alabama          1   01may1998   31mar2000   1998    1998m11 |
             10. |        Alabama          1   01may1998   31mar2000   1998    1998m12 |
                 |---------------------------------------------------------------------|
             11. |        Alabama          1   01may1998   31mar2000   1999     1999m1 |
             12. |        Alabama          1   01may1998   31mar2000   1999     1999m2 |
             13. |        Alabama          1   01may1998   31mar2000   1999     1999m3 |
             14. |        Alabama          1   01may1998   31mar2000   1999     1999m4 |
             15. |        Alabama          1   01may1998   31mar2000   1999     1999m5 |
             16. |        Alabama          1   01may1998   31mar2000   1999     1999m6 |
             17. |        Alabama          1   01may1998   31mar2000   1999     1999m7 |
             18. |        Alabama          1   01may1998   31mar2000   1999     1999m8 |
             19. |        Alabama          1   01may1998   31mar2000   1999     1999m9 |
             20. |        Alabama          1   01may1998   31mar2000   1999    1999m10 |
             21. |        Alabama          1   01may1998   31mar2000   1999    1999m11 |
             22. |        Alabama          1   01may1998   31mar2000   1999    1999m12 |
                 |---------------------------------------------------------------------|
             23. |        Alabama          2   01apr2000   31jan2004   2000     2000m1 |
             24. |        Alabama          2   01apr2000   31jan2004   2000     2000m2 |
             25. |        Alabama          2   01apr2000   31jan2004   2000     2000m3 |
             26. |        Alabama          2   01apr2000   31jan2004   2000     2000m4 |
             27. |        Alabama          2   01apr2000   31jan2004   2000     2000m5 |
             28. |        Alabama          2   01apr2000   31jan2004   2000     2000m6 |
             29. |        Alabama          2   01apr2000   31jan2004   2000     2000m7 |
             30. |        Alabama          2   01apr2000   31jan2004   2000     2000m8 |
             31. |        Alabama          2   01apr2000   31jan2004   2000     2000m9 |
             32. |        Alabama          2   01apr2000   31jan2004   2000    2000m10 |
             33. |        Alabama          2   01apr2000   31jan2004   2000    2000m11 |
             34. |        Alabama          2   01apr2000   31jan2004   2000    2000m12 |
                 |---------------------------------------------------------------------|
             35. |        Alabama          2   01apr2000   31jan2004   2001     2001m1 |
             36. |        Alabama          2   01apr2000   31jan2004   2001     2001m2 |
             37. |        Alabama          2   01apr2000   31jan2004   2001     2001m3 |
             38. |        Alabama          2   01apr2000   31jan2004   2001     2001m4 |
             39. |        Alabama          2   01apr2000   31jan2004   2001     2001m5 |
             40. |        Alabama          2   01apr2000   31jan2004   2001     2001m6 |
             41. |        Alabama          2   01apr2000   31jan2004   2001     2001m7 |
             42. |        Alabama          2   01apr2000   31jan2004   2001     2001m8 |
             43. |        Alabama          2   01apr2000   31jan2004   2001     2001m9 |
             44. |        Alabama          2   01apr2000   31jan2004   2001    2001m10 |
             45. |        Alabama          2   01apr2000   31jan2004   2001    2001m11 |
             46. |        Alabama          2   01apr2000   31jan2004   2001    2001m12 |
                 |---------------------------------------------------------------------|
             47. |        Alabama          2   01apr2000   31jan2004   2002     2002m1 |
             48. |        Alabama          2   01apr2000   31jan2004   2002     2002m2 |
             49. |        Alabama          2   01apr2000   31jan2004   2002     2002m3 |
             50. |        Alabama          2   01apr2000   31jan2004   2002     2002m4 |
             51. |        Alabama          2   01apr2000   31jan2004   2002     2002m5 |
             52. |        Alabama          2   01apr2000   31jan2004   2002     2002m6 |
             53. |        Alabama          2   01apr2000   31jan2004   2002     2002m7 |
             54. |        Alabama          2   01apr2000   31jan2004   2002     2002m8 |
             55. |        Alabama          2   01apr2000   31jan2004   2002     2002m9 |
             56. |        Alabama          2   01apr2000   31jan2004   2002    2002m10 |
             57. |        Alabama          2   01apr2000   31jan2004   2002    2002m11 |
             58. |        Alabama          2   01apr2000   31jan2004   2002    2002m12 |
                 |---------------------------------------------------------------------|
             59. |        Alabama          2   01apr2000   31jan2004   2003     2003m1 |
             60. |        Alabama          2   01apr2000   31jan2004   2003     2003m2 |
             61. |        Alabama          2   01apr2000   31jan2004   2003     2003m3 |
             62. |        Alabama          2   01apr2000   31jan2004   2003     2003m4 |
             63. |        Alabama          2   01apr2000   31jan2004   2003     2003m5 |
             64. |        Alabama          2   01apr2000   31jan2004   2003     2003m6 |
             65. |        Alabama          2   01apr2000   31jan2004   2003     2003m7 |
             66. |        Alabama          2   01apr2000   31jan2004   2003     2003m8 |
             67. |        Alabama          2   01apr2000   31jan2004   2003     2003m9 |
             68. |        Alabama          2   01apr2000   31jan2004   2003    2003m10 |
             69. |        Alabama          2   01apr2000   31jan2004   2003    2003m11 |
             70. |        Alabama          2   01apr2000   31jan2004   2003    2003m12 |
                 |---------------------------------------------------------------------|
             71. |        Alabama          3   01feb2004   30sep2006   2004     2004m9 |
             72. |        Alabama          3   01feb2004   30sep2006   2004    2004m10 |
             73. |        Alabama          3   01feb2004   30sep2006   2004    2004m11 |
             74. |        Alabama          3   01feb2004   30sep2006   2004    2004m12 |
                 |---------------------------------------------------------------------|
             75. |        Alabama          3   01feb2004   30sep2006   2005     2005m1 |
             76. |        Alabama          3   01feb2004   30sep2006   2005     2005m2 |
             77. |        Alabama          3   01feb2004   30sep2006   2005     2005m3 |
             78. |        Alabama          3   01feb2004   30sep2006   2005     2005m4 |
             79. |        Alabama          3   01feb2004   30sep2006   2005     2005m5 |
             80. |        Alabama          3   01feb2004   30sep2006   2005     2005m6 |
             81. |        Alabama          3   01feb2004   30sep2006   2005     2005m7 |
             82. |        Alabama          3   01feb2004   30sep2006   2005     2005m8 |
             83. |        Alabama          3   01feb2004   30sep2006   2005     2005m9 |
             84. |        Alabama          3   01feb2004   30sep2006   2005    2005m10 |
             85. |        Alabama          3   01feb2004   30sep2006   2005    2005m11 |
             86. |        Alabama          3   01feb2004   30sep2006   2005    2005m12 |
                 |---------------------------------------------------------------------|
             87. |        Alabama          3   01feb2004   30sep2006   2006     2006m1 |
             88. |        Alabama          3   01feb2004   30sep2006   2006     2006m2 |
             89. |        Alabama          3   01feb2004   30sep2006   2006     2006m3 |
             90. |        Alabama          3   01feb2004   30sep2006   2006     2006m4 |
             91. |        Alabama          3   01feb2004   30sep2006   2006     2006m5 |
             92. |        Alabama          3   01feb2004   30sep2006   2006     2006m6 |
             93. |        Alabama          3   01feb2004   30sep2006   2006     2006m7 |
             94. |        Alabama          3   01feb2004   30sep2006   2006     2006m8 |
             95. |        Alabama          3   01feb2004   30sep2006   2006     2006m9 |
                 |---------------------------------------------------------------------|
             96. |        Alabama          4   01jan2007   31jan2008   2007     2007m1 |
             97. |        Alabama          4   01jan2007   31jan2008   2007     2007m2 |
             98. |        Alabama          4   01jan2007   31jan2008   2007     2007m3 |
             99. |        Alabama          4   01jan2007   31jan2008   2007     2007m4 |
            100. |        Alabama          4   01jan2007   31jan2008   2007     2007m5 |
            101. |        Alabama          4   01jan2007   31jan2008   2007     2007m6 |
            102. |        Alabama          4   01jan2007   31jan2008   2007     2007m7 |
            103. |        Alabama          4   01jan2007   31jan2008   2007     2007m8 |
            104. |        Alabama          4   01jan2007   31jan2008   2007     2007m9 |
            105. |        Alabama          4   01jan2007   31jan2008   2007    2007m10 |
            106. |        Alabama          4   01jan2007   31jan2008   2007    2007m11 |
            107. |        Alabama          4   01jan2007   31jan2008   2007    2007m12 |
                 |---------------------------------------------------------------------|
            108. |        Alabama          4   01jan2007   31jan2008   2008     2008m1 |
            109. |        Alabama          5   01feb2008   30sep2008   2008     2008m9 |
            110. |        Alabama          6   01oct2008   31dec2013   2008    2008m12 |
                 |---------------------------------------------------------------------|
            111. |        Alabama          6   01oct2008   31dec2013   2009     2009m1 |
            112. |        Alabama          6   01oct2008   31dec2013   2009     2009m2 |
            113. |        Alabama          6   01oct2008   31dec2013   2009     2009m3 |
            114. |        Alabama          6   01oct2008   31dec2013   2009     2009m4 |
            115. |        Alabama          6   01oct2008   31dec2013   2009     2009m5 |
            116. |        Alabama          6   01oct2008   31dec2013   2009     2009m6 |
            117. |        Alabama          6   01oct2008   31dec2013   2009     2009m7 |
            118. |        Alabama          6   01oct2008   31dec2013   2009     2009m8 |
            119. |        Alabama          6   01oct2008   31dec2013   2009     2009m9 |
            120. |        Alabama          6   01oct2008   31dec2013   2009    2009m10 |
            121. |        Alabama          6   01oct2008   31dec2013   2009    2009m11 |
            122. |        Alabama          6   01oct2008   31dec2013   2009    2009m12 |
                 |---------------------------------------------------------------------|
            123. |        Alabama          6   01oct2008   31dec2013   2010     2010m1 |
            124. |        Alabama          6   01oct2008   31dec2013   2010     2010m2 |
            125. |        Alabama          6   01oct2008   31dec2013   2010     2010m3 |
            126. |        Alabama          6   01oct2008   31dec2013   2010     2010m4 |
            127. |        Alabama          6   01oct2008   31dec2013   2010     2010m5 |
            128. |        Alabama          6   01oct2008   31dec2013   2010     2010m6 |
            129. |        Alabama          6   01oct2008   31dec2013   2010     2010m7 |
            130. |        Alabama          6   01oct2008   31dec2013   2010     2010m8 |
            131. |        Alabama          6   01oct2008   31dec2013   2010     2010m9 |
            132. |        Alabama          6   01oct2008   31dec2013   2010    2010m10 |
            133. |        Alabama          6   01oct2008   31dec2013   2010    2010m11 |
            134. |        Alabama          6   01oct2008   31dec2013   2010    2010m12 |
                 |---------------------------------------------------------------------|
            135. |        Alabama          6   01oct2008   31dec2013   2011     2011m1 |
            136. |        Alabama          6   01oct2008   31dec2013   2011     2011m2 |
            137. |        Alabama          6   01oct2008   31dec2013   2011     2011m3 |
            138. |        Alabama          6   01oct2008   31dec2013   2011     2011m4 |
            139. |        Alabama          6   01oct2008   31dec2013   2011     2011m5 |
            140. |        Alabama          6   01oct2008   31dec2013   2011     2011m6 |
            141. |        Alabama          6   01oct2008   31dec2013   2011     2011m7 |
            142. |        Alabama          6   01oct2008   31dec2013   2011     2011m8 |
            143. |        Alabama          6   01oct2008   31dec2013   2011     2011m9 |
            144. |        Alabama          6   01oct2008   31dec2013   2011    2011m10 |
            145. |        Alabama          6   01oct2008   31dec2013   2011    2011m11 |
            146. |        Alabama          6   01oct2008   31dec2013   2011    2011m12 |
                 |---------------------------------------------------------------------|
            147. |        Alabama          6   01oct2008   31dec2013   2012     2012m1 |
            148. |        Alabama          6   01oct2008   31dec2013   2012     2012m2 |
            149. |        Alabama          6   01oct2008   31dec2013   2012     2012m3 |
            150. |        Alabama          6   01oct2008   31dec2013   2012     2012m4 |
            151. |        Alabama          6   01oct2008   31dec2013   2012     2012m5 |
            152. |        Alabama          6   01oct2008   31dec2013   2012     2012m6 |
            153. |        Alabama          6   01oct2008   31dec2013   2012     2012m7 |
            154. |        Alabama          6   01oct2008   31dec2013   2012     2012m8 |
            155. |        Alabama          6   01oct2008   31dec2013   2012     2012m9 |
            156. |        Alabama          6   01oct2008   31dec2013   2012    2012m10 |
            157. |        Alabama          6   01oct2008   31dec2013   2012    2012m11 |
            158. |        Alabama          6   01oct2008   31dec2013   2012    2012m12 |
                 |---------------------------------------------------------------------|
            159. |        Alabama          6   01oct2008   31dec2013   2013     2013m1 |
            160. |        Alabama          6   01oct2008   31dec2013   2013     2013m2 |
            161. |        Alabama          6   01oct2008   31dec2013   2013     2013m3 |
            162. |        Alabama          6   01oct2008   31dec2013   2013     2013m4 |
            163. |        Alabama          6   01oct2008   31dec2013   2013     2013m5 |
            164. |        Alabama          6   01oct2008   31dec2013   2013     2013m6 |
            165. |        Alabama          6   01oct2008   31dec2013   2013     2013m7 |
            166. |        Alabama          6   01oct2008   31dec2013   2013     2013m8 |
            167. |        Alabama          6   01oct2008   31dec2013   2013     2013m9 |
            168. |        Alabama          6   01oct2008   31dec2013   2013    2013m10 |
            169. |        Alabama          6   01oct2008   31dec2013   2013    2013m11 |
            170. |        Alabama          6   01oct2008   31dec2013   2013    2013m12 |
                 |---------------------------------------------------------------------|
            171. |        Alabama          7   01jan2014   30sep2020   2014     2014m9 |
            172. |        Alabama          7   01jan2014   30sep2020   2014    2014m10 |
            173. |        Alabama          7   01jan2014   30sep2020   2014    2014m11 |
            174. |        Alabama          7   01jan2014   30sep2020   2014    2014m12 |
                 |---------------------------------------------------------------------|
            175. |        Alabama          7   01jan2014   30sep2020   2015     2015m1 |
            176. |        Alabama          7   01jan2014   30sep2020   2015     2015m2 |
            177. |        Alabama          7   01jan2014   30sep2020   2015     2015m3 |
            178. |        Alabama          7   01jan2014   30sep2020   2015     2015m4 |
            179. |        Alabama          7   01jan2014   30sep2020   2015     2015m5 |
            180. |        Alabama          7   01jan2014   30sep2020   2015     2015m6 |
            181. |        Alabama          7   01jan2014   30sep2020   2015     2015m7 |
            182. |        Alabama          7   01jan2014   30sep2020   2015     2015m8 |
            183. |        Alabama          7   01jan2014   30sep2020   2015     2015m9 |
            184. |        Alabama          7   01jan2014   30sep2020   2015    2015m10 |
            185. |        Alabama          7   01jan2014   30sep2020   2015    2015m11 |
            186. |        Alabama          7   01jan2014   30sep2020   2015    2015m12 |
                 |---------------------------------------------------------------------|
            187. |        Alabama          7   01jan2014   30sep2020   2016     2016m1 |
            188. |        Alabama          7   01jan2014   30sep2020   2016     2016m2 |
            189. |        Alabama          7   01jan2014   30sep2020   2016     2016m3 |
            190. |        Alabama          7   01jan2014   30sep2020   2016     2016m4 |
            191. |        Alabama          7   01jan2014   30sep2020   2016     2016m5 |
            192. |        Alabama          7   01jan2014   30sep2020   2016     2016m6 |
            193. |        Alabama          7   01jan2014   30sep2020   2016     2016m7 |
            194. |        Alabama          7   01jan2014   30sep2020   2016     2016m8 |
            195. |        Alabama          7   01jan2014   30sep2020   2016     2016m9 |
            196. |        Alabama          7   01jan2014   30sep2020   2016    2016m10 |
            197. |        Alabama          7   01jan2014   30sep2020   2016    2016m11 |
            198. |        Alabama          7   01jan2014   30sep2020   2016    2016m12 |
                 |---------------------------------------------------------------------|
            199. |        Alabama          7   01jan2014   30sep2020   2017     2017m1 |
            200. |        Alabama          7   01jan2014   30sep2020   2017     2017m2 |
            201. |        Alabama          7   01jan2014   30sep2020   2017     2017m3 |
            202. |        Alabama          7   01jan2014   30sep2020   2017     2017m4 |
            203. |        Alabama          7   01jan2014   30sep2020   2017     2017m5 |
            204. |        Alabama          7   01jan2014   30sep2020   2017     2017m6 |
            205. |        Alabama          7   01jan2014   30sep2020   2017     2017m7 |
            206. |        Alabama          7   01jan2014   30sep2020   2017     2017m8 |
            207. |        Alabama          7   01jan2014   30sep2020   2017     2017m9 |
            208. |        Alabama          7   01jan2014   30sep2020   2017    2017m10 |
            209. |        Alabama          7   01jan2014   30sep2020   2017    2017m11 |
            210. |        Alabama          7   01jan2014   30sep2020   2017    2017m12 |
                 |---------------------------------------------------------------------|
            211. |        Alabama          7   01jan2014   30sep2020   2018     2018m1 |
            212. |        Alabama          7   01jan2014   30sep2020   2018     2018m2 |
            213. |        Alabama          7   01jan2014   30sep2020   2018     2018m3 |
            214. |        Alabama          7   01jan2014   30sep2020   2018     2018m4 |
            215. |        Alabama          7   01jan2014   30sep2020   2018     2018m5 |
            216. |        Alabama          7   01jan2014   30sep2020   2018     2018m6 |
            217. |        Alabama          7   01jan2014   30sep2020   2018     2018m7 |
            218. |        Alabama          7   01jan2014   30sep2020   2018     2018m8 |
            219. |        Alabama          7   01jan2014   30sep2020   2018     2018m9 |
            220. |        Alabama          7   01jan2014   30sep2020   2018    2018m10 |
            221. |        Alabama          7   01jan2014   30sep2020   2018    2018m11 |
            222. |        Alabama          7   01jan2014   30sep2020   2018    2018m12 |
                 |---------------------------------------------------------------------|
            223. |        Alabama          7   01jan2014   30sep2020   2019     2019m1 |
            224. |        Alabama          7   01jan2014   30sep2020   2019     2019m2 |
            225. |        Alabama          7   01jan2014   30sep2020   2019     2019m3 |
            226. |        Alabama          7   01jan2014   30sep2020   2019     2019m4 |
            227. |        Alabama          7   01jan2014   30sep2020   2019     2019m5 |
            228. |        Alabama          7   01jan2014   30sep2020   2019     2019m6 |
            229. |        Alabama          7   01jan2014   30sep2020   2019     2019m7 |
            230. |        Alabama          7   01jan2014   30sep2020   2019     2019m8 |
            231. |        Alabama          7   01jan2014   30sep2020   2019     2019m9 |
            232. |        Alabama          7   01jan2014   30sep2020   2019    2019m10 |
            233. |        Alabama          7   01jan2014   30sep2020   2019    2019m11 |
            234. |        Alabama          7   01jan2014   30sep2020   2019    2019m12 |
                 |---------------------------------------------------------------------|
            235. |        Alabama          7   01jan2014   30sep2020   2020     2020m1 |
            236. |        Alabama          7   01jan2014   30sep2020   2020     2020m2 |
            237. |        Alabama          7   01jan2014   30sep2020   2020     2020m3 |
            238. |        Alabama          7   01jan2014   30sep2020   2020     2020m4 |
            239. |        Alabama          7   01jan2014   30sep2020   2020     2020m5 |
            240. |        Alabama          7   01jan2014   30sep2020   2020     2020m6 |
            241. |        Alabama          7   01jan2014   30sep2020   2020     2020m7 |
            242. |        Alabama          7   01jan2014   30sep2020   2020     2020m8 |
            243. |        Alabama          7   01jan2014   30sep2020   2020     2020m9 |
                 |---------------------------------------------------------------------|
            244. | North Carolina          8   01may2004   30jun2006   2004     2004m6 |
            245. | North Carolina          8   01may2004   30jun2006   2004     2004m7 |
            246. | North Carolina          8   01may2004   30jun2006   2004     2004m8 |
            247. | North Carolina          8   01may2004   30jun2006   2004     2004m9 |
            248. | North Carolina          8   01may2004   30jun2006   2004    2004m10 |
            249. | North Carolina          8   01may2004   30jun2006   2004    2004m11 |
            250. | North Carolina          8   01may2004   30jun2006   2004    2004m12 |
                 |---------------------------------------------------------------------|
            251. | North Carolina          8   01may2004   30jun2006   2005     2005m1 |
            252. | North Carolina          8   01may2004   30jun2006   2005     2005m2 |
            253. | North Carolina          8   01may2004   30jun2006   2005     2005m3 |
            254. | North Carolina          8   01may2004   30jun2006   2005     2005m4 |
            255. | North Carolina          8   01may2004   30jun2006   2005     2005m5 |
            256. | North Carolina          8   01may2004   30jun2006   2005     2005m6 |
            257. | North Carolina          8   01may2004   30jun2006   2005     2005m7 |
            258. | North Carolina          8   01may2004   30jun2006   2005     2005m8 |
            259. | North Carolina          8   01may2004   30jun2006   2005     2005m9 |
            260. | North Carolina          8   01may2004   30jun2006   2005    2005m10 |
            261. | North Carolina          8   01may2004   30jun2006   2005    2005m11 |
            262. | North Carolina          8   01may2004   30jun2006   2005    2005m12 |
                 |---------------------------------------------------------------------|
            263. | North Carolina          8   01may2004   30jun2006   2006     2006m1 |
            264. | North Carolina          8   01may2004   30jun2006   2006     2006m2 |
            265. | North Carolina          8   01may2004   30jun2006   2006     2006m3 |
            266. | North Carolina          8   01may2004   30jun2006   2006     2006m4 |
            267. | North Carolina          8   01may2004   30jun2006   2006     2006m5 |
            268. | North Carolina          8   01may2004   30jun2006   2006     2006m6 |
                 |---------------------------------------------------------------------|
            269. | North Carolina         10   01oct2006   31dec2007   2007     2007m1 |
            270. | North Carolina         10   01oct2006   31dec2007   2007     2007m2 |
            271. | North Carolina         10   01oct2006   31dec2007   2007     2007m3 |
            272. | North Carolina         10   01oct2006   31dec2007   2007     2007m4 |
            273. | North Carolina         10   01oct2006   31dec2007   2007     2007m5 |
            274. | North Carolina         10   01oct2006   31dec2007   2007     2007m6 |
            275. | North Carolina         10   01oct2006   31dec2007   2007     2007m7 |
            276. | North Carolina         10   01oct2006   31dec2007   2007     2007m8 |
            277. | North Carolina         10   01oct2006   31dec2007   2007     2007m9 |
            278. | North Carolina         10   01oct2006   31dec2007   2007    2007m10 |
            279. | North Carolina         10   01oct2006   31dec2007   2007    2007m11 |
            280. | North Carolina         10   01oct2006   31dec2007   2007    2007m12 |
                 +---------------------------------------------------------------------+

            Comment


            • #7
              RE #6:

              Hi Andrew,

              Thank you for the reply! I believe this worked as I had hoped (or at least got me very close).

              One slight clarification -- I believe your startym generation line should read:

              Code:
              g startym= ym(year(policydatebegin), month(policydatebegin))
              instead of
              Code:
              g startym= ym(year(policydatebegin), month(policydateend))
              If that is correct, then I believe I achieved my goal using your code by adding one more step. First, after keeping by maxduration, I then kept the first observation of each state's policyid group (as the state-year observations should be the same by policyid). However, there are instances, as you noted, where there is more than once state-year that fits the max duration criteria. To identify these, I created a count variable using yearto identify observations with duplicate state-years.Within this, I can then set a rule and drop the duplicate case by my preference. In this case, I selected to keep the policy that was in place during July of each year.

              Code:
              sort state year
              bysort state policyid: keep if _n==1
              bysort state year: egen year_count=count(year)
              gen drop_flag = 1 if month(dofm(yearmonth))!=7 & year_count==2
              drop if drop_flag==1

              I would like to find a better way to identify the policy active during July. In this case, it was easy because the start months happened to be July but otherwise this is working well for me.

              Thank you!!

              KaLeigh

              Comment


              • #8
                Originally posted by KaLeigh White View Post
                RE #6:

                Hi Andrew,

                Thank you for the reply! I believe this worked as I had hoped (or at least got me very close).

                One slight clarification -- I believe your startym generation line should read:

                Code:
                g startym= ym(year(policydatebegin), month(policydatebegin))
                instead of
                Code:
                g startym= ym(year(policydatebegin), month(policydateend))
                Sorry, inattention on my part. It should be as you have corrected.

                However, there are instances, as you noted, where there is more than once state-year that fits the max duration criteria. To identify these, I created a count variable using yearto identify observations with duplicate state-years.Within this, I can then set a rule and drop the duplicate case by my preference. In this case, I selected to keep the policy that was in place during July of each year.

                Code:
                sort state year
                bysort state policyid: keep if _n==1
                bysort state year: egen year_count=count(year)
                gen drop_flag = 1 if month(dofm(yearmonth))!=7 & year_count==2
                drop if drop_flag==1
                I would like to find a better way to identify the policy active during July.
                Your general method appears fine, except I do not understand why you drop all months except those which include July and why you restrict these to cases with only 2 ties.

                1. There could be more than 2 tied maxima.
                2. There could be multiple maxima each not including the month of July.

                Your code won't drop cases where #1 holds and would drop all cases where #2 holds and you have a pair. Here is what I suggest:

                Code:
                bysort state policyid: egen july= max(dofm(yearmonth)==7)
                bysort state policyid (year): keep if _n==1
                bysort state year (july): egen tag=  july[_N] & !july[1]
                drop if !july & tag
                You will need to filter out more observations that satisfy #2 above which will still remain in the dataset. Also, multiple policies that were active in July in a state and year are kept.
                Last edited by Andrew Musau; 25 Oct 2022, 04:41.

                Comment


                • #9
                  RE: #8

                  Thanks for the additional code. Yes, the rough code I used was only intended to work for the specific cases of maximum duration pairs that remained for me. I only wanted to keep the bolded cases:

                  Code:
                  * Example generated by -dataex-. For more info, type help dataex
                  clear
                  input str14 state float policyid int policydatebegin float(policydateend year yearmonth)
                  "Mississippi"  214 14426 14517 1999 474
                  "Mississippi"  215 14518 14975 1999 477
                  "Pennsylvania" 362 18079 18109 2009 594
                  "Pennsylvania" 363 18232 19448 2009 599
                  "Virginia"     430 17348 17439 2007 570
                  "Virginia"     431 17440 17805 2007 573
                  end
                  format %td policydatebegin
                  format %td policydateend
                  format %tm yearmonth
                  I cannot understand your suggested code entirely. The suggested july variable does not appear to work for me. It assigns all of my cases as a 0. Not sure what it should have done. The july[_N]returns an unknown egen function error. Either way, I believe your main point/concern to be about successfully and efficiently achieving my "keep" goal of only having one policy per state year. For now, I am may just have drop carefully by specific case. Thank you again for your time. I hope I can move forward from here!

                  Comment


                  • #10
                    In #8 I think that

                    Code:
                     
                     bysort state year (july): egen tag=  july[_N] & !july[1]
                    is a typo for
                    Code:
                      
                     bysort state year (july): gen tag=  july[_N] & !july[1]

                    Comment


                    • #11
                      Sorry, I meant

                      Code:
                      bysort state year (july): gen tag= july[_N] & !july[1]

                      _N is the last observation in the group and 1 is the first. Since 0 is sorted before 1, a value with july=1 will always be sorted last as july is 0/1 indicator. Notice that the line


                      bysort state policyid: egen july= max(dofm(yearmonth)==7)

                      occurs before


                      bysort state policyid (year): keep if _n==1

                      where you restrict each group to the first observation. So you need the initial dataset to test whether the code works.

                      Comment


                      • #12
                        RE #10 - Yes, that corrects the function error. Thanks!

                        Comment


                        • #13
                          RE #11: I missed your reply somehow. Thanks for walking through the functions. I have the code in the correct order -- just as you have written it -- before dropping anything. It still does not assign a 1 to any of my observations. I will keep playing with it.

                          Comment


                          • #14
                            I see what is missing. We need to embed the month function. This is now tested with the data in #6 (see Alabama in 2008).

                            Code:
                            * Example generated by -dataex-. To install: ssc install dataex
                            clear
                            input str14 state int policydatebegin float policydateend
                            "Alabama" 14000 14700
                            "Alabama" 14701 16101
                            "Alabama" 16102 17074
                            "Alabama" 17167 17562
                            "Alabama" 17563 17805
                            "Alabama" 17806 19723
                            "Alabama" 19724 22188
                            "North Carolina" 16192 16982
                            "North Carolina" 16983 17074  
                            "North Carolina" 17075 17531
                            end
                            format %td policydatebegin
                            format %td policydateend
                            
                            *CHECK IF STATE POLICYDATEBEGIN POLICYDATEEND UNIQUELY IDENTIFY AN OBSERVATION
                            isid state policydatebegin policydateend
                            *IF #1 PASSES
                            egen policyid= group(state policydatebegin policydatebegin)
                            g startym= ym(year(policydatebegin), month(policydateend))
                            g endym=  ym(year(policydateend), month(policydateend))
                            expand endym-startym+1
                            bys state policyid (startym): g yearmonth= startym[1]+_n-1
                            format *ym yearmonth %tm
                            g year= year(dofm(yearmonth))
                            bys policyid year: g duration=_N
                            bys state year: egen maxduration= max(duration)
                            keep if duration==maxduration
                            sort state policyid yearmonth
                            bysort state policyid: egen july= max(month(dofm(yearmonth))==7)
                            bysort state policyid (year): keep if _n==1
                            bysort state year (july): gen tag=  july[_N] & !july[1]
                            drop if !july & tag
                            l state policyid policydatebegin policydateend year yearmonth july tag, sepby(state year)
                            Res.:

                            Code:
                            . l state policyid policydatebegin policydateend year yearmonth july tag, sepby(state year)
                            
                                 +----------------------------------------------------------------------------------+
                                 |          state   policyid   policyd~n   policyd~d   year   yearmo~h   july   tag |
                                 |----------------------------------------------------------------------------------|
                              1. |        Alabama          1   01may1998   31mar2000   1998     1998m3      1     0 |
                                 |----------------------------------------------------------------------------------|
                              2. |        Alabama          2   01apr2000   31jan2004   2000     2000m1      1     0 |
                                 |----------------------------------------------------------------------------------|
                              3. |        Alabama          3   01feb2004   30sep2006   2004     2004m9      1     0 |
                                 |----------------------------------------------------------------------------------|
                              4. |        Alabama          4   01jan2007   31jan2008   2007     2007m1      1     0 |
                                 |----------------------------------------------------------------------------------|
                              5. |        Alabama          6   01oct2008   31dec2013   2008    2008m12      1     1 |
                                 |----------------------------------------------------------------------------------|
                              6. |        Alabama          7   01jan2014   30sep2020   2014     2014m9      1     0 |
                                 |----------------------------------------------------------------------------------|
                              7. | North Carolina          8   01may2004   30jun2006   2004     2004m6      1     0 |
                                 |----------------------------------------------------------------------------------|
                              8. | North Carolina         10   01oct2006   31dec2007   2007     2007m1      1     0 |
                                 +----------------------------------------------------------------------------------+
                            
                            .

                            Comment


                            • #15
                              I greatly appreciate the energy you are giving to my question! I hope I am not failing to share some key data detail. Can you clarify what the july and the tag variables should be indicating? In the data from #6, why is it assigning a 1 to the tag for line 5 of your list (Alabama policyid 6)? I don't see two policies that meet the maxduration criteria listed for 2008.

                              For me, july and the tag still assign the same values (1 and 0 respectively) to all of my observations.

                              The maxduration code correctly identifies policyid "6" as the policy to keep for Alabama in 2008.

                              I thought the tag variable should select the policy with July as the active month only for case where there is more than one policyid meeting the maxdurtion criteria for a state year. See below data example. This is what my clunky coded drop_flag does (which, as you previously noted, is not a good way to do it).

                              Code:
                              sort state policyid yearmonth
                              bysort state policyid: egen july= max(month(dofm(yearmonth))==7)
                              bysort state policyid (year): keep if _n==1
                              bysort state year (july): gen tag=  july[_N] & !july[1]
                              
                              bysort state year: egen year_count=count(year)
                              
                              gen drop_flag = 1 if month(dofm(yearmonth))!=7 & year_count>1
                              I thought the tag variable should assign a 1 to the same cases that drop_flag variable but it tags no cases.

                              Code:
                              * Example generated by -dataex-. For more info, type help dataex
                              clear
                              input str14 state float policyid int policydatebegin float(policydateend year yearmonth tag july year_count drop_flag)
                              "Mississippi"  213 13880 14244 1998 456 0 1 1 .
                              "Mississippi"  214 14426 14517 1999 474 0 1 2 .
                              "Mississippi"  215 14518 14975 1999 477 0 1 2 1
                              "Mississippi"  216 15035 15917 2001 494 0 1 1 .
                              "Mississippi"  217 16223 16952 2004 533 0 1 1 .
                              "Mississippi"  219 17257 17470 2007 567 0 1 1 .
                              "Mississippi"  220 17532 17805 2008 576 0 1 1 .
                              "Mississippi"  221 17898 18382 2009 588 0 1 1 .
                              "Mississippi"  222 18383 19935 2010 604 0 1 1 .
                              "Mississippi"  223 20089 21185 2015 660 0 1 1 .
                              "Pennsylvania" 358 13849 16860 1997 455 0 1 1 .
                              "Pennsylvania" 359 16861 17074 2006 554 0 1 1 .
                              "Pennsylvania" 360 17167 17622 2007 564 0 1 1 .
                              "Pennsylvania" 361 17714 17805 2008 582 0 1 1 .
                              "Pennsylvania" 362 18079 18109 2009 594 0 1 2 .
                              "Pennsylvania" 363 18232 19448 2009 599 0 1 2 1
                              "Pennsylvania" 364 19540 22780 2013 642 0 1 1 .
                              "Virginia"     425 13880 14244 1998 456 0 1 1 .
                              "Virginia"     426 14426 14975 1999 474 0 1 1 .
                              "Virginia"     427 15127 15340 2001 497 0 1 1 .
                              "Virginia"     428 15341 16252 2002 504 0 1 1 .
                              "Virginia"     429 16253 17074 2004 534 0 1 1 .
                              "Virginia"     430 17348 17439 2007 570 0 1 2 .
                              "Virginia"     431 17440 17805 2007 573 0 1 2 1
                              "Virginia"     432 18079 18352 2009 594 0 1 1 .
                              "Virginia"     433 18353 19723 2010 603 0 1 1 .
                              "Virginia"     434 19724 21730 2014 648 0 1 1 .
                              end
                              format %td policydatebegin
                              format %td policydateend
                              format %tm yearmonth
                              I don't want to take too much of your time so please do not hesitate to tap out. You have helped me A TON already.

                              Comment

                              Working...
                              X