Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Showing reference category in graphs

    Dear all,
    I am struggling with the following issue.

    I want to show graphically the estimates of a regressio with -coefplot-.

    My script is the following:

    quietly reg isei_att i.titstud_pa i.titstud i.donna i.eta_classi_2 i.statusfam i.anno_oggi##c.anni_trasc_primo##i.area if italiano == 1
    estimates store domestic
    quietly reg isei_att i.titstud_pa i.titstud i.donna i.eta_classi_2 i.statusfam i.anno_oggi##c.anni_trasc_primo##i.area c.isei_prim##i.sett_acco_first if italiano == 1
    estimates store foreign
    coefplot (domestic, label(Effects on destination)) (foreign, label(Effects on career)) ///
    , title(Natives) keep(*.titstud_pa *.titstud *.donna *.eta_classi_2 *.statusfam ) ///
    xline(0) scheme(s1mono) xlabel(0(5)30)
    graph save 2.gph, replace

    What I do not succeed in fixing is the fact that the graphs does not show the reference category, and thus I can not put it in the y-labels (and the reader can not understand what is the base category).
    Do you any suggestion?

    Thanks a lot, best, g.

  • #2
    The output of help coefplot tells us that the baselevels option will include the base levels (reference categories, in other words). The following demonstrates the result of using the option.
    Code:
    graph drop _all
    sysuse auto, clear
    regress price length ib5.rep78 if foreign==0
    estimates store domestic
    regress price length ib5.rep78 if foreign==1
    estimates store foreign
    coefplot domestic foreign, drop(_cons) xline(0) name(nobase) nodraw
    coefplot domestic foreign, drop(_cons) xline(0) baselevels name(base) nodraw
    graph combine nobase base, cols(1)
    Click image for larger version

Name:	Graph.png
Views:	1
Size:	193.7 KB
ID:	1455399

    Comment


    • #3
      Dear WIlliam,
      thanks a lot, I did not find this option.

      Best, G,

      Comment

      Working...
      X