Dear Stata Users,
I have a panel dataset with 50 countries over 19 years. I wish to plot mean scores for some variables on an x-y plane. This would normally be done with xtline var if I was just interested line plots for individual units.
Let's assume my dependent variable is Y, and my explanatory variables are X and Z. I would like to plot the mean scores of X & Y, and Z & Y so as to establish the average behaviour of the data over time. Given that this is a panel data, I have had challenges in doing so. Please, kindly advise me on how to proceed.
Kind regards
NB. Please, this is my first time of using dataex, kindly notify me if my example is not correct.
I have a panel dataset with 50 countries over 19 years. I wish to plot mean scores for some variables on an x-y plane. This would normally be done with xtline var if I was just interested line plots for individual units.
Let's assume my dependent variable is Y, and my explanatory variables are X and Z. I would like to plot the mean scores of X & Y, and Z & Y so as to establish the average behaviour of the data over time. Given that this is a panel data, I have had challenges in doing so. Please, kindly advise me on how to proceed.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float fdistock int bits float economicfreedom byte democ 3378.873 29 56.8 1 4491.9785 33 57.3 1 5556.94 35 61 1 6194.82 38 57.7 1 7076.68 40 58.1 3 end
NB. Please, this is my first time of using dataex, kindly notify me if my example is not correct.
Comment