Announcement

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

  • Visualising results from multiple regressions - problem with large coefficients (outlier)

    Dear all,

    I am currently struggeling with following problem: I want to display the average marginal effects (interaction term of continious & categorical variable) from a number of models in an accesible way. The problem I am facing is that the AME for one of the interactions is extremely large so that differences for the remaining categories cannot be seen anymore, as Stata adjusts the axis according the the largest AME. As I understood from earlier discussions Stata does not allow for a modification of the axis to constrain the range (https://www.statalist.org/forums/forum/general-stata-discussion/general/1382715-plotting-scales-with-marginsplot), so my thought was to leave that "problematic" interaction and the resulting AME out and discuss it in the text what appears acceptable in this case (few observations, large confidence intervalls).

    However, I fail to get removed only the AME of this specific interaction:
    What I did looks like follows (in a simplified version):
    Code:
    logit DV1 var0 i.var1##c.var2...
    
    eststo Model1: margins, dydx(var2) over(i.var1) post
    
    ....
    
    logit DV3 var0 i.var1##c.var2...
    eststo Model3: margins, dydx(var2) over(i.var1) post
    
    *I would like to remove the AME for one of the interactions from Model3 (_b[var2:3.var1]). Following the manual of coefplot (http://repec.sowi.unibe.ch/stata/coe...g-started.html) my thought was to use the following command:
    
    coefplot Model1 Model2 Model3, xline(0) drop(Model3:var2:3.var1)
    However, if I use this command, all AMEs obtained from Model 3 disappear - does anyone have an idea what might be wrong with my code and how (if at all) one could fix it?

    Thank you so much in advance.

    Best, Florian


    Last edited by Florian Wittmann; 06 Dec 2018, 08:46.

  • #2
    Have you tried using the -if(exp)- option to -coefplot-?

    Code:
     
     coefplot Model1 Model2 Model3, xline(0) if(@b<=Large Number)
    From the -coefplot- help file:

    if(exp) restricts the contents of the plot to coefficients satisfying exp. The option is useful when
    you want to select coefficients, e.g., based on their values, plot positions, or confidence
    limits. Within exp refer to internal temporary variables as explained in Accessing internal
    temporary variables below. For example, to include positive coefficients only, you could type
    if(@b>=0). Note that if() does not affect the rendition of the categorical axis (unless at is
    specified). That is, a complete categorical axis is created including labels for all collected
    coefficients, even for the ones that have been removed from the plot by if().

    Comment


    • #3
      Dear Giovanni,

      works perfectly - thank you so much!!

      Comment

      Working...
      X