Announcement

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

  • Eclplot: Use labels from different variable

    The following code runs a FE regression, stores the result set using `parmest`. Recovers the original FE variable (`inc`), and adds some value labels to it.


    Code:
        sysuse voter, replace
        reg pfrac I.inc, nocons
        parmest, fast
        drop if t == .
        gen inc = substr(parm, 1, 1)
        destring inc, replace
    
        label define asd 1 `"<15"'
        label define asd 2 `"15-30"', add
        label define asd 3 `"30-50"', add
        label define asd 4 `"50-75"', add
        label define asd 5 `"57+"', add
        label values inc asd
    Let's take this code and resulting data set as given. I would now like to plot the fixed effects using eclplot. The following works without problem:

    Code:
        eclplot estimate min95 max95 inc
    The twist: I would like to change the ordering. In eclplot, the order and distance is given by a float variable. For demonstration purposes, let the order be given by

    Code:
        gen order = (-1)^inc + _n
    Now, I can do

    Code:
        eclplot estimate min95 max95 order
    but then I lose the labels of the variables.

    How can I plot the fixed effects with the order given by `order` and the labels coming from `inc`?


  • #2
    Would it be unreasonable for me to push this thread? :o

    Comment


    • #3
      No; you have bumped it once and that's our guideline: https://www.statalist.org/forums/help#adviceextras #1

      I'd email Roger Newson directly. Your question concerns parmest and eclplot (user-written programs whose provenance you are asked to explain), and he's the author of both.

      Comment

      Working...
      X