Hi, I have a problem of translating my categorical data into a line graph showing change over time. I have used the survey data, the answer is rather 0 for disagree and 1 for agree. I have one question but it is coded under different variables because they come from different years of survey, hence different datasets and I just merged the datasets together. Also the data goes by country. I attached the image, there are two other countries apart from Egypt. Q601_3 and Q601_31 are essentially the same question but recoded from different datasets hence different years, so I kept them under different variables. I do not understand how I can do a line graph over years using these two variables as basically one. I will attach below the graph that I made in excel. I tabulated the data and made a new table in excel exclusively with percentages to get this type of graph. At this point I wouldn't mind a bar graph as well, but I can't seem to combine both variables together.
graph hbar, by(COUNTRY) over(Q601_3)
graph hbar, by(COUNTRY) over(Q601_31)
This code worked, but it is not what I am looking for, unfortunately.
Also I do not understand how to potentially remove one of the responses for the graph (have just disagree or just agree).
I hope what I tried to explain was clear. Thank you! Also attached my merged dataset, I tried to combine the variables but the result turned out even more weird...
Related Posts with Line graph for categorical data
Change my observations values in discrete returns stockHi everyone. I'm a student and for my master's thesis, I have to analyse commodities shocks on a fir…
Creating a New VariableHello Statalist Folks, I have the following annual public survey data where children are being coun…
Generate a table of R-squared values using a loop of regressionsDear all, I am trying to generate a table of R-squared from multiple regressions. Code: * Example…
xttest3 overall significanceHi guys, I have panel data with 2Ts and 498N. I need to test the overall significance of my fixed ef…
Searching for variable string content into another string variableI have interviewed heads of households and asked their fathers' names. In some cases the father is a…
Subscribe to:
Post Comments (Atom)
0 Response to Line graph for categorical data
Post a Comment