Hi everyone,
I would like to compute the average of consumption shares before and after households install solar panels (represented by -date_pv_install-). My dataset goes from January 2021 to July 2023. But I don't know exactly how to proceed. Here is a dataex:
The -h_0-, -h_1-, -h_2- and -h_3- represent 12 a.m., 1 a.m., 2 a.m. and 3 a.m. respectively, and so on. These hours go to -h_23-.
My idea was the following to compute consumption shares, but not sure if feasible:
Lovely day.
Michael
I would like to compute the average of consumption shares before and after households install solar panels (represented by -date_pv_install-). My dataset goes from January 2021 to July 2023. But I don't know exactly how to proceed. Here is a dataex:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input long id double date_pv_install float(date_elec_consumption h_0 h_1 h_2 h_3) 1059 22973 22281 .005 .005 .006 .005 1059 22973 22282 .006 .005 .005 .006 1059 22973 22283 .006 .005 .006 .005 1059 22973 22284 .005 .005 .006 .005 1059 22973 22285 .005 .006 .005 .005 1059 22973 22286 .005 .006 .005 .005 1059 22973 22287 .006 .005 .005 .006 1059 22973 22288 .005 .005 .006 .005 1059 22973 22289 .006 .005 .005 .006 1059 22973 22290 .005 .006 .005 .005 end format %td date_pv_install format %td date_elec_consumption
My idea was the following to compute consumption shares, but not sure if feasible:
- First, add all the hours to have the daily consumption, by ID and date,
- Second, find the consumption shares by dividing each hour by the daily consumption that we compute at 1.
- Collapse and have the daily hourly shares, for each hour, day and consumer. The hourly shares have to sum up to one normally.
- Do the average before and after the date households installed PV (I don't know how to do that),
- Finally, produce a graph showing before the PV installation, and after the PV installation. I would like to have "a normalized" graph, as the date in which households installed PV differs tremendously. But I don't know if this point is feasible or not.
Lovely day.
Michael