Announcement

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

  • Exact predicted values ( y axis) with MCP commands

    I am using MCP commands to generate predicted probability of interaction terms between two continuous variables. But the following commands give me the graphs but do not give me the exact values of the graphs on y axis?

    I used the following commands.

    firthlogit dv iv x1 x2 x3 x4 c.x3#c.x4, nolog

    mcp x4 x3, show margopts(atmeans expression (invlogit(predict(xb))))


    I have tried numerous different combinations of commands and this has been only command to display a correct-looking graph presumably.

    Can anyone please help if the commands are correct and/or how I can find out the exact values of probability of the graphs (y axis)?




  • #2
    First things first, mcp is from the Stata Journal as you are asked to explain (FAQ Advice #12). With the -show- option, you see the corresponding margins command which you can run to get the marginal effects used to plot the graphs. These are just predictions at specified values of x3 and x4 and everything else at mean values, i.e.,

    Code:
    margins, at(x3= (x3_1 x3_2 ...) x4=(x4_1 x4_2 ...)) atmeans

    Comment


    • #3
      Thank you for letting me know. Also, can anyone please help me answer what is the correct Stata command to generate the probabilty of the ineraction term of two continuous variables in my model?
      Last edited by April Kimm; 25 Mar 2022, 09:14.

      Comment


      • #4
        You have asked several versions of this question and I doubt that any further responses will deviate from those given in your previous posts linked below. In any case, the thread remains open, I just want to highlight that there is nothing more that I can add.

        ​​​https://www.statalist.org/forums/for...=1648222199383
        https://www.statalist.org/forums/for...eraction-terms

        Comment


        • #5
          The previous posting were about the interaction terms between a categorical and a continuous variables but I am having difficulties with an interaction term between two continuous variables. I do not think margins command work for the interaction term of two continuous variables. That's why I found mcp commands. There has been few research has used firthlogit which adds to my difficulties since I am not able to follow what the previous research has done.

          Comment


          • #6
            mcp is a graphing command. In terms of the calculations of marginal effects, it calls margins and as I explained in #2, where you can see the specific margins command by specifying the -show- option. In the case of two continuous variables, what you have are predicted probabilities at specified values of both of the interacting variables as again shown in #2. Read and follow the examples in the Stata Journal article that describes mcp: https://journals.sagepub.com/doi/pdf...867X1301300305

            Comment

            Working...
            X