Announcement

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

  • Stata command for three interactions variables.

    Dear Statalist member,

    Good day everyone. I am using Stata 14.1. Here is the sample of my data. I am regressing sustainability reporting score (the y) as a function of stakeholder characteristics. Stakeholder have three characteristics; pcomm, lcomm, ucomm. Comm is stand for one of the stakeholder groups in my study. I have eight stakeholder groups and I run regression model separately for each of them.
    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input float y byte(pcomm lcomm ucomm)
      3.70833 3 2 0
        3.875 3 2 1
      4.07521 2 2 0
     3.583333 0 0 0
     3.583333 2 0 0
     3.458333 2 1 0
    1.5833334 1 0 0
    1.5833334 1 0 0
    1.6458334 1 0 0
       1.9375 0 1 0
       2.0625 0 1 0
      3.04816 0 1 0
     3.291667 0 0 0
     3.458333 1 1 0
     3.753788 0 0 0
         2.25 0 0 0
    3.0492425 0 0 0
     3.257576 3 0 0
            3 1 0 0
    2.0416667 1 0 0
     5.017045 3 2 0
       2.1875 2 1 0
       2.1875 3 1 1
       2.1875 3 1 1
         3.25 1 0 0
     2.416667 1 0 0
    1.9791666 2 0 0
    2.2916667 2 1 0
    2.2916667 0 0 0
     2.666667 3 1 0
    1.7291666 2 1 0
    1.5833334 0 0 0
          1.5 0 0 0
    2.2083333 2 1 0
     2.708333 2 1 0
    3.2367425 2 1 0
        3.625 0 0 0
    3.1742425 3 1 0
     3.666667 1 1 0
     2.729167 0 0 0
     2.395833 0 0 0
       2.4375 0 0 0
     3.291667 1 1 1
       3.4375 1 1 0
     3.090909 1 0 0
     2.520833 0 1 0
    2.0416667 0 1 0
    1.9791666 0 1 0
    1.8541666 2 1 0
       2.0625 2 1 0
     2.278409 0 0 0
     2.583333 3 1 0
     2.479167 0 1 0
     2.916667 3 1 0
       2.8125 1 2 0
     2.973485 1 1 0
     3.132576 0 0 0
    2.0833333 3 1 0
     2.833333 3 1 0
    3.8733766 2 1 0
    1.5833334 0 1 0
    2.3541667 2 1 0
     2.479167 2 1 0
     3.541667 3 1 0
          3.5 3 1 0
     3.715909 2 1 1
    1.2291666 2 1 0
    1.2291666 2 1 0
    1.2708334 2 1 0
        3.375 3 2 1
     3.458333 2 1 0
     4.378247 3 1 1
     2.416667 3 1 1
    2.2916667 3 2 0
     2.666667 3 2 0
     3.257576 2 1 0
     2.666667 2 1 0
     2.416667 2 1 0
     2.458333 0 0 0
     3.208333 3 2 0
    2.8511906 3 1 0
     2.916667 1 1 0
     2.916667 1 1 0
    2.2916667 1 1 0
    3.6079545 2 1 0
       2.0625 2 0 0
      3.53355 1 1 0
        1.875 3 1 0
         2.75 3 1 0
     2.916667 2 1 0
    1.8238636 1 1 0
    2.0738637 1 1 0
    1.8238636 1 1 0
     2.458333 0 1 0
     2.458333 0 1 0
     3.104167 3 1 0
    3.5189395 1 1 0
    3.4564395 1 1 0
     3.874459 2 2 0
     3.604167 2 1 0
    end
    According to theory, the y is also associated with cumulative stakeholder characteristics. Meaning to say that the theory propose that having more than one characteristics can have an effect on y. At first I run the following command,
    Code:
    xtreg y pcomm lcomm ucomm c.pcomm#c.lcomm#c.ucomm, fe vce (robust)
    end
    But, I could not find the way to interpret the result. Instead, I find many discussion refering to three factorial effects. Something like this command.
    Code:
    xtreg y pcomm##lcomm##ucomm, fe vce (robust)
    end
    Now, I am confuse which of the two is the right command that should be use to answer the theory.

    I also not sure whether the interaction variable should be a factor variable or continous variable. Thanks you for your time.

  • #2
    Your first code, using # is mis-specified because you have a three level interaction term but fail to include the two-level sub-interactions. When you use ##, as in the second code, Stata automatically generates those, which is the right way to go.

    There is another difference between the two codes, and I cannot tell you which is correct in this respect: the first code specifies pcomm, lcomm, and ucomm as continuous variables, whereas the second code (implicitly) specifies them as discrete variables. In the example data, these variables look like they might be discrete, but I don't even know what they are. And since you took the trouble to add c. in the first code, it suggests to me that you may think of them as continuous. Anyway, if they are continuous, you need to put c. in front of each of those in the interaction. If they are discrete, leave it as is.

    Comment


    • #3
      Dear Prof Clyde,

      Thanks for your reply.

      Your first code, using # is mis-specified because you have a three level interaction term but fail to include the two-level sub-interactions. When you use ##, as in the second code, Stata automatically generates those, which is the right way to go.
      What I am thinking is that since I am only interested to know if having more than one stakeholder's characteristics has an effect on the y, and not intent to know every possible two level interactions, so that is the reasons I am using # instead of ##. Is this right? (sorry to ask again)

      There is another difference between the two codes, and I cannot tell you which is correct in this respect: the first code specifies pcomm, lcomm, and ucomm as continuous variables, whereas the second code (implicitly) specifies them as discrete variables. In the example data, these variables look like they might be discrete, but I don't even know what they are. And since you took the trouble to add c. in the first code, it suggests to me that you may think of them as continuous. Anyway, if they are continuous, you need to put c. in front of each of those in the interaction. If they are discrete, leave it as is.
      pcomm lcomm and ucomm is an ordinal variable. For example, pcomm is measuring power for community stakeholder. pcomm range from 0 (no power) to 3(high power). Each of lcomm and ucomm range from 0 to 2. I can also add them all and create a new variable as the total of community characteristics.

      Comment


      • #4
        What I am thinking is that since I am only interested to know if having more than one stakeholder's characteristics has an effect on the y, and not intent to know every possible two level interactions, so that is the reasons I am using # instead of ##. Is this right? (sorry to ask again)

        No, it's not right because without the two-way interactions in the model, the coefficient you get for the three-way interaction term is wrong. If you are not interested in the two-way interactions, you can ignore them when you read the results, but they have to be in the model for the results to be correct.

        pcomm lcomm and ucomm is an ordinal variable. For example, pcomm is measuring power for community stakeholder. pcomm range from 0 (no power) to 3(high power). Each of lcomm and ucomm range from 0 to 2. I can also add them all and create a new variable as the total of community characteristics.
        Well, ordinal variables are an in-between case and sometimes it is best to treat them as discrete, and sometimes it is best to treat them as continuous. The fact that you are comdfortable with adding them, however, tells me that in your context, they are suitable for treatment as continuous variables.

        Comment


        • #5
          Clyde Schechter I almost make a mistake to report the output by using # notation.

          Following to that, I have re do the analysis and I have more questions to ask.

          Code:
          *36 RE IM
          . xtreg $y1 $vm $c1 i.year, fe vce(robust)
          note: umedia omitted because of collinearity
          note: c.pmedia#c.umedia omitted because of collinearity
          note: c.lmedia#c.umedia omitted because of collinearity
          note: c.pmedia#c.lmedia#c.umedia omitted because of collinearity
          
          Fixed-effects (within) regression               Number of obs     =    420
          Group variable: code                            Number of groups  =    140
          
          R-sq:                                           Obs per group:
          within  = 0.1922                                         min =    3
          between = 0.0138                                         avg =    3.0
          overall = 0.0349                                         max =    3
          
          F(10,139)         =    .
          corr(u_i, Xb)  = -0.2078                        Prob > F          =    .
          
          (Std. Err. adjusted for    140 clusters in code)
              
          Robust
          y       Coef.   Std. Err.      t    P>t    [95% Conf. Interval]
              
          pmedia     .392848   .0274293    14.32   0.000    .3386154    .4470806
          lmedia    .3601767   .1739469     2.07   0.040    .0162527    .7041007
                                     
          c.pmedia#c.lmedia   -.5486784   .1248505    -4.39   0.000    -.7955301   -.3018267
                                     
          umedia           0  (omitted)
                                     
          c.pmedia#c.umedia           0  (omitted)
                                     
          c.lmedia#c.umedia           0  (omitted)
                                     
          c.pmedia#c.lmedia#c.umedia           0  (omitted)
                                     
          winroe    -.797687   .6948579    -1.15   0.253    -2.171545    .5761706
          logtobin   -.1415382   .1789948    -0.79   0.430    -.4954428    .2123663
          logta   -.0415553   .1608158    -0.26   0.796    -.3595167    .2764061
          logdebt      .07476   .1010038     0.74   0.460    -.1249425    .2744624
          logage    -.411453   .2923867    -1.41   0.162    -.9895533    .1666474
          gbi    .0574884   .0444385     1.29   0.198    -.0303744    .1453512
                                     
          year 
          2016     .1125397   .0436759     2.58   0.011    .0261847    .1988947
          2017     .2847687    .073081     3.90   0.000    .1402746    .4292628
                                     
          _cons    4.555785   2.339397     1.95   0.054    -.0696186    9.181189
              
          sigma_u   .70615307
          sigma_e    .3707898
          rho   .78387513   (fraction of variance due to    u_i)
          First is on the interpretation of this result. Can you tell me whether I understand the result correctly or not.

          the equation of pmedia = 0.39- 0.54*lmedia

          So, my interpretation is, the pmedia is positively associated with the y (denotes with 0.39). But the main effect of pmedia on the y is decrease when the lmedia is decrease. (I get from this 0.39-0.54=-0.15)

          Comment


          • #6
            I also run margins command as below.

            Code:
            margins, at(pmedia=(0 1 2 3) lmedia=(0 1 2 3)) asbalanced plot
            
            Predictive margins                              Number of obs     =    420
            Model VCE    : Robust
            
            Expression   : Linear prediction, predict()
            
            1._at        : pmedia          =           0
            lmedia          =           0
            year                          (asbalanced)
            
            2._at        : pmedia          =           0
            lmedia          =           1
            year                          (asbalanced)
            
            3._at        : pmedia          =           0
            lmedia          =           2
            year                          (asbalanced)
            
            4._at        : pmedia          =           0
            lmedia          =           3
            year                          (asbalanced)
            
            5._at        : pmedia          =           1
            lmedia          =           0
            year                          (asbalanced)
            
            6._at        : pmedia          =           1
            lmedia          =           1
            year                          (asbalanced)
            
            7._at        : pmedia          =           1
            lmedia          =           2
            year                          (asbalanced)
            
            8._at        : pmedia          =           1
            lmedia          =           3
            year                          (asbalanced)
            
            9._at        : pmedia          =           2
            lmedia          =           0
            year                          (asbalanced)
            
            10._at       : pmedia          =           2
            lmedia          =           1
            year                          (asbalanced)
            
            11._at       : pmedia          =           2
            lmedia          =           2
            year                          (asbalanced)
            
            12._at       : pmedia          =           2
            lmedia          =           3
            year                          (asbalanced)
            
            13._at       : pmedia          =           3
            lmedia          =           0
            year                          (asbalanced)
            
            14._at       : pmedia          =           3
            lmedia          =           1
            year                          (asbalanced)
            
            15._at       : pmedia          =           3
            lmedia          =           2
            year                          (asbalanced)
            
            16._at       : pmedia          =           3
            lmedia          =           3
            year                          (asbalanced)
            
                
            Delta-method
            Margin   Std. Err.      z    P>z     [95% Conf.    Interval]
                
            _at 
            1     2.827413   .0174633   161.91   0.000     2.793185    2.86164
            2     3.187589   .1565239    20.36   0.000     2.880808    3.49437
            3     3.547766   .3304687    10.74   0.000     2.900059    4.195473
            4     3.907943    .504415     7.75   0.000     2.919308    4.896578
            5     3.220261    .028978   111.13   0.000     3.163465    3.277056
            6     3.031759    .104156    29.11   0.000     2.827617    3.235901
            7     2.843257   .2189989    12.98   0.000     2.414027    3.272487
            8     2.654756   .3349266     7.93   0.000     1.998312    3.3112
            9     3.613109   .0536583    67.34   0.000      3.50794    3.718277
            10     2.875929   .1566803    18.36   0.000     2.568841    3.183016
            11     2.138748   .3197816     6.69   0.000     1.511988    2.765509
            12     1.401568   .4858127     2.88   0.004      .449393    2.353744
            13     4.005957   .0801464    49.98   0.000     3.848873    4.163041
            14     2.720098   .2561258    10.62   0.000     2.218101    3.222095
            15      1.43424   .5216406     2.75   0.006     .4118429    2.456636
            16     .1483813   .7911694     0.19   0.851    -1.402282    1.699045

            Comment


            • #7
              The margins output you show in #6 is a table of the expected values of your outcome variable (y) at the corresponding values of pmedia and lmedia. You might also get a stronger sense of what is going on by following that up with the -marginsplot- command which will better enable you to see how y varies with each of those variables, and also how the relationship each of those variables has to y depends on the value of the other.

              As far as interpreting the regression output, you have made some rounding errors, and I am not certain of your meaning, so let me just explain it here:

              When lmedia = 0, the slope of the y:pmedia relationship is 0.39. For general values of lmedia, the slope of the y:pmedia relationship is 0.39 - 0.55*lmedia. So at lmedia = 0, the relationship between pmedia and y is positive, but as lmedia increases, that relationship becomes less positive, and it will turn negative if lmedia becomes large enough. (Whether lmedia achieves large enough values in your actual data to lead to a negative y:pmedia relationship I cannot tell. It will happen when lmedia > 0.39/0.55, which is 0.71. I don't know if you have values of lmedia that large or not.)

              Comment


              • #8
                Originally posted by Clyde Schechter View Post
                to see how y varies with each of those variables, and also how the relationship each of those variables has to y depends on the value of the other.
                Click image for larger version

Name:	graph1.png
Views:	2
Size:	13.3 KB
ID:	1533156


                Prof Clyde Schechter,

                In the above marginsplot, I think I see when pmedia and lmedia increases, the y is getting lower. (the point after the intersection). When lmedia increases and pmedia=0, the y is increases.(the point before the intersection). In term of pmedia effect when lmedia=0 , the y is 2.0++. As the pmedia increase and at the point lmedia=0 the slope of lmedia is getting positive . In short, main effect of regressors has a better effect on y rather than having both at the same time. Do I miss anything important frm the picture?


                Originally posted by Clyde Schechter View Post
                I don't know if you have values of lmedia that large or not.)
                The maximum lmedia is 2.

                Originally posted by Clyde Schechter View Post

                When lmedia = 0, the slope of the y:pmedia relationship is 0.39. For general values of lmedia, the slope of the y:pmedia relationship is 0.39 - 0.55*lmedia. So at lmedia = 0, the relationship between pmedia and y is positive, but as lmedia increases, that relationship becomes less positive, and it will turn negative if lmedia becomes large enough. (Whether lmedia achieves large enough values in your actual data to lead to a negative y:pmedia relationship I cannot tell. It will happen when lmedia > 0.39/0.55, which is 0.71. I don't know if you have values of lmedia that large or not.)
                Thank you so much for helping me out in getting the right interpretation.
                Attached Files

                Comment


                • #9
                  Yes, I think you have a good understanding of the graph (and, so, of the model).

                  I do not understand what you mean by "
                  In short, main effect of regressors has a better effect on y rather than having both at the same time.
                  " What does "better" mean here?

                  Comment


                  • #10
                    Prof Clyde Schechter,

                    I mean the sign of the main effect is positive just like what I expect. However, the interaction effect is negative, in which it is not what I am expecting.

                    Looking further the regression result in #5, I notice that the three-way interaction is omitted from the model. I think this shows that there is no such interaction at that level. Am I right? What I should say in my report about ‘omitted because of collinearity’?

                    FYI, I have eight models. One model for each stakeholder groups. Media is one categories of stakeholders. umedia is all zeroes-0 in my dataset for this model.

                    Thank you very much.

                    Comment


                    • #11
                      Looking further the regression result in #5, I notice that the three-way interaction is omitted from the model. I think this shows that there is no such interaction at that level. Am I right? What I should say in my report about ‘omitted because of collinearity’?

                      Well, that three-way interaction is omtited because umedia (and, consequently, all interaction terms including umedia) is omitted due to colinearity. In your FYI, you notice that umedia is always zero, which explains this. So the real ponit is not that there is no three way interaction. The real point is that your data are uninformative about umedia at any level.

                      I mean the sign of the main effect is positive just like what I expect. However, the interaction effect is negative, in which it is not what I am expecting.

                      Well, obviously, I can't comment on whether you are right to expect the interaction term to have a positive coefficient--I don't even know what these variables are. And if I did, they are probably in a content area I know little or nothing about. You should check with others in your disciplines whether that expectation is correct. If there is consensus in your field that this interaction should be positive, I will say that you should look to problems with your data for the explanation. How was your sample obtained? Is it adequately representative? Did anything happen during data management that excluded a bunch of observations and resulted in a biased sample. For example, since umedia = 0 in your entire sample, it may well be that among those with umedia = 0, the interaction between pmedia and lmedia is different from what it would be in a less restrictive sample: maybe when umedia != 0 (uninstantiated in your data) the pmedia#lmedia interaction would be positive; (And if you had adequate umedia != 0 data, the umedia#lmedia#pmedia three way interaction would tell you that.)

                      Comment


                      • #12
                        How was your sample obtained? Is it adequately representative?
                        What you suspect is right that my sample is not random. This study is only for real estate sector companies. The main effect is consistent with other studies in my disciplines, just that the interaction result a little bit off. Looking to your example, I feel relieved to know that you also thinking there is probability of having a positive interaction result if umedia is !=0.

                        In a different model where the 'u', in this model is ucomm is !=0, I get this result:


                        Code:
                          xtreg $y1 $vcm $c1 i.year, fe vce(robust)
                        
                        Fixed-effects (within) regression               Number of obs     =        420
                        Group variable: code                            Number of groups  =        140
                        
                        R-sq:                                           Obs per group:
                             within  = 0.2237                                         min =          3
                             between = 0.0515                                         avg =        3.0
                             overall = 0.0720                                         max =          3
                        
                                                                        F(15,139)         =       3.78
                        corr(u_i, Xb)  = -0.2763                        Prob > F          =     0.0000
                        
                                                                    (Std. Err. adjusted for 140 clusters in code)
                        -----------------------------------------------------------------------------------------
                                                |               Robust
                                              y |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                        ------------------------+----------------------------------------------------------------
                                          pcomm |   -.068093   .0663322    -1.03   0.306    -.1992435    .0630574
                                          lcomm |   .2156546    .132826     1.62   0.107     -.046966    .4782753
                                                |
                                c.pcomm#c.lcomm |   .0664245   .0726227     0.91   0.362    -.0771634    .2100124
                                                |
                                          ucomm |  -.7367753   .6272899    -1.17   0.242    -1.977039    .5034883
                                                |
                                c.pcomm#c.ucomm |   .4129076   .3065344     1.35   0.180    -.1931654    1.018981
                                                |
                                c.lcomm#c.ucomm |   .5142513    .407855     1.26   0.209    -.2921505    1.320653
                                                |
                        c.pcomm#c.lcomm#c.ucomm |   -.255443    .189433    -1.35   0.180    -.6299858    .1190998
                                                |
                                         winroe |  -.9459327   .6827971    -1.39   0.168    -2.295944    .4040785
                                       logtobin |   -.099044   .1821663    -0.54   0.588    -.4592192    .2611313
                                          logta |  -.0093681   .1607603    -0.06   0.954    -.3272197    .3084835
                                        logdebt |   .0801753   .1055589     0.76   0.449    -.1285333     .288884
                                         logage |  -.5670932   .2816274    -2.01   0.046    -1.123921   -.0102657
                                            gbi |   .0579046   .0450414     1.29   0.201    -.0311504    .1469595
                                                |
                                           year |
                                          2016  |   .1032777   .0445166     2.32   0.022     .0152604     .191295
                                          2017  |   .2945811   .0732483     4.02   0.000     .1497562    .4394061
                                                |
                                          _cons |   4.419525   2.320758     1.90   0.059    -.1690267    9.008076
                        ------------------------+----------------------------------------------------------------
                                        sigma_u |  .70479173
                                        sigma_e |  .36624074
                                            rho |   .7873831   (fraction of variance due to u_i)
                        -----------------------------------------------------------------------------------------
                        
                        . 
                        end of do-file
                        (1)
                        Click image for larger version

Name:	Graph3.png
Views:	1
Size:	13.4 KB
ID:	1533571


                        (2)
                        Click image for larger version

Name:	Graph2.png
Views:	1
Size:	13.4 KB
ID:	1533570


                        (3)
                        Click image for larger version

Name:	Graph4.png
Views:	1
Size:	13.1 KB
ID:	1533572



                        The regression table shows that I don't have any significant result for both, the main effect and the interaction result. However, -marginsplot- seem to show that there is interaction for lcomm*ucomm and pcomm*ucomm. Which one I should follow to draw my conclusion?

                        Comment


                        • #13
                          As you may know, I am one of those people who heartily endorses the American Statistical Association's recommendation that the concept of statistical significance be abandoned altogether. See https://www.tandfonline.com/doi/full...5.2019.1583913 for the "executive summary" and
                          https://www.tandfonline.com/toc/utas20/73/sup1 for all 43 supporting articles. Or https://www.nature.com/articles/d41586-019-00857-9 for the tl;dr.

                          But even without taking that strong a position, in interaction models, judging things by a p < 0.05 (or any other p-value threshold) criterion is an especially bad idea. The reason is that, as you can see in the graphs, and as can be demonstrated with a little algebra, even tiny interaction terms can result in large differences in marginal effects of one variable when another variable is in a certain range of values. So, for example, looking at your lasta graph, we can see that effect of ucomm gets ever larger as pcomm increases. If pcomm can take on values much larger than three, the differences in expected values can become very large. So really, whether these interaction effects are meaningful depends on a) how far the range of values of pcomm extends in the real world, and b) how large a difference in expected values of y is meaningful. If there are realistic values of pcomm where the difference between y when ucomm = 0 and y when ucomm = 3 (or perhaps even a larger value than 3 if that is realistic) is large enough to matter from a practical perspective, then the interaction is meaningful, even if it is not "statistically significant." And similarly, even if the interaction coefficient is "statistically significant" it would be quite meaningless if there are no values of pcomm for which the difference between y when ucomm = 0 and y when ucomm = 3 is still too small to matter in the real world. Statistical significance, to the extent it means anything at all in this context, is mainly a commentary about the precision with which the interaction effect has been estimated by your data, which, in turn is largely a matter of how big your sample size is relative to the noise in the data. It doesn't really tell you whether a model that includes interaction terms is a better model than one without them.

                          I don't know what your y, ucomm, lcomm, and pcomm variables are. And even if I did, unless this is some kind of epidemiology or medical research, I probably still wouldn't know what are realistic values of those variables, nor how big a difference in values of y is large enough to matter. So I can't advise you on this: these are judgments that must be made by somebody familiar with the subject matter. If you don't feel sufficiently expert in the area to make such judgments, you need to consult with somebody else in your discipline--it's really not a statistical issue.

                          Comment


                          • #14
                            So really, whether these interaction effects are meaningful depends on a) how far the range of values of pcomm extends in the real world, and b) how large a difference in expected values of y is meaningful. If there are realistic values of pcomm where the difference between y when ucomm = 0 and y when ucomm = 3 (or perhaps even a larger value than 3 if that is realistic) is large enough to matter from a practical perspective, then the interaction is meaningful, even if it is not "statistically significant."
                            For now, pcomm can only extends to 3 and every decimal points of the expected value of y is meaningful in real world. The maximum of y is 8. The ucomm is something I am looking forward as a contribution in my research. I will cite accordingly the relevant articles you've mentioned to support the interaction result. The last graph shows the change of y from 2 to 3 (ignore the decimal places) when pcomm*ucomm=3 is really meaningful for my findings.

                            Thank you so much to bear with me. I have one last question to ask. It is on the interpretation of three interaction result in #12. And, can I graph the three interaction using -marginsplot-? I did try use this code,
                            Code:
                             margins, at (pcomm*lcomm=(0 1 2 3) ucomm=(0 1 2 3)) asbalanced plot

                            Comment


                            • #15
                              I don't understand what you are trying to do in #14. pcomm*lcomm is not a term in the model. It is a product of two different terms, and there is no way for Stata to make sense of it. After all, pcomm*lcomm = 0 could happen with either of pcomm or lcomm being zero while the other could be any value at all: yet those would correspond to different expected values of y, so the corresponding predictive margin would be undefinable. The same is true for other values of pcomm*lcomm, though the possibilities are a bit more constrained. But, for example, we could have pcomm*lcomm = 2 when pcomm and lcomm are both equal to (approximately) 1.414, or when one of them is 2 and the other is 1, or when one of them is 3 and the other is 0.667 (approximately). And again, all of those scenarios correspond to different predicted values of y, so the predictive margin is not definable.

                              Comment

                              Working...
                              X