Announcement

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

  • Average Marginal Effects of all covariates

    Hello everyone,

    I am working on the following model (Random Effects Probit Model).

    In the below model:
    job_change = binary variable (0/1)
    logsalary, education and tenure: continuous variables.

    Code:
    xtset  empid year
    xtprobit job_change logsalary age education tenure, vce(robust)
    margins, dydx(*)
    The above looks OK to me as it estimates the average marginal effects of each of the covariates.

    However, I also need to estimate the average marginal effects of all the covariates. i.e. the mean probability (Pr(y=1 | x̄))

    I have tried the following model, but I wonder if this is correct since this would estimate the predicted probability.
    Code:
    xtset  empid year
    xtprobit job_change logsalary age education tenure, vce(robust)
    margins

    I would really appreciate some help here.

    Thanks a lot in advance.

    J

  • #2
    I understand that you want the following:

    Code:
    ...
    margins, atmeans
    Best wishes

    (Stata 16.1 MP)

    Comment


    • #3
      Thanks, Felix.
      But I don't think so.

      As per my understanding, the command that you suggest will give the adjusted predictions keeping all covariates constant.
      Code:
      margins, atmeans
      Maybe someone can correct if I am wrong?

      Thanks a lot,

      J

      Comment


      • #4
        You wrote that you want "Pr(y=1 | x̄))", which I read as the probability to have received the treatment when all covariates are held constant at their respective mean. Maybe you can clarify what else you have in mind. In theory you can also combine these two commands into

        Code:
        margins, dydx(x) atmeans
        Best wishes

        (Stata 16.1 MP)

        Comment


        • #5
          Thanks, Felix for the clarification. You are right. I now understand this better.

          J

          Comment

          Working...
          X