Announcement

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

  • More intutive way to plot three-way-interaction (continuous-by-continuous-by-continuous) ?

    Hello everyone,

    in our current project, we would like to answer the question, if we can use digital footprint data extracted from Facebook (network size) to measure the offline network size of the corresponding individual, or in other words to test convergent validity of the two social capital measures.The preliminary spearman correlation showed that both measures do not correlate with each other, suggesting that we cannot establish convergent validity. Subsequently, we conducted a regression analysis to further explore this relationship, which includes besides control variables also some two-way and one three-way interaction terms. Accounting for these different factors, the previous insignificant relationship between online network size (independent variable) and offline network size (dependent variable) turned into a significant one. In this regression model, the interaction terms were also significant.

    Subsequently, we used the “margins” command to calculate the predicted probability and saved the margins in a separate data set (predictions). I plotted the three-way-interaction (gender X age X Facebook network size) using the contour graph function (see attachment). To calculate the margins and to plot the contour graph, we used the tutorial that found on this page: https://www.stata.com/stata-news/news32-1/spotlight/. Broadly speaking, we see that it is possible to use the Facebook network size as a proxy for real-world network size, but this depends on the individual characteristics of the persons. For instance, it seems valid for some people like young females to use digital Facebook data to measure their offline network size, as rather larger (smaller) Facebook networks correspond to larger (smaller) real-world networks. However, for others it is not possible like older women. In that case, online network size and offline network size do not match.

    As our contour plot is very difficult to read, especially for people looking at it for the first time, we want to use another way to illustrate the correlation between online and offline network size as it varies along the individual characteristics. A figure that is somehow more intuitive for our purpose like a correlation heat map. For instance, it would be ideal to have a graphical representation that translates all the segments of the three-way-plot where (moderate convergence) validity was predicted into the color green and all the other segements where we could not establish a match between the network sizes in red. Do you have any idea, how I can achieve this? Is it even possible to use the margins, as saved in the predications data, set to create a correlation heat map? Or do you have any other idea how to facilitate the interpretation? Right now, I don’t have any clue how I can translate the findings of three-way-interaction into a handier graphical representation.

    Any help is greatly appreciated.

    Thank you in advance!

    Best,
    Michael


    Click image for larger version

Name:	Three-Way-InteractionUpdate.png
Views:	1
Size:	61.6 KB
ID:	1420099

  • #2
    You'll increase your chances of a helpful answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data using dataex. Also, try to simplify your question as much as possible.

    In my opinion, three way interactions with continuous variables are extremely difficult to interpret. You might try a three-dimensional table. You might look at Tufte's work on displaying data.

    Comment


    • #3
      I would experiment with plotting age (x-axis) vs. predicted probability of real-world network size (y-axis). Separate graphs for male and female (as you have). On each plot, four lines: for 2 facebook friends, for 4, for 6, and for 8. Something like this:

      Code:
      sysuse auto
      reg mpg c.weight##c.price##i.foreign
      margins foreign, at(price=(3000(2000)15000) weight=(2000 3000 5000))
      marginsplot,by(foreign) noci
      Click image for larger version

Name:	marg.png
Views:	1
Size:	82.1 KB
ID:	1420464

      Comment


      • #4
        Can someone please help me with twoway (contour) with a by() statement? Seems that's what must have been used to produce the plot by Michael. I want to compare two treatments. I want to see them side by side. Here's my problem though. In both plots, I want, say red, to represent 0.5. When I try using the by() option, the z-axis scale goes away. I'm ok doing them separately but I can't get the colors to represent the same contour level in each. Help?

        Comment

        Working...
        X