Hi,
I'm trying to plot a variable over the date, defined as a day/month pair. The x-axis would therefore plot values from January 1 to December 31. I'd like three lines to be plotted on the graph, one for each different year (2020, 2021, 2022).
I have a "date" variable in numeric format (dmy, %td); but I'm having trouble isolating day/month couples in order to use it as x-values. I already have variables isolating month (month) and day (day). In my current dataset, I don't have a value for each day/month pair over the year, so when I'm using the following code, I don't have values from 0 to 365 (which I would like) :
Any idea?
Many thanks for any help,
I'm trying to plot a variable over the date, defined as a day/month pair. The x-axis would therefore plot values from January 1 to December 31. I'd like three lines to be plotted on the graph, one for each different year (2020, 2021, 2022).
I have a "date" variable in numeric format (dmy, %td); but I'm having trouble isolating day/month couples in order to use it as x-values. I already have variables isolating month (month) and day (day). In my current dataset, I don't have a value for each day/month pair over the year, so when I'm using the following code, I don't have values from 0 to 365 (which I would like) :
Code:
egen couple=group(month day)
Many thanks for any help,
Comment