Dear all
I have this panel data and would like to draw graphs to summarise some variables.
I have enormous data. This is just the first 100 obs
The data has variables of time (quarter ), industry and lockdown of this industry by %.
First Q: How can I use the option towaway graph to get the percentage of lockdowns in each industry over the whole period (quarters)?
Second Q: I tried to use a bar graph with this command :
How can I customise the variable "industry1" to show some categories, not all ( I need to exclude the numbers industries 6,10,8,3,9,11,15,16,19, and 20 from my bar graph)?
Based on my data, can I produce a graph showing the time series % of lockdowns in each industry over quarters in one graph?
Could you help with that?
I have this panel data and would like to draw graphs to summarise some variables.
I have enormous data. This is just the first 100 obs
Code:
* Example generated by -dataex-. For more info, type help dataex clear input long(Lockdown industry1) byte quarter . 6 3 . 6 4 . 6 5 . 6 6 . 6 7 . 6 4 . 6 5 . 6 6 . 6 7 . 6 8 . 6 4 . 6 5 . 6 6 . 6 7 . 6 8 . 6 2 . 6 3 . 6 4 . 6 5 . 6 6 . 19 3 . 19 4 . 19 5 . 19 6 . 19 7 . 1 4 . 1 5 . 1 6 136 1 7 . 1 8 . 1 4 . 1 5 . 1 6 136 1 7 . 1 8 . 7 3 . 7 4 . 7 5 . 7 6 . 6 7 . 19 3 . 19 4 . 19 5 . 19 6 . 19 7 . 7 1 . 7 2 . 7 3 . 7 4 . 7 5 . 6 3 . 6 4 . 6 5 . 6 6 . 6 7 . 19 4 . 6 5 . 6 6 . 6 7 . 6 8 . 12 4 . 12 5 95 12 6 . 12 7 123 12 8 . 6 1 . 6 2 . 6 3 . 6 4 . 6 5 . 23 2 . 23 3 . 23 4 . 23 5 96 23 6 . 19 4 . 19 5 . 19 6 . 19 7 . 19 8 . 6 4 . 6 5 . 6 6 . 6 7 . 6 8 . 7 1 . 7 2 . 7 3 . 7 4 . 7 5 . 23 1 . 23 2 . 23 3 . 23 4 . 23 5 . 17 1 . 17 2 . 17 3 . 17 4 . 17 5 end label values Lockdown Lockdown label def Lockdown 95 "4.1%", modify label def Lockdown 96 "4.4%", modify label def Lockdown 123 "6.3%", modify label def Lockdown 136 "7.6%", modify label values industry1 industry1 label def industry1 1 "Accommodation And Food Service Activities", modify label def industry1 6 "Does not apply", modify label def industry1 7 "Education", modify label def industry1 12 "Human Health And Social Work Activities", modify label def industry1 17 "Other service activities", modify label def industry1 19 "Public admin and defence", modify label def industry1 23 "Wholesale And Retail Trade; Repair Of Motor Vehicles And Motorcycles", modify label values quarter quarter label def quarter 1 "Jan-Mar 2019", modify label def quarter 2 "April-June 2019", modify label def quarter 3 "July-Sep 2019", modify label def quarter 4 "Oct-Des 2019", modify label def quarter 5 "Jan-Mar 2020", modify label def quarter 6 "April-June 2020", modify label def quarter 7 "July-Sep 2020", modify label def quarter 8 "Oct-Des 2020", modify
The data has variables of time (quarter ), industry and lockdown of this industry by %.
First Q: How can I use the option towaway graph to get the percentage of lockdowns in each industry over the whole period (quarters)?
Second Q: I tried to use a bar graph with this command :
Code:
graph hbar (percent) Lockdown if quarter>=5, over ( industry1 )
Based on my data, can I produce a graph showing the time series % of lockdowns in each industry over quarters in one graph?
Could you help with that?
Comment