Announcement

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

  • coefplot and omissions due to colinearity

    I run a set of regressions for different countries and I then want to have a plot with the coefficients for each country. The code (a simplified version) I use is:

    Code:
    Code:
    coefplot SE2015_v2 || FR2015_v2, keep(2.partner_status) yline(0) bycoefs vert bylabels("SE" "FR")
    The problem is that sometimes the variable I am plotting is absent, mainly because it is omitted due to colinearity. In that case, coefplot draws the second country but labels it with the first label i.e. in this case it plots only the FR result but with an SE label.
    I'm looking for either of two options:
    - Plot both but with some sign of omission for the first country (e.g. plot nothing or a specified marker)
    - Plot only the coefficients which are present but with the correct labeling

    Interestingly enough, when the bycoefs version is dropped, the title of the then right box is FR, so it would seem to work in that case.

    An possibly obvious answer is to name the estimates file accordingly, but this feels to some degree like a cheat ...
    And the above "fix" doesn't work in the other case I'm interested in where I want to plot a single country over 10 years because a pure number is not allowed as a name for an estimate storage.

    Thank you for your help!
    Last edited by Simon Loewe; 07 Jun 2018, 10:06.
Working...
X