This seems like it should have a simple answer, but I can't find it. I am struggling to label the x-axis the way I would like in coefplot, and have spent some time with documentation and previous posts without finding a satisfactory answer.
I am using coefplot to plot mean healthcare visits (and CIs) in a population over time. This is complex survey data.
First, I calculate means by year:
Next, I use coefplot, using the rename option to rename my coefficients to display only the year (e.g. 1996, 1997, etc.), because otherwise they would be labelled "[email protected]" etc.
The resultant plot (below) labels every individual year on the x-axis. However, I want to only show some years, say every 2 or so years (e.g. 1996, 1998, 2000, 2002, etc.). It would be of course easy to do this with twoway using xlabel, but I want to use coefplot rather than say collapse (mean) followed by twoway because this allows me to plot CIs with complex survey data. Does anyone know if this is possible?
I am using coefplot to plot mean healthcare visits (and CIs) in a population over time. This is complex survey data.
First, I calculate means by year:
Code:
svy: mean providervisit, over(year) estimates store means
Code:
coefplot means, , vertical /// rename(^.+@([0-9]+)\..+$ = \1, regex) nooffsets /// recast(connected) cirecast(rcap) ytitle("Mean Annual Visits")
Comment