Announcement

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

  • Presenting industry and year coefficient using a 3D graph

    Hi all

    I regress y on X1 and X2 per each industry and year group. My coefficient of interest is the coefficient on X2. I get a coefficient for each industry and year group.

    I want to create a 3D graph that shows the coefficient of interest for each industry every year (each industry's coefficient can be presented as a bar every year or alternatively use a 3D surface graph).

    How can I do these in Stata?

    Thanks

  • #2
    If a heat map or coefficient plot doesn't work well, my guess is that nothing will.

    Code:
    search heatmap
    search coefplot
    3D bar charts never seem to work well in practice (counter-examples?).

    A contour map or perspective view only makes sense if there is smooth variation and the two coordinates are suitable. That is plausible for year but what are your industry groups if not partially ordered?

    How many industry groups and years do you have?

    Why not just think of the coefficients as multiple time series, for which there are many ideas? e.g.
    https://www.statalist.org/forums/for...using-linkplot and its references.

    Comment


    • #3
      Thanks Nick
      The heat map does not seem to produce a relevant graph with my data that one can learn from.
      Regarding coefplot, if I understand correctly, it does not show me the variations of the coefficient across industries every year.

      My main interest is to show that the coefficient estimated for each industry and year group has variations (in the cross section and over time).
      I do have more than 50 industries every year.

      Do you have any suggestion to visualize this?

      In excel, one can have a 3D bar: each year all industries are presented in a 3D bar. Is there something similar in Stata?

      Comment


      • #4
        coefplot (Stata Journal)is a wonderful but very detailed command I have never used. (Some very experienced people might just have similar feelings about a few of mine.) I would be surprised if your problem was too complicated for it to be useful. I don't see any way to know what it does but study the documentation and play.

        The linked thread already has suggestions.

        What I would try if this were my problem is

        1. Think that ~50 time series is too many for comfort.

        2. Look for some way to split them into say 4 groups. The grouping might be substantive or it might be on the typical size of the coefficients. That is if you rank the industries somehow then the graphs might be of the [highest, 5th highest, 9th highest, ....]; [2nd highest, 6th highest, 10th highest, ...]; [3rd highest, ...]; [4th highest, ...] so that the spaghetti problem of overlap of series was reduced. 4 groups here is a little arbitrary but the practical point is that a 1 x 4 or 2 x 2 display might work as well as anything does.

        3. Make full advantage of by() to make production of small multiples as easy as possible.

        Comment

        Working...
        X