Announcement

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

  • How can I see in a monthly file which identifiers have dropped out of my sample?

    Hi everyone,

    I have a question. I have many IDs that dropped out through time, and would like to compare that with another file.

    Basically, I have this first dataset, with all households IDs, and the starting and ending of their respective electricity contracts.

    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input long id double(date_contract_start date_contract_end) long idcontrato str5 tariff_ekon_id str13 product_classification
    1001 18887 21700 1001 "20A" "Clasico"
    1001 21701 22431 451697 "20DHA" "Clasico"
    1001 22432 22645 1236132 "20TD" "Clasico"
    1001 22646 22676 1730454 "20TD" "Clasico"
    1001 22677 22735 2082075 "20TD" "Clasico"
    end
    format %td date_contract_start
    format %td date_contract_end
    and I have this second dataset, which contains some information about their electricity consumption during a specific date and time. Here, January 2021:

    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input long id float(date_elec_consumption h_0 h_1 h_2 h_3 h_4 h_5 h_6 h_7 h_8 h_9 h_10 h_11 h_12 h_13 h_14 h_15 h_16 h_17 h_18 h_19 h_20 h_21 h_22 h_23)
    1001 22281 .179 .113 .149 .115 .179 .114 .148 .115 .179 .113 .146 .113 .171 .117 .137 .125 .159 .134 .125 .136 .137 .157 .113 .148
    1001 22282 .115 .181 .114 .149 .115 .168 .131 .127 .134 .125 .166 .111 .142 .11 .175 .114 .148 .113 .143 .138 .146 .112 .146 .113
    end
    format %td date_elec_consumption
    How could I please obtain the information about when they quit my sample, based on the information of my first dataset?

    Thank you very much for your help.
    Best,

    Michael
Working...
X