Announcement

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

  • How to create a graph for a before/after date comparison?

    Hi everyone,

    I would like to create a graph in which I want to compare some values before the implementation of a policy, and afterwards. Basically, the policy starts at 1 June 2021, and since that date, households have had to select a single electricity tariff (2.0TD), of the "Time-of-Use" Pricing or Dynamic Pricing type. Before that date, they had a choice of many other tariffs.

    If possible, I'd like to create a graph on stata, but due to my inherent lack of experience, I can't think of a type of graph that will allow me to do this, especially as my time variables don't include continuous values, but only the start and end of a given contract.
    For example, I'd like to observe whether the power generated differs between before and after the implementation of this policy, in a purely descriptive way at this stage.

    I was thinking about some distribution plots, but I don't know if they are really suitable in my case.

    Could anyone give me some advices please?

    Here is a dataex, if needed:


    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input long(id sp_zipcode) byte sp_zipcode_twodigits double(date_contract_start date_contract_end) float(kW_power_p1 kW_power_p2) str5 tariff_ekon_id
    1001  9200  9 18887 21700 4.6   . "20A"  
    1001  9200  9 21701 22431 4.6   . "20DHA"
    1001  9200  9 22432 22645 4.6 4.6 "20TD"
    1001  9200  9 22646 22676 4.6 4.6 "20TD"
    1001  9200  9 22677 22735 4.6 4.6 "20TD"
    1001  9200  9 22736 23010 4.6 4.6 "20TD"
    1001  9200  9 23011 23069 4.6 4.6 "20TD"
    1001  9200  9 23070     . 4.6 4.6 "20TD"
    1005 48600 48 18800 21639 3.3   . "20A"  
    1005 48600 48 21640 21651 3.3   . "20A"  
    end
    format %td date_contract_start
    format %td date_contract_end
    Thank you so much for your really appreciated help.
    Best,

    Michael
Working...
X