Hi Statalilst

I want to replicate this graph: Array

I use STATA 15.1. I have a large pooled cross-sectional database of households in West Africa (n>50,000). The survey was done in four years (different randomly selected households in every year). I have data on household expenditure in the last two weeks (continuous variable) for every household. I also have a binary variable if the household is close or far from a specific natural resource that could increase their income.

I want to show the mean household expenditure, with standard errors, for households close (Binary=1) to this resource and households far from the resource (Binary=0) every year (like in the graph).

I do not want to use the
Code:
marginsplot
command (I do not want to show regression coefficients, only the means and distribution) and I also think the
Code:
serrbarr
will not work (I ideally want to connect the means and create a line graph)

Any ideas of a great code out there that could do the trick?

Thanks a lot!
Nettie