Announcement

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

  • Compare predicted probabilities?

    Hi all,

    Say I run a logistic regression with a 3x3 categorical by categorical interaction. I then run
    Code:
    margins var1#var2 , predict(pr)
    to get the predicted probability by each category. I am given confidence intervals for each prediction. However, I can I statistically test to see if predicted values are statistically different? Would I use average marginal effects?

  • #2
    Code:
    margins var1#var2, pwcompare
    and see the help for options to customize the output.

    Comment


    • #3
      Thank you for this! Two follow-up questions:
      1. Is this pairwise comparison different from checking average marginal effects? For example, does the following code tell me something different?
      Code:
       margins var1, dydx (var2) predict(pr)
      2. Can this be executed with the 'mimrgns' package, as I have multiply imputed data? I have taken a stab at it, but get the following error:
      Code:
      nothing found where name expected
      st_matrixcolstripe_term_size():  3300  argument out of range
        _b_stat::fill_mcinfo():     -  function returned error
            _b_stat::compute():     -  function returned error
                 _coef_table():     -  function returned error
                       <istmt>:     -  function returned error

      Comment


      • #4
        If var2 is a dichotomous variable, -margins var2, pwcompare(effects)- will produce the exact same results as -margins, dydx(var2)-.

        I can't comment on -mimrgns- as I have only minimal experience with it. I know it does not have a -pwcompare- option. Nor does it have a -dydx()- option. But I believe there is a way to get contrasts of multiple imputation results for logistic regression coefficients in some other way. But I have not done that myself and don't remember what it is. Others on this Forum are more familiar with -mimrgns- and can probably provide a more helpful answer.

        Comment


        • #5
          Thanks for all the help! I have used dydx successfully with mimrgns I should note. I welcome anyone else with experience using -mimrgns-!

          Comment

          Working...
          X