Ronald, you could have, perhaps, been a little more helpful to us than just looking for a working solution. We can't help you unless you help us. Please do read the FAQ section where it says, you are expected to clearly state the nature of your problem, let us know 'exactly' what you have done and 'exactly' what you have received as output. Up, people spent time on changing the ID variable of your dataset, and you informed us that it was a waste of time because of you deliberately and unnecessarily deviated us from the original data type. It would be useful to learn that not necessarily everyone looks at the problem domain from the same aspect therefore, clearly stating the nature of the problem helps everyone and you increase the chance of getting an efficient reply. Now, as I said before, I am not sure what analysis you are trying to undertake. From your post#1: if you are
trying to plot the group (male/female) mean by year with their 95% CI you need to bring the group means in one column (example below). Have a look at the graph below from some mock data, if that is what you want:
[ATTACH=CONFIG]nArray[/ATTACH]:
You have a panel dataset and many more statistical modelling possibilities are there. But first of all, you need to let us know what you want.
Best,
trying to plot the group (male/female) mean by year with their 95% CI you need to bring the group means in one column (example below). Have a look at the graph below from some mock data, if that is what you want:
Code:
replace mean_male=mean_female if mean_male==. /*The easiest way to get the graph is to install ''lgraph" from ssc". Type: ssc install lgraph */ lgraph mean_male year gender /*this will give you the graph below*/
[ATTACH=CONFIG]nArray[/ATTACH]:
Code:
+-------------------------------+ | id year gender mean_mf | |-------------------------------| 1. | 1 2012 Male 1.907674 | 2. | 1 2013 Male 6.505144 | 3. | 1 2014 Male 3.187489 | |-------------------------------| 28. | 10 2012 Female 1.801927 | 29. | 10 2013 Female 5.023422 | 30. | 10 2014 Female 5.370842 | +-------------------------------+
Best,
Comment