Dear readers
I am currently trying to plot a curvilinear relationship between two behaviors (certain domestic and international behaviors).
I use a heckman method for my empirical analysis, given those firms that choose to select to go international may qualitatively differ from those that do not.
The codes I use are the following:
Furthermore, I test interaction effects with some domestic country level variables, such as:
The results show that there exists a curvilinear relationship between the the variables usratio2_w and intratio2_w as shown below
I did not include the results for the interaction, because it would make the post too lengthy.
My ultimate goal is to plot a graph of the inverted-U shaped findings, and it would be ideal if I could do this in one graph with separate lines showing the original relationship and the interacted relationships.
I have tried many ways including the margins command but I keep hitting the wall due to my inexperience in Stata (I'm currently using Stata 16, if it helps).
In addition, I'm not sure if the usage of the Heckman method should somehow influence how I should plot the graphs.
Thank you very much in advance.
Your help is greatly appreciated.
I am currently trying to plot a curvilinear relationship between two behaviors (certain domestic and international behaviors).
I use a heckman method for my empirical analysis, given those firms that choose to select to go international may qualitatively differ from those that do not.
The codes I use are the following:
Code:
heckman intratio2_w c.L1.usratio2_w##c.L1.usratio2_w L1.intratio2_w L1.annualreturn5_w L1.regul2 $key_control i.fyear, select(intl = L1.intratio2_w L1.siznumfxhedge_w $key_control i.fyear) twostep
Code:
heckman intratio2_w c.L1.usratio2_w##c.L1.usratio2_w##c.L1.annualreturn5_w L1.regul2 L1.intratio2_w $key_control i.fyear, select(intl = L1.intratio2_w L1.siznumfxhedge_w $key_control i.fyear) twostep
Code:
heckman intratio2_w c.L1.usratio2_w##c.L1.usratio2_w L1.intratio2_w L1.annualreturn5_w L1.regul2 $key_ > control i.fyear, select(intl = L1.intratio2_w L1.siznumfxhedge_w $key_control i.fyear) twostep note: 2015.fyear omitted because of collinearity Heckman selection model -- two-step estimates Number of obs = 1,398 (regression model with sample selection) Selected = 366 Nonselected = 1,032 Wald chi2(29) = 280.91 Prob > chi2 = 0.0000 --------------------------------------------------------------------------------------------- | Coef. Std. Err. z P>|z| [95% Conf. Interval] ----------------------------+---------------------------------------------------------------- intratio2_w | usratio2_w | L1. | .2720963 .1278018 2.13 0.033 .0216094 .5225832 | cL.usratio2_w#cL.usratio2_w | -.288744 .1455788 -1.98 0.047 -.5740733 -.0034147 | intratio2_w | L1. | .5211206 .0653576 7.97 0.000 .393022 .6492192 | annualreturn5_w | L1. | 973.2645 1098.729 0.89 0.376 -1180.205 3126.734 | regul2 | L1. | -.017766 .3312482 -0.05 0.957 -.6670005 .6314685 | ln_firmage_w | L1. | -.0135679 .0209061 -0.65 0.516 -.0545431 .0274074 | ln_at_w | L1. | -.0141518 .0068556 -2.06 0.039 -.0275885 -.0007151 | tobinq_w | L1. | .0318719 .0118094 2.70 0.007 .008726 .0550179 | slack_w | L1. | .1102677 .0534081 2.06 0.039 .0055896 .2149457 | constraint_w | L1. | .0030768 .0016573 1.86 0.063 -.0001714 .0063251 | entropy_w | L1. | -.0045865 .0376501 -0.12 0.903 -.0783793 .0692064 | ln_tenure_y_w | L1. | -.0059873 .0137784 -0.43 0.664 -.0329926 .0210179 | isfounder_w | L1. | .0100584 .0269353 0.37 0.709 -.0427339 .0628507 | fyear | 1999 | -.4294316 .3530869 -1.22 0.224 -1.121469 .262606 2000 | -.6200813 .6436681 -0.96 0.335 -1.881648 .641485 2001 | -.2670098 .2043539 -1.31 0.191 -.667536 .1335164 2002 | -.1345528 .1770313 -0.76 0.447 -.4815277 .2124222 2003 | -.0704241 .0874952 -0.80 0.421 -.2419116 .1010634 2004 | -.1022615 .055527 -1.84 0.066 -.2110925 .0065696 2005 | -.1420184 .1794518 -0.79 0.429 -.4937375 .2097007 2006 | -.1305091 .1355871 -0.96 0.336 -.3962549 .1352367 2007 | -.0117517 .0917541 -0.13 0.898 -.1915866 .1680831 2008 | .0544525 .0590393 0.92 0.356 -.0612624 .1701674 2009 | -.2999764 .3494616 -0.86 0.391 -.9849084 .3849557 2010 | -.1411477 .1266843 -1.11 0.265 -.3894443 .1071488 2011 | .0914906 .0591742 1.55 0.122 -.0244887 .2074698 2012 | .003273 .0605795 0.05 0.957 -.1154607 .1220067 2013 | -.1230197 .1748139 -0.70 0.482 -.4656486 .2196093 2014 | .0185745 .067795 0.27 0.784 -.1143012 .1514502 2015 | 0 (omitted) | _cons | -.1252836 .4639153 -0.27 0.787 -1.034541 .7839736 ----------------------------+---------------------------------------------------------------- intl | intratio2_w | L1. | 4.834204 .3503738 13.80 0.000 4.147484 5.520924 | siznumfxhedge_w | L1. | .2002537 .0511131 3.92 0.000 .1000739 .3004336 | ln_firmage_w | L1. | .4141059 .0889329 4.66 0.000 .2398006 .5884112 | ln_at_w | L1. | .102695 .0317659 3.23 0.001 .0404351 .164955 | tobinq_w | L1. | .0066423 .0559791 0.12 0.906 -.1030748 .1163593 | slack_w | L1. | .1194309 .2371617 0.50 0.615 -.3453975 .5842593 | constraint_w | L1. | -.0130778 .0087029 -1.50 0.133 -.0301351 .0039795 | entropy_w | L1. | 2.104377 .3152062 6.68 0.000 1.486584 2.72217 | ln_tenure_y_w | L1. | -.2524318 .0708367 -3.56 0.000 -.3912692 -.1135944 | isfounder_w | L1. | .151132 .135638 1.11 0.265 -.1147136 .4169775 | fyear | 1999 | .023452 .385552 0.06 0.951 -.7322161 .7791201 2000 | .0603861 .3656494 0.17 0.869 -.6562735 .7770457 2001 | .4129523 .3549258 1.16 0.245 -.2826895 1.108594 2002 | .5593425 .344546 1.62 0.104 -.1159553 1.23464 2003 | -.2778826 .3745286 -0.74 0.458 -1.011945 .4561799 2004 | .0300237 .3712949 0.08 0.936 -.6977008 .7577483 2005 | .1178042 .3588525 0.33 0.743 -.5855339 .8211422 2006 | -.0076683 .364267 -0.02 0.983 -.7216186 .7062819 2007 | -.3606981 .3688887 -0.98 0.328 -1.083707 .3623105 2008 | -.0865687 .3575869 -0.24 0.809 -.7874262 .6142887 2009 | -.1584412 .3629916 -0.44 0.662 -.8698916 .5530093 2010 | -.0909428 .3651831 -0.25 0.803 -.8066886 .6248029 2011 | -.4961573 .3778998 -1.31 0.189 -1.236827 .2445126 2012 | -.0677228 .3594602 -0.19 0.851 -.7722519 .6368063 2013 | -.5144314 .3728328 -1.38 0.168 -1.24517 .2163074 2014 | -.5559093 .3892982 -1.43 0.153 -1.31892 .2071012 2015 | -.6956374 .4077328 -1.71 0.088 -1.494779 .1035043 2016 | -5.076546 . . . . . | _cons | -2.824338 .4026681 -7.01 0.000 -3.613553 -2.035123 ----------------------------+---------------------------------------------------------------- /mills | lambda | .0133232 .0364566 0.37 0.715 -.0581304 .0847768 ----------------------------+---------------------------------------------------------------- rho | 0.06670 sigma | .19974236 --------------------------------------------------------------------------------------------- . end of do-file
My ultimate goal is to plot a graph of the inverted-U shaped findings, and it would be ideal if I could do this in one graph with separate lines showing the original relationship and the interacted relationships.
I have tried many ways including the margins command but I keep hitting the wall due to my inexperience in Stata (I'm currently using Stata 16, if it helps).
In addition, I'm not sure if the usage of the Heckman method should somehow influence how I should plot the graphs.
Thank you very much in advance.
Your help is greatly appreciated.