Hi all,
I am performing a logistic regression analysis using the xtlogit command. I am trying to plot the results using coefplot on Stata 15.0, comparing the results of two different models, for two different age groups. The problem is some of the confidence intervals are too large, making it difficult to compare all the results, so I am trying to reduce the x axis scale and trim the confidence intervals, in the same way as can easily be achieved in forestplot using “force”: forestplot (xlab (0 5 10, force). I would also like the large CI to have an arrow at the end indicating they are extended beyond the x axis scale.

I have tried various combinations of pstyle and ciopts, and none worked, for example:

This works trimming my x axis and CI, but
- fails to put an arrow at the end of them, and
- creates a new third column that I do not know what it is.
Any help would be appreciated! Thanking you in advance!
I am performing a logistic regression analysis using the xtlogit command. I am trying to plot the results using coefplot on Stata 15.0, comparing the results of two different models, for two different age groups. The problem is some of the confidence intervals are too large, making it difficult to compare all the results, so I am trying to reduce the x axis scale and trim the confidence intervals, in the same way as can easily be achieved in forestplot using “force”: forestplot (xlab (0 5 10, force). I would also like the large CI to have an arrow at the end indicating they are extended beyond the x axis scale.
Code:
coefplot A, bylabel(18-49 years) || B, bylabel(50-64 years) ||, eform
I have tried various combinations of pstyle and ciopts, and none worked, for example:
Code:
coefplot A, bylabel(18-49 years) || B, bylabel(50-64 years) || /// (., pstyle(p1) if(@ll>0|@ul<8) ciopts(recast(rcap) lcolor(gs1))) (., pstyle(p1) if(@ul>=8) ciopts(recast(pcarrow) lcolor(gs1))) /// (., pstyle(p1) if(@ul>=8) ciopts(recast(pcbarrow) lcolor(gs1))), /// eform base drop(_cons) byopts(compact rows(1)) /// nooffsets transform(*= min(max(@,0),8))
This works trimming my x axis and CI, but
- fails to put an arrow at the end of them, and
- creates a new third column that I do not know what it is.
Any help would be appreciated! Thanking you in advance!
Comment