I am looking to create a line graph that shows the rate of the event described by the dichotomous variable vote_rd over time, in other words, the line graph is intended to show how many times vote_rd == 1 over time. For this, I believe that I require a variable for the number of times vote_rd == 1 but I am unsure as to how to make this variable. There are a number of countries in the dataset as well, from which I only intend to use "DK" "AT" "FI" "FR" "SE" and "NL".
Example of the data:
Example of the data:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float vote_rd double year str2 cntry 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 1 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 1 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 1 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 1 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 1 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 1 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 1 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 1 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 1 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" 0 2002 "DK" end
Comment