Hello Stata people ;
I'm working with this data:
It is about the evolution of the confidence of a population by month, from Januare 2005 to October 2024. My goal is to transform the "mois" variable in a way that I could preserve the month and the year in one variable, but to have it set in a way to apply a tsset command on it and draw a tsling too. I wanna see the name of the month and the year on the final graph (if that's possible too).
Any help please? With thanks!
I'm working with this data:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str8 mois float confiancedesmnages "janv.-05" 47.4 "févr.-05" 47.6 "mars-05" 45.2 "avr.-05" 47.4 "mai-05" 48.3 "juin-05" 46.6 "juil.-05" 48.1 "août-05" 48.4 "sept.-05" 45.5 "oct.-05" 47.9 "nov.-05" 48.2 "déc.-05" 46.5 "janv.-06" 49.5 "févr.-06" 49.8 "mars-06" 47.9 "avr.-06" 50 "mai-06" 49.8 "juin-06" 47.2 "juil.-06" 48.6 "août-06" 47.6 "sept.-06" 46.3 "oct.-06" 48.2 "nov.-06" 48.7 "déc.-06" 45.9 "janv.-07" 48.1 "févr.-07" 48.4 "mars-07" 46.8 "avr.-07" 47.4 "mai-07" 47.3 "juin-07" 45 "juil.-07" 44.4 "août-07" 44 "sept.-07" 44.1 "oct.-07" 42.8 "nov.-07" 39.8 "déc.-07" 38 "janv.-08" 37.5 "févr.-08" 36.1 "mars-08" 36.7 "avr.-08" 35.2 "mai-08" 33.9 "juin-08" 32.6 "juil.-08" 31.4 "août-08" 30.1 "sept.-08" 31.4 "oct.-08" 29.4 "nov.-08" 28.4 "déc.-08" 26.2 "janv.-09" 26.4 "févr.-09" 26.7 "mars-09" 28.9 "avr.-09" 32.4 "mai-09" 35.7 "juin-09" 37.6 "juil.-09" 39.4 "août-09" 40.1 "sept.-09" 40.5 "oct.-09" 40.5 "nov.-09" 39.5 "déc.-09" 37.6 "janv.-10" 39 "févr.-10" 39.8 "mars-10" 40.9 "avr.-10" 42 "mai-10" 42.8 "juin-10" 43.5 "juil.-10" 43.3 "août-10" 42.4 "sept.-10" 41.2 "oct.-10" 40.9 "nov.-10" 40.4 "déc.-10" 40.1 "janv.-11" 41.1 "févr.-11" 40.6 "mars-11" 38.3 "avr.-11" 33.4 "mai-11" 34.8 "juin-11" 36.2 "juil.-11" 37.7 "août-11" 37.4 "sept.-11" 38.5 "oct.-11" 38.6 "nov.-11" 37.5 "déc.-11" 38.1 "janv.-12" 39.6 "févr.-12" 39.1 "mars-12" 40.1 "avr.-12" 40.1 "mai-12" 40.7 "juin-12" 40.8 "juil.-12" 40.5 "août-12" 40.6 "sept.-12" 40.4 "oct.-12" 39.7 "nov.-12" 39 "déc.-12" 39 "janv.-13" 43.1 "févr.-13" 44.2 "mars-13" 45 "avr.-13" 44.5 end
Any help please? With thanks!
Comment