Announcement

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

  • How to draw a graph for inverted U-shaped relationships like the graph presented below?

    Click image for larger version

Name:	image_20245.png
Views:	2
Size:	176.8 KB
ID:	1580784 My regression is: Y1=α1FD1+α2FD1^2+α3Controls, and the results showed this is a bell-shaped relationship between FD1 and Y1, but I would like to output the graph like this one (the graph is from Sahay 2015), I don’t know how to make it.
    In the graph, if I choose “code”=CHN and USA to see where will they rest on the curve, how to make it? Can someone help me with the code?
    Here I attached my data for you to better understand. Thanks in advance.
    Attached Files

  • #2
    Not exactly the same, but - marginsplot- can provide something related.
    Best regards,

    Marcos

    Comment


    • #3
      Originally posted by Marcos Almeida View Post
      Not exactly the same, but - marginsplot- can provide something related.
      I would like to draw the graph with Y1 (in my data) as Y-axis , FD1 is the X-axis, and the country’s FD1 (“code” in my data=CHN and USA, which means choose several "code"'s FD1 value) value will rest on the curve. But I don't know the code in order to output this kind of graph.
      Last edited by He Hyuie; 08 Nov 2020, 08:47.

      Comment


      • #4
        When you are trying to test for an inverted U relationship you need to also do the U-test.

        First step
        encode code, gen(cody)

        xtset cody year

        gen FD2=FD1^2

        reg Y1 FD1 FD2 Rjgdpz1 Rjxfzc1 Zcx1 Zzxfzc1

        utest FD1 FD2

        Install the Utest from stata list. Go to help > stata command> type utest and download the ado files.

        he UTEST allows you to understand the point of inflection it is a required test to legitimize your inverted U relationship. Check this paper for more details
        Haans, R. F., C. Pieters and Z. L. He (2016). 'Thinking about U: Theorizing and testing U‐and inverted U‐shaped relationships in strategy research', Strategic Management Journal, 37, pp. 1177-1195.



        SECOND STEP

        It is a best practice to have the interactions in the equation with "##' rather than create a separate variable with quadratic notations. So anytime you want to do an interaction use the notation that I have used below. The answers are going to be the same but you do not need to generate an extra variable like FD2 and also you can specify the labels better. You can identify the margin values by useing 'sum variable'


        reg Y1 c.FD1##c.FD1 Rjgdpz1 Rjxfzc1 Zcx1 Zzxfzc1
        margins,at (FD1=(0 (.1) .7))
        marginsplot, noci xlabel(0 (0.1) 0.7)

        you may change the names of the countries by editing the graph plot.
        Hope this helps


        Comment


        • #5
          Originally posted by Smita Srivastava View Post
          When you are trying to test for an inverted U relationship you need to also do the U-test.

          First step
          encode code, gen(cody)

          xtset cody year

          gen FD2=FD1^2

          reg Y1 FD1 FD2 Rjgdpz1 Rjxfzc1 Zcx1 Zzxfzc1

          utest FD1 FD2

          Install the Utest from stata list. Go to help > stata command> type utest and download the ado files.

          he UTEST allows you to understand the point of inflection it is a required test to legitimize your inverted U relationship. Check this paper for more details
          Haans, R. F., C. Pieters and Z. L. He (2016). 'Thinking about U: Theorizing and testing U‐and inverted U‐shaped relationships in strategy research', Strategic Management Journal, 37, pp. 1177-1195.



          SECOND STEP

          It is a best practice to have the interactions in the equation with "##' rather than create a separate variable with quadratic notations. So anytime you want to do an interaction use the notation that I have used below. The answers are going to be the same but you do not need to generate an extra variable like FD2 and also you can specify the labels better. You can identify the margin values by useing 'sum variable'


          reg Y1 c.FD1##c.FD1 Rjgdpz1 Rjxfzc1 Zcx1 Zzxfzc1
          margins,at (FD1=(0 (.1) .7))
          marginsplot, noci xlabel(0 (0.1) 0.7)

          you may change the names of the countries by editing the graph plot.
          Hope this helps

          That's really helpful, thank you so much for helping me.
          But one thing I am still confused, could you tell me how to make "code"=CHN on the curve?

          Comment

          Working...
          X